Merged in [8301] from rcross@amsl.com:
changes to support consensus status.
- Legacy-Id: 8387
Note: SVN reference [8301] has been migrated to Git commit feec6899be
This commit is contained in:
parent
15c716ada8
commit
90fa82476b
|
@ -6,6 +6,7 @@ import datetime
|
|||
import types
|
||||
from email.utils import parseaddr
|
||||
|
||||
from ietf.doc.models import ConsensusDocEvent
|
||||
from django import template
|
||||
from django.utils.html import escape, fix_ampersands
|
||||
from django.template.defaultfilters import truncatewords_html, linebreaksbr, stringfilter, urlize
|
||||
|
@ -498,3 +499,16 @@ def plural(text, seq, arg=u's'):
|
|||
def ics_esc(text):
|
||||
text = re.sub(r"([\n,;\\])", r"\\\1", text)
|
||||
return text
|
||||
|
||||
@register.filter
|
||||
def consensus(doc):
|
||||
"""Returns document consensus Yes/No/Unknown."""
|
||||
event = doc.latest_event(ConsensusDocEvent,type="changed_consensus")
|
||||
if event:
|
||||
if event.consensus:
|
||||
return "Yes"
|
||||
else:
|
||||
return "No"
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{% extends "telechat/base_telechat.html" %}
|
||||
{% load ietf_filters %}
|
||||
|
||||
{% block breadcrumbs %}{{ block.super }}
|
||||
» {{ date }}
|
||||
|
@ -20,6 +21,7 @@
|
|||
{% if conflictdoc %}References: <a href="{{ conflictdoc.get_absolute_url }}">{{ conflictdoc }}</a><br />{% endif %}
|
||||
<a href="#writeup">Ballot Writeup</a><br />
|
||||
Token: {{ document.ad.name }}<br />
|
||||
{% if document.type_id == "draft" %}Consensus: {{ document|consensus }}<br />{% endif %}
|
||||
Number of Open Positions: {{ open_positions }}<br />
|
||||
<br />
|
||||
<div>
|
||||
|
|
|
@ -41,6 +41,7 @@ Some parts Copyright (c) 2009 The IETF Trust, all rights reserved.
|
|||
<i>({{ doc.title }})</i><br>
|
||||
<b>
|
||||
Intended status: {{ doc.intended_std_level }}<br>
|
||||
Consensus: <a href="{% url "doc_edit_consensus" name=doc.name %}">{{ doc|consensus }}</a><br>
|
||||
Token: {{ doc.ad.plain_name }}<br>
|
||||
{% if doc.type_id == "draft" %}
|
||||
Last call ends: {{ doc.most_recent_ietflc.expires.date|default:"(none)" }}
|
||||
|
|
Loading…
Reference in a new issue