Changeset c4a4d13
- Timestamp:
- May 24, 2011, 4:07:35 AM (15 years ago)
- Branches:
- master, space-access, stable, stage, test-hooks
- Children:
- 54c467a
- Parents:
- c2d6f93
- git-author:
- Alex Dehnert <adehnert@…> (05/24/11 04:07:35)
- git-committer:
- Alex Dehnert <adehnert@…> (05/24/11 04:07:35)
- Location:
- asadb
- Files:
-
- 1 added
- 3 edited
-
groups/views.py (modified) (2 diffs)
-
media/style/style.css (modified) (2 diffs)
-
template/groups/group_detail.html (added)
-
urls.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/views.py
r6a9169b rc4a4d13 5 5 from django.contrib.auth.decorators import user_passes_test, login_required 6 6 from django.core.exceptions import PermissionDenied 7 from django.views.generic import list_detail7 from django.views.generic import DetailView 8 8 from django.shortcuts import render_to_response, get_object_or_404 9 9 from django.template import RequestContext … … 90 90 } 91 91 return render_to_response('groups/group_change_main.html', context, context_instance=RequestContext(request), ) 92 93 class GroupDetailView(DetailView): 94 context_object_name = "group" 95 model = groups.models.Group 96 def get_context_data(self, **kwargs): 97 # Call the base implementation first to get a context 98 context = super(GroupDetailView, self).get_context_data(**kwargs) 99 group = context['group'] 100 101 # Indicate whether this person should be able to see "private" info 102 context['viewpriv'] = self.request.user.has_perm('groups.view_group_private_info', group) 103 return context -
asadb/media/style/style.css
r3400018 rc4a4d13 7 7 { 8 8 border-collapse: collapse; 9 } 10 table.pretty-table th, table.pretty-table td 9 margin: 0.5em; 10 } 11 table.pretty-table th, table.pretty-table td, table.pretty-table caption 11 12 { 12 13 border: 1px solid black; 13 14 padding: 2px; 14 15 } 15 table.pretty-table th 16 { 16 table.pretty-table caption 17 { 18 border-bottom: none; 19 } 20 table.pretty-table th, table.pretty-table caption 21 { 22 font-weight: bold; 17 23 background: #BE2933; 18 24 } … … 202 208 203 209 210 /***************** 211 * GROUP DISPLAY * 212 *****************/ 213 tr.private-info th:before 214 { 215 content: "* "; 216 } 217 218 204 219 /* Reset some stuff */ 205 220 h1, h2, h3, th -
asadb/urls.py
r0c2a9ea rc4a4d13 50 50 name='group-list', 51 51 ), 52 url(r'^group/(?P<pk>\d+)/', groups.views.GroupDetailView.as_view(), ), 52 53 53 54 # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
Note: See TracChangeset
for help on using the changeset viewer.