Skip to content

Commit 6375aa3

Browse files
committed
Changes to displaying the ballot_icon to account for IRSG ballots. Commit ready for merge.
- Legacy-Id: 16836
1 parent 1057310 commit 6375aa3

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

ietf/doc/templatetags/ballot_icon.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright The IETF Trust 2019, All rights reserved.
12
# Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
23
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
34
#
@@ -50,7 +51,9 @@
5051
@register.filter
5152
def showballoticon(doc):
5253
if doc.type_id == "draft":
53-
if doc.get_state_slug("draft-iesg") not in IESG_BALLOT_ACTIVE_STATES:
54+
if doc.stream_id == 'ietf' and doc.get_state_slug("draft-iesg") not in IESG_BALLOT_ACTIVE_STATES:
55+
return False
56+
elif doc.stream_id == 'irtf' and doc.get_state_slug("draft-stream-irtf") not in ['irsgpoll']:
5457
return False
5558
elif doc.type_id == "charter":
5659
if doc.get_state_slug() not in ("intrev", "extrev", "iesgrev"):
@@ -101,10 +104,17 @@ def sort_key(t):
101104
my_blocking = True
102105
break
103106

104-
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="IESG positions (click to show more)" class="ballot-icon"><table' % (
107+
typename = "Unknown"
108+
if ballot.ballot_type.slug=='approve':
109+
typename = "IESG"
110+
elif ballot.ballot_type.slug=='irsg-approve':
111+
typename = "IRSG"
112+
113+
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="%s positions (click to show more)" class="ballot-icon"><table' % (
105114
right_click_string,
106115
urlreverse("ietf.doc.views_doc.ballot_popup", kwargs=dict(name=doc.name, ballot_id=ballot.pk)),
107-
ballot.pk,)]
116+
ballot.pk,
117+
typename,)]
108118
if my_blocking:
109119
res.append(' class="is-blocking" ')
110120
res.append('>')

ietf/doc/templatetags/ietf_filters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,8 @@ def pos_to_label(text):
459459
'Discuss': 'danger',
460460
'Block': 'danger',
461461
'Recuse': 'primary',
462+
'Not Ready': 'danger',
463+
'Need More Time': 'danger',
462464
}.get(str(text), 'blank')
463465

464466
@register.filter

0 commit comments

Comments
 (0)