Skip to content

Commit

Permalink
Add downward references to telechat moderator package and Secretariat…
Browse files Browse the repository at this point in the history
… telechat pages. Commit ready for merge.

 - Legacy-Id: 16087
  • Loading branch information
russhousley committed Mar 23, 2019
1 parent 7224e06 commit 268b99b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ietf/iesg/views.py
Expand Up @@ -257,9 +257,11 @@ def leaf_section(num, section):
for num, s in sections:
if "2" <= num < "5" and "docs" in s and s["docs"]:
for i, d in enumerate(s["docs"], start=1):
downrefs = [rel for rel in d.relateddocument_set.all() if rel.is_downref() and not rel.is_approved_downref()]
flattened_sections.append((num, {
"title": s["title"] + " (%s of %s)" % (i, len(s["docs"])),
"doc": d,
"downrefs": downrefs,
"parents": s["parents"],
}))
else:
Expand Down
3 changes: 3 additions & 0 deletions ietf/secr/telechat/views.py
Expand Up @@ -202,6 +202,8 @@ def doc_detail(request, date, name):
tags = doc.tags.filter(slug__in=TELECHAT_TAGS)
tag = tags[0].pk if tags else None

downrefs = [rel for rel in doc.relateddocument_set.all() if rel.is_downref() and not rel.is_approved_downref()]

writeup = get_doc_writeup(doc)

initial_state = {'state':doc.get_state(state_type).pk,
Expand Down Expand Up @@ -304,6 +306,7 @@ def doc_detail(request, date, name):
'ballot_type': ballot_type,
'date': date,
'document': doc,
'downrefs': downrefs,
'conflictdoc': conflictdoc,
'agenda': agenda,
'formset': formset,
Expand Down
21 changes: 19 additions & 2 deletions ietf/secr/templates/telechat/doc.html
Expand Up @@ -21,7 +21,10 @@ <h3>{{ document.name }}-{{ document.rev }} ({{ document.intended_std_level }})</
{% 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 %}
{% if document.type_id == "draft" %}
Consensus: {{ document|consensus }}<br />
Has downref: {% if downrefs %}Yes{% else %}No{% endif %}<br />
{% endif %}
Number of Open Positions: {{ open_positions }}<br />
<br />
<div>
Expand Down Expand Up @@ -73,7 +76,21 @@ <h3>{{ document.name }}-{{ document.rev }} ({{ document.intended_std_level }})</
<pre>
{{ writeup }}
</pre>


{% if downrefs %}
<a name="downrefs"><h2>Downward References</h2></a>
{% for ref in downrefs %}
<p>Add {{ref.target.document.canonical_name}}
({{ref.target.document.std_level}} - {{ref.target.document.stream.desc}})
to downref registry.<br />
{% if not ref.target.document.std_level %}
+++ Warning: The standards level has not been set yet!!!<br />
{% endif %}
{% if not ref.target.document.stream %}
+++ Warning: document stream has not been set yet!!!<br />
{% endif %}
{% endfor %}</p>
{% endif %}

{% else %}
<h3>No Documents on the Agenda</h3>
Expand Down
19 changes: 19 additions & 0 deletions ietf/templates/iesg/moderator_doc.html
Expand Up @@ -43,6 +43,7 @@
<b>
Intended status: {{ doc.intended_std_level }}<br>
Consensus: <a href="{% url 'ietf.doc.views_draft.edit_consensus' name=doc.name %}">{{ doc|consensus }}</a><br>
Has downref: {% if downrefs %}Yes{% else %}No{% endif %}<br>
Token: {{ doc.ad.plain_name }}<br>
{% if doc.type_id == "draft" %}
Last call ends: {{ doc.most_recent_ietflc.expires.date|default:"(none)" }}
Expand Down Expand Up @@ -159,3 +160,21 @@
the Do Not Publish message to the RFC Editor that includes the note
drafted by[Name the AD].</p>
{% endif %}

{% if num|startswith:"2.1" or num|startswith:"2.2" %}
{% if downrefs %}
<p>If APPROVED - The Secretariat will add to the downref registry:<br>
{% for ref in downrefs %}
+ Add {{ref.target.document.canonical_name}}
({{ref.target.document.std_level}} - {{ref.target.document.stream.desc}})
to downref registry.<br>
{% if not ref.target.document.std_level %}
+++ Warning: The standards level has not been set yet!!!<br>
{% endif %}
{% if not ref.target.document.stream %}
+++ Warning: document stream has not been set yet!!!<br>
{% endif %}
{% endfor %}</p>
{% endif %}
{% endif %}

4 changes: 2 additions & 2 deletions ietf/templates/iesg/moderator_package.html
Expand Up @@ -97,11 +97,11 @@ <h3>{% for parent_num, parent_section in section.parents %}{{ parent_num }}{% if

{% if num >= "2" and num < "5" %}
{% if "doc" in section %}
{% with section.doc as doc %}
{% with section.doc as doc %}{% with section.downrefs as downrefs %}
{% if doc.type_id == "draft" or doc.type_id == "statchg" %}{% include "iesg/moderator_doc.html" %}{% endif %}
{% if doc.type_id == "conflrev" %}{% include "iesg/moderator_conflict_doc.html" %}{% endif %}
{% if doc.type_id == "charter" %}{% include "iesg/moderator_charter.html" %}{% endif %}
{% endwith %}
{% endwith %}{% endwith %}
{% else %}
<p>NONE</p>
{% endif %}
Expand Down

0 comments on commit 268b99b

Please sign in to comment.