Changeset beb46fb


Ignore:
Timestamp:
Nov 28, 2013, 11:48:36 PM (12 years ago)
Author:
Alex Dehnert <adehnert@…>
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)
Message:

Make issues.csv cycle-aware (ASA-#191)

Location:
asadb
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    r88843ac rbeb46fb  
    498498
    499499
     500class 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
    500511@permission_required('groups.view_group_private_info')
    501 def group_confirmation_issues(request, ):
     512def group_confirmation_issues(request, slug, ):
    502513    account_numbers = ("accounts" in request.GET) and request.GET['accounts'] == "1"
    503514
    504515    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, )
    506517    people_confirmations = forms.models.PersonMembershipUpdate.objects.filter(
    507518        deleted__isnull=True,
    508519        valid__gt=0,
     520        cycle__slug=slug,
    509521    )
    510522
  • asadb/template/membership/admin.html

    rd6f8984 rbeb46fb  
    66<h2>Membership confirmations &mdash; ASA Exec pages</h2>
    77
    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>
    926
    1027<p>The list includes the following types of issues:</p>
    1128<dl>
    12     <dt>unsubmitted</dt><dd>active groups ("group status" is "Active") who have not submitted an update (ever &mdash; 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 &mdash; 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>
    1532</dl>
    1633
  • asadb/urls.py

    r3c1b20b rbeb46fb  
    6565    ),
    6666    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', ),
    7469
    7570    # Midway
Note: See TracChangeset for help on using the changeset viewer.