From 0313a4f58debdb1e54b2930842be1c4305a525bd Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 21 Oct 2019 19:37:36 +0000 Subject: [PATCH] Merged in [16836] from rjsparks@nostrum.com: Changes to displaying the ballot_icon to account for IRSG ballots. - Legacy-Id: 16896 Note: SVN reference [16836] has been migrated to Git commit 6375aa3bedbd612cd519bf3dccced2465b145593 --- ietf/doc/templatetags/ballot_icon.py | 16 +++++++++++++--- ietf/doc/templatetags/ietf_filters.py | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ietf/doc/templatetags/ballot_icon.py b/ietf/doc/templatetags/ballot_icon.py index 7551a7a39..d470a6b94 100644 --- a/ietf/doc/templatetags/ballot_icon.py +++ b/ietf/doc/templatetags/ballot_icon.py @@ -1,3 +1,4 @@ +# Copyright The IETF Trust 2019, All rights reserved. # Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. Contact: Pasi Eronen # @@ -50,7 +51,9 @@ register = template.Library() @register.filter def showballoticon(doc): if doc.type_id == "draft": - if doc.get_state_slug("draft-iesg") not in IESG_BALLOT_ACTIVE_STATES: + if doc.stream_id == 'ietf' and doc.get_state_slug("draft-iesg") not in IESG_BALLOT_ACTIVE_STATES: + return False + elif doc.stream_id == 'irtf' and doc.get_state_slug("draft-stream-irtf") not in ['irsgpoll']: return False elif doc.type_id == "charter": if doc.get_state_slug() not in ("intrev", "extrev", "iesgrev"): @@ -101,10 +104,17 @@ def ballot_icon(context, doc): my_blocking = True break - res = ['') diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index efd200f8f..14294ecc2 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -459,6 +459,8 @@ def pos_to_label(text): 'Discuss': 'danger', 'Block': 'danger', 'Recuse': 'primary', + 'Not Ready': 'danger', + 'Need More Time': 'danger', }.get(str(text), 'blank') @register.filter