Only show new consensus field for IETF and IRTF stream documents

- Legacy-Id: 4876
This commit is contained in:
Ole Laursen 2012-09-21 10:23:45 +00:00
parent 915908c203
commit e9c6c9e347
3 changed files with 16 additions and 11 deletions

View file

@ -410,8 +410,9 @@ def document_json(request, name):
data["iana_review_state"] = extract_name(doc.get_state("draft-iana-review"))
data["iana_action_state"] = extract_name(doc.get_state("draft-iana-action"))
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
data["consensus"] = e.consensus if e else None
if doc.stream_id in ("ietf", "irtf"):
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
data["consensus"] = e.consensus if e else None
data["stream"] = extract_name(doc.stream)
return HttpResponse(json.dumps(data, indent=2), mimetype='text/plain')
@ -473,9 +474,11 @@ def document_main_idrfc(request, name, tab):
info['rfc_editor_state'] = id.get_state("draft-rfceditor")
info['iana_review_state'] = id.get_state("draft-iana-review")
info['iana_action_state'] = id.get_state("draft-iana-action")
e = id.latest_event(ConsensusDocEvent, type="changed_consensus")
info["consensus"] = nice_consensus(e and e.consensus)
info["can_edit_consensus"] = can_edit_consensus(id, request.user)
info["consensus"] = None
if id.stream_id in ("ietf", "irtf"):
e = id.latest_event(ConsensusDocEvent, type="changed_consensus")
info["consensus"] = nice_consensus(e and e.consensus)
info["can_edit_consensus"] = can_edit_consensus(id, request.user)
info["can_edit_intended_std_level"] = can_edit_intended_std_level(id, request.user)
(content1, content2) = _get_html(

View file

@ -141,7 +141,6 @@ def get_doc_section(id):
def get_doc_sectionREDESIGN(doc):
if doc.type_id == 'draft':
states = [16,17,18,19,20,21]
if doc.intended_std_level_id in ["bcp", "ds", "ps", "std"]:
s = "2"
else:
@ -154,7 +153,7 @@ def get_doc_sectionREDESIGN(doc):
s = s + "3"
else:
s = s + "2"
if not doc.get_state_slug=="rfc" and doc.get_state('draft-iesg').order not in states:
if not doc.get_state_slug=="rfc" and doc.get_state_slug('draft-iesg') not in ("lc", "writeupw", "goaheadw", "iesg-eva", "defer"):
s = s + "3"
elif doc.returning_item():
s = s + "2"
@ -214,10 +213,11 @@ def agenda_docs(date, next_agenda):
if e:
doc.lastcall_expires = e.expires
doc.consensus = "Unknown"
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
if e:
doc.consensus = "Yes" if e.consensus else "No"
if doc.stream_id in ("ietf", "irtf"):
doc.consensus = "Unknown"
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
if e:
doc.consensus = "Yes" if e.consensus else "No"
docmatches.append(doc)

View file

@ -116,7 +116,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% endif %}
<tr><td>Document shepherd:</td><td>{{ stream_info.shepherd|default:"" }}</td></tr>
{% if info.consensus %}
<tr><td>Consensus:</td><td><a title="Whether the document is the result of a community consensus process as defined in RFC 5741" {% if info.can_edit_consensus %}class="editlink" href="{% url doc_edit_consensus name=doc.draft_name %}"{% endif %}>{{ info.consensus }}</a></td></tr>
{% endif %}
<tr><td colspan='2'><hr size='1' noshade /></td></tr>