Skip to content

Commit e393b83

Browse files
committed
Merged in [14058] from rjsparks@nostrum.com:
Further refinements to the nominee status table. Related to ietf-tools#2261. - Legacy-Id: 14068 Note: SVN reference [14058] has been migrated to Git commit 7cecd9f
2 parents 2b27536 + 7cecd9f commit e393b83

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

ietf/nomcom/views.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ def private_index(request, year):
175175
nominee_positions = [np for np in nominee_positions if np.questionnaires]
176176

177177
positions = Position.objects.get_by_nomcom(nomcom=nomcom)
178-
stats = [{'position__name':p.name,'position__id':p.pk} for p in positions]
178+
stats = [ { 'position__name':p.name,
179+
'position__id':p.pk,
180+
'position': p,
181+
} for p in positions]
179182
states = list(NomineePositionStateName.objects.values('slug', 'name')) + [{'slug': questionnaire_state, 'name': u'Questionnaire'}]
180183
positions = set([ n.position for n in all_nominee_positions.order_by('position__name') ])
181184
for s in stats:
@@ -198,6 +201,9 @@ def private_index(request, year):
198201
else:
199202
totals[state['slug']] = all_nominee_positions.filter(state=state['slug']).count()
200203
totals['comments'] = Feedback.objects.filter(nomcom=nomcom, type='comment').count()
204+
totals['open'] = nomcom.position_set.filter(is_open=True).count()
205+
totals['accepting_nominations'] = nomcom.position_set.filter(accepting_nominations=True).count()
206+
totals['accepting_feedback'] = nomcom.position_set.filter(accepting_feedback=True).count()
201207

202208
unique_totals = dict()
203209
unique_totals['nominees'] = Person.objects.filter(nominee__nomcom=nomcom).distinct().count()

ietf/templates/nomcom/private_index.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,29 @@
99
<h2>Nomination status</h2>
1010

1111
<div class="table-responsive">
12-
<table class="table table-condensed table-striped table-hover col-sm-10">
12+
<table class="table table-condensed table-striped table-hover col-sm-12">
1313
<thead>
1414
<tr>
15-
<th class="col-sm-3">Position</th>
15+
<th class="col-sm-2">Position</th>
16+
<th class="col-sm-1">Open</th>
17+
<th class="col-sm-1">Accepting<br/>Nominations</th>
18+
<th class="col-sm-1">Accepting<br/>Feedback</th>
1619
<th class="col-sm-1">Nominations</th>
1720
<th class="col-sm-1">Unique Nominees</th>
1821
<th class="col-sm-1">Accepted</th>
1922
<th class="col-sm-1">Declined</th>
2023
<th class="col-sm-1">Pending</th>
21-
<th class="col-sm-1">Questionnaire responses</th>
24+
<th class="col-sm-1">Questionnaire<br/>Responses</th>
2225
<th class="col-sm-1">Comments</th>
2326
</tr>
2427
</thead>
2528
<tbody>
2629
{% for item in stats %}
2730
<tr>
2831
<td>{{ item.position__name }}</td>
32+
<td>{{ item.position.is_open|yesno:"Yes,No,No" }}</td>
33+
<td>{{ item.position.accepting_nominations|yesno:"Yes,No,No" }}</td>
34+
<td>{{ item.position.accepting_feedback|yesno:"Yes,No,No" }}</td>
2935
<td>{{ item.nominations }}</td>
3036
<td>{{ item.nominees }}</td>
3137
<td>{{ item.accepted }}</td>
@@ -39,6 +45,9 @@ <h2>Nomination status</h2>
3945
<tfoot>
4046
<tr>
4147
<th>Totals</th>
48+
<th>{{ totals.open }}</th>
49+
<th>{{ totals.accepting_nominations }}</th>
50+
<th>{{ totals.accepting_feedback }}</th>
4251
<th>{{ totals.nominations }}</th>
4352
<th>{{ totals.nominees }}</th>
4453
<th>{{ totals.accepted }}</th>
@@ -50,6 +59,9 @@ <h2>Nomination status</h2>
5059
<tr>
5160
<th>Unique Nominee Totals</th>
5261
<th>-</th>
62+
<th>-</th>
63+
<th>-</th>
64+
<th>-</th>
5365
<th>{{ unique_totals.nominees }}</th>
5466
<th>{{ unique_totals.accepted }}</th>
5567
<th>{{ unique_totals.declined }}</th>

0 commit comments

Comments
 (0)