Changeset 9ea4909
- Timestamp:
- Aug 24, 2011, 10:44:20 PM (15 years ago)
- Branches:
- master, space-access, stable, stage, test-hooks
- Children:
- 6a646ce
- Parents:
- 7b57a9b
- git-author:
- Alex Dehnert <adehnert@…> (08/24/11 22:34:43)
- git-committer:
- Alex Dehnert <adehnert@…> (08/24/11 22:44:20)
- Location:
- asadb
- Files:
-
- 2 edited
-
groups/views.py (modified) (3 diffs)
-
template/groups/groups_signatories.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/views.py
r7b57a9b r9ea4909 392 392 # TODO: 393 393 # * limit which columns (roles) get displayed 394 # * limit which rows get displayed (maybe) by category or something395 394 # This might want to wait for the generic reporting infrastructure, since 396 395 # I'd imagine some of it can be reused. 397 396 397 the_groups = groups.models.Group.objects.all() 398 groups_filterset = GroupFilter(request.GET, the_groups) 399 the_groups = groups_filterset.qs 398 400 officers = groups.models.OfficeHolder.objects.filter(start_time__lte=datetime.datetime.now(), end_time__gte=datetime.datetime.now()) 401 officers = officers.filter(group__in=the_groups) 399 402 officers = officers.select_related(depth=1) 400 all_groups = groups.models.Group.objects.all()401 403 roles = groups.models.OfficerRole.objects.all() 402 404 officers_map = collections.defaultdict(lambda: collections.defaultdict(set)) … … 404 406 officers_map[officer.group][officer.role].add(officer.person) 405 407 officers_data = [] 406 for group in all_groups:408 for group in the_groups: 407 409 role_list = [] 408 410 for role in roles: … … 413 415 'roles': roles, 414 416 'officers': officers_data, 417 'filter': groups_filterset, 415 418 } 416 419 return render_to_response('groups/groups_signatories.html', context, context_instance=RequestContext(request), ) -
asadb/template/groups/groups_signatories.html
r3107c52 r9ea4909 5 5 6 6 <h1>Signatory list</h1> 7 8 <h2>Search</h2> 9 10 <form action="" method="get"> 11 <table class='pretty-table'> 12 {{ filter.form.as_table }} 13 </table> 14 <input type="submit" value="Search" /> 15 </form> 16 17 <h2>The Groups</h2> 7 18 8 19 {% if changes %}
Note: See TracChangeset
for help on using the changeset viewer.