Changeset 52fb1d5
- Timestamp:
- May 6, 2013, 8:15:06 PM (13 years ago)
- Branches:
- master, space-access, stable, stage
- Children:
- b4cc0cc
- Parents:
- 83759bf
- git-author:
- Alex Dehnert <adehnert@…> (05/06/13 20:15:06)
- git-committer:
- Alex Dehnert <adehnert@…> (05/06/13 20:15:06)
- Location:
- asadb
- Files:
-
- 2 edited
-
groups/views.py (modified) (2 diffs)
-
template/groups/reporting/non-students.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/views.py
rb8172c8 r52fb1d5 1281 1281 office_holders = office_holders.filter(role__in=student_roles) 1282 1282 office_holders = office_holders.exclude(person__in=students.values('username')) 1283 office_holders = office_holders.select_related('group', ' role')1283 office_holders = office_holders.select_related('group', 'group__group_status', 'role') 1284 1284 1285 1285 msg = None … … 1287 1287 if 'sort' in request.GET: 1288 1288 if request.GET['sort'] == 'group': 1289 office_holders = office_holders.order_by('group__name', 'role', 'person', ) 1289 office_holders = office_holders.order_by('group__name', 'group__group_status', 'role', 'person', ) 1290 elif request.GET['sort'] == 'status': 1291 office_holders = office_holders.order_by('group__group_status', 'group__name', 'role', 'person', ) 1290 1292 elif request.GET['sort'] == 'role': 1291 office_holders = office_holders.order_by('role', 'group__ name', 'person', )1293 office_holders = office_holders.order_by('role', 'group__group_status', 'group__name', 'person', ) 1292 1294 elif request.GET['sort'] == 'person': 1293 office_holders = office_holders.order_by('person', 'group__ name', 'role', )1295 office_holders = office_holders.order_by('person', 'group__group_status', 'group__name', 'role', ) 1294 1296 else: 1295 1297 msg = 'Unknown sort key "%s".' % (request.GET['sort'], ) -
asadb/template/groups/reporting/non-students.html
r213dd57 r52fb1d5 35 35 <tr> 36 36 <th><a href='?sort=group'>Group</a></th> 37 <th><a href='?sort=status'>Status</a></th> 37 38 <th><a href='?sort=role'>Role</a></th> 38 39 <th><a href='?sort=person'>Person</a></th> … … 41 42 <tr> 42 43 <td><a href='{% url groups:group-detail holder.group.pk %}'>{{holder.group.name}}</a></td> 44 <td>{{holder.group.group_status}}</td> 43 45 <td>{{holder.role.display_name}}</td> 44 46 <td>{{holder.person}}</td>
Note: See TracChangeset
for help on using the changeset viewer.