Merged in [14058] from rjsparks@nostrum.com:
Further refinements to the nominee status table. Related to #2261.
- Legacy-Id: 14068
Note: SVN reference [14058] has been migrated to Git commit 7cecd9fe38
This commit is contained in:
commit
e393b83f6b
ietf
|
@ -175,7 +175,10 @@ def private_index(request, year):
|
|||
nominee_positions = [np for np in nominee_positions if np.questionnaires]
|
||||
|
||||
positions = Position.objects.get_by_nomcom(nomcom=nomcom)
|
||||
stats = [{'position__name':p.name,'position__id':p.pk} for p in positions]
|
||||
stats = [ { 'position__name':p.name,
|
||||
'position__id':p.pk,
|
||||
'position': p,
|
||||
} for p in positions]
|
||||
states = list(NomineePositionStateName.objects.values('slug', 'name')) + [{'slug': questionnaire_state, 'name': u'Questionnaire'}]
|
||||
positions = set([ n.position for n in all_nominee_positions.order_by('position__name') ])
|
||||
for s in stats:
|
||||
|
@ -198,6 +201,9 @@ def private_index(request, year):
|
|||
else:
|
||||
totals[state['slug']] = all_nominee_positions.filter(state=state['slug']).count()
|
||||
totals['comments'] = Feedback.objects.filter(nomcom=nomcom, type='comment').count()
|
||||
totals['open'] = nomcom.position_set.filter(is_open=True).count()
|
||||
totals['accepting_nominations'] = nomcom.position_set.filter(accepting_nominations=True).count()
|
||||
totals['accepting_feedback'] = nomcom.position_set.filter(accepting_feedback=True).count()
|
||||
|
||||
unique_totals = dict()
|
||||
unique_totals['nominees'] = Person.objects.filter(nominee__nomcom=nomcom).distinct().count()
|
||||
|
|
|
@ -9,16 +9,19 @@
|
|||
<h2>Nomination status</h2>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed table-striped table-hover col-sm-10">
|
||||
<table class="table table-condensed table-striped table-hover col-sm-12">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-3">Position</th>
|
||||
<th class="col-sm-2">Position</th>
|
||||
<th class="col-sm-1">Open</th>
|
||||
<th class="col-sm-1">Accepting<br/>Nominations</th>
|
||||
<th class="col-sm-1">Accepting<br/>Feedback</th>
|
||||
<th class="col-sm-1">Nominations</th>
|
||||
<th class="col-sm-1">Unique Nominees</th>
|
||||
<th class="col-sm-1">Accepted</th>
|
||||
<th class="col-sm-1">Declined</th>
|
||||
<th class="col-sm-1">Pending</th>
|
||||
<th class="col-sm-1">Questionnaire responses</th>
|
||||
<th class="col-sm-1">Questionnaire<br/>Responses</th>
|
||||
<th class="col-sm-1">Comments</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -26,6 +29,9 @@
|
|||
{% for item in stats %}
|
||||
<tr>
|
||||
<td>{{ item.position__name }}</td>
|
||||
<td>{{ item.position.is_open|yesno:"Yes,No,No" }}</td>
|
||||
<td>{{ item.position.accepting_nominations|yesno:"Yes,No,No" }}</td>
|
||||
<td>{{ item.position.accepting_feedback|yesno:"Yes,No,No" }}</td>
|
||||
<td>{{ item.nominations }}</td>
|
||||
<td>{{ item.nominees }}</td>
|
||||
<td>{{ item.accepted }}</td>
|
||||
|
@ -39,6 +45,9 @@
|
|||
<tfoot>
|
||||
<tr>
|
||||
<th>Totals</th>
|
||||
<th>{{ totals.open }}</th>
|
||||
<th>{{ totals.accepting_nominations }}</th>
|
||||
<th>{{ totals.accepting_feedback }}</th>
|
||||
<th>{{ totals.nominations }}</th>
|
||||
<th>{{ totals.nominees }}</th>
|
||||
<th>{{ totals.accepted }}</th>
|
||||
|
@ -50,6 +59,9 @@
|
|||
<tr>
|
||||
<th>Unique Nominee Totals</th>
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
<th>{{ unique_totals.nominees }}</th>
|
||||
<th>{{ unique_totals.accepted }}</th>
|
||||
<th>{{ unique_totals.declined }}</th>
|
||||
|
|
Loading…
Reference in a new issue