Changeset beb46fb
- Timestamp:
- Nov 28, 2013, 11:48:36 PM (12 years ago)
- Branches:
- master, stable, stage
- Children:
- 08b7660
- Parents:
- 5560f6d
- git-author:
- Alex Dehnert <adehnert@…> (11/28/13 23:48:36)
- git-committer:
- Alex Dehnert <adehnert@…> (11/28/13 23:48:36)
- Location:
- asadb
- Files:
-
- 3 edited
-
forms/views.py (modified) (1 diff)
-
template/membership/admin.html (modified) (1 diff)
-
urls.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
asadb/forms/views.py
r88843ac rbeb46fb 498 498 499 499 500 class View_GroupConfirmationCyclesList(ListView): 501 context_object_name = "cycle_list" 502 template_name = "membership/admin.html" 503 model = forms.models.GroupConfirmationCycle 504 505 def get_context_data(self, **kwargs): 506 context = super(View_GroupConfirmationCyclesList, self).get_context_data(**kwargs) 507 context['pagename'] = 'groups' 508 return context 509 510 500 511 @permission_required('groups.view_group_private_info') 501 def group_confirmation_issues(request, ):512 def group_confirmation_issues(request, slug, ): 502 513 account_numbers = ("accounts" in request.GET) and request.GET['accounts'] == "1" 503 514 504 515 active_groups = groups.models.Group.active_groups 505 group_updates = forms.models.GroupMembershipUpdate.objects. all()516 group_updates = forms.models.GroupMembershipUpdate.objects.filter(cycle__slug=slug, ) 506 517 people_confirmations = forms.models.PersonMembershipUpdate.objects.filter( 507 518 deleted__isnull=True, 508 519 valid__gt=0, 520 cycle__slug=slug, 509 521 ) 510 522 -
asadb/template/membership/admin.html
rd6f8984 rbeb46fb 6 6 <h2>Membership confirmations — ASA Exec pages</h2> 7 7 8 <p>Exec members can check the <a href='{% url membership-issues %}'>list of groups with issues</a> (or a version <a href='{% url membership-issues %}?accounts=1'>with account numbers</a>)</p> 8 <p>Exec members can check the issues:</p> 9 10 <table class='pretty-table'> 11 <tr> 12 <th>Name</th> 13 <th>Create date</th> 14 <th>Issues</th> 15 <th>(with accounts)</th> 16 </tr> 17 {% for cycle in cycle_list %} 18 <tr> 19 <th>{{cycle.name}}</th> 20 <td>{{cycle.create_date}}</td> 21 <td><a href='{% url membership-issues cycle.slug %}'>Issues</a></td> 22 <td><a href='{% url membership-issues cycle.slug %}?accounts=1'>(with accounts)</a></td> 23 </tr> 24 {% endfor %} 25 </table> 9 26 10 27 <p>The list includes the following types of issues:</p> 11 28 <dl> 12 <dt>unsubmitted</dt><dd>active groups ("group status" is "Active") who have not submitted an update (ever — see ASA-#191)</dd>13 <dt>confirmations</dt><dd>groups that have submitted an update (ever) but had less than five members confirm membership (again, ever — ASA-#191)</dd>14 <dt>50%</dt><dd>groups that (ever)submitted a confirmation with more non-students (alum, other affiliates, or other) than students (grad or undergrad)</dd>29 <dt>unsubmitted</dt><dd>active groups ("group status" is "Active") who have not submitted an update 30 <dt>confirmations</dt><dd>groups that have submitted an update but had less than five members confirm membership</dd> 31 <dt>50%</dt><dd>groups that submitted a confirmation with more non-students (alum, other affiliates, or other) than students (grad or undergrad)</dd> 15 32 </dl> 16 33 -
asadb/urls.py
r3c1b20b rbeb46fb 65 65 ), 66 66 url(r'^membership/submitted/$', forms.views.View_GroupMembershipList.as_view(), name='membership-submitted', ), 67 url( 68 r'^membership/admin/$', 69 'django.views.generic.simple.direct_to_template', 70 {'template': 'membership/admin.html', 'extra_context': { 'pagename':'groups' }, }, 71 name='membership-admin', 72 ), 73 url(r'^membership/admin/issues.csv$', forms.views.group_confirmation_issues, name='membership-issues', ), 67 url(r'^membership/admin/$', forms.views.View_GroupConfirmationCyclesList.as_view(), name='membership-admin', ), 68 url(r'^membership/admin/issues/(?P<slug>[\w-]+).csv$', forms.views.group_confirmation_issues, name='membership-issues', ), 74 69 75 70 # Midway
Note: See TracChangeset
for help on using the changeset viewer.