Skip to content

Commit 6dd8086

Browse files
committed
Merged [4724] from rbarnes@bbn.com:
Adjusted the scribe template to make it XHTML compliant and fix what Robert broke - Legacy-Id: 4730 Note: SVN reference [4724] has been migrated to Git commit 08c1c0c
2 parents c7c4679 + 08c1c0c commit 6dd8086

4 files changed

Lines changed: 115 additions & 65 deletions

File tree

ietf/doc/models.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,30 @@ def active_defer_event(self):
259259
return self.latest_event(type="changed_document", desc__startswith="State changed to <b>IESG Evaluation - Defer</b>")
260260
return None
261261

262+
def active_ballot(self):
263+
ballot = self.latest_event(BallotDocEvent, type="created_ballot")
264+
e = self.latest_event(BallotDocEvent, ballot_type__slug=ballot.ballot_type.slug) if ballot else None
265+
open = e and not e.type == "closed_ballot"
266+
return ballot.ballot_type if open else None
267+
268+
def active_ballot_positions(self):
269+
"""Return dict mapping each active AD to a current ballot position (or None if they haven't voted)."""
270+
active_ads = list(Person.objects.filter(role__name="ad", role__group__state="active"))
271+
res = {}
272+
273+
ballot = self.latest_event(BallotDocEvent, type="created_ballot")
274+
positions = BallotPositionDocEvent.objects.filter(doc=self, type="changed_ballot_position", ad__in=active_ads, ballot=ballot).select_related('ad', 'pos').order_by("-time", "-id")
275+
276+
for pos in positions:
277+
if pos.ad not in res:
278+
res[pos.ad] = pos
279+
280+
for ad in active_ads:
281+
if ad not in res:
282+
res[ad] = None
283+
284+
return res.values()
285+
262286
def displayname_with_link(self):
263287
return '<a href="%s">%s-%s</a>' % (self.get_absolute_url(), self.name , self.rev)
264288

ietf/templates/iesg/scribe_doc.html

Lines changed: 62 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -32,45 +32,68 @@
3232
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
{% endcomment %}{% comment %}
3434
Some parts Copyright (c) 2009 The IETF Trust, all rights reserved.
35-
{% endcomment %}{% load ietf_filters %}
36-
{% if title2_first %}{% if title1_first %}<p><b>{{ title1 }}</b></p>{% endif %}
37-
<p><b>{{ title2 }}</b></p>
38-
{% endif %}<p><b>{{ title3 }}</b></p>
35+
{% endcomment %}
36+
{% load ietf_filters %}
37+
{% if title2_first %}
38+
{% if title1_first %}
39+
<p><b>{{ title1 }}</b></p>
40+
{% endif %}
41+
<p><b>{{ title2 }}</b></p>
42+
{% endif %}<p><b>{{ title3 }}</b></p>
43+
44+
<ul>
45+
{% for doc in section_docs %}
46+
<li>
47+
{{ doc.obj.title|escape }} ({{ doc.obj.intended_std_level }})
48+
<br/><a href="{% url doc_view name=doc.obj.canonical_name %}">{{doc.obj.canonical_name}}</a>
49+
{% with doc.obj.rfc_number as rfc_number %}
50+
{% if rfc_number %}
51+
<a href="http://www.rfc-editor.org/rfc/rfc{{rfc_number}}/">[txt]</a>
52+
{% else %}
53+
<a href="http://www.ietf.org/id/{{doc.obj.canonical_name}}-{{doc.obj.rev}}.txt">[txt]</a>
54+
{% endif %}
55+
{% endwith %}
56+
<br/>Token: {{ doc.obj.ad|escape }} ({{doc.obj.area_acronym}} area)
57+
{% if doc.obj.note %}{# note: note is not escaped #}
58+
<br/>Note: {{ doc.obj.note|safe }}
59+
{% endif %}
60+
{% for ipr in doc.obj.ipr %}
61+
{% ifequal ipr.ipr.status 1 %}
62+
<br/>IPR: <a href="http://datatracker.ietf.org/ipr/{{ ipr.ipr.ipr_id }}/">{{ ipr.ipr.title|escape }}</a>
63+
{% endifequal %}
64+
{% endfor %}
65+
{% if doc.obj.active_ballot %}
66+
<br/><b>Discusses/comments</b> <a href="http://datatracker.ietf.org/idtracker/ballot/{{doc.obj.canonical_name}}/">[ballot]</a>:
67+
<ul>
68+
{% for p in doc.obj.active_ballot_positions %}
69+
{% if p.pos %}
70+
{% if p.discuss %}
71+
<li>
72+
<a href="#{{doc.obj.name}}+{{p.ad|slugify}}+discuss">{{ p.ad }}: Discuss [{{ p.discuss_time }}]</a>:
73+
<br/>{{ p.discuss }}
74+
</li>
75+
{% endif %}
76+
{% if p.comment %}
77+
<li>
78+
<a href="#{{doc.obj.name}}+{{p.ad|slugify}}+comment">{{ p.ad }}: Comment [{{ p.comment_time }}]</a>:
79+
<br/>{{ p.comment }}
80+
</li>
81+
{% endif %}
82+
{% endif %}
83+
{% endfor %}
84+
</ul>
85+
{% endif %}
3986

40-
<ol>
41-
{% for doc in section_docs %}
42-
<li>{{ doc.obj.document.title|escape }} ({{ doc.obj.document.intended_status }}){% if doc.obj.rfc_flag %}
43-
<br><a href="http://tools.ietf.org/html/rfc{{doc.obj.document.rfc_number }}">{{ doc.obj.document.filename }}</a>
44-
{% else %}
45-
<br><a href="http://tools.ietf.org/html/{{doc.obj.document.filename}}-{{doc.obj.document.revision}}.html">{{doc.obj.document.filename}}-{{doc.obj.document.revision}}</a>
46-
{% endif %} <br>Token: {{ doc.obj.token_name|escape }}
47-
{% if doc.obj.note %}{# note: note is not escaped #} <br>Note: {{ doc.obj.note|safe }}
48-
{% endif %}{% for ipr in doc.obj.draft.ipr.all %}{% ifequal ipr.ipr.status 1 %} <br>IPR: <a href="http://datatracker.ietf.org/ipr/{{ ipr.ipr.ipr_id }}/">{{ ipr.ipr.title|escape }}</a>{% endifequal %}
49-
{% endfor %} {% if doc.obj.ballot.active %}<br><b>Discusses/comments</b> (from <a href="http://datatracker.ietf.org/idtracker/ballot/{{ doc.obj.ballot.ballot}}/">ballot {{doc.obj.ballot.ballot }})</a>:
50-
<ol>
51-
{% if USE_DB_REDESIGN_PROXY_CLASSES %}
52-
{% for p in doc.obj.active_positions|dictsort:"ad.last_name" %}{% if p.pos %}{% ifequal p.pos.pos_id "discuss" %}<li><a href="#{{doc.obj.document.filename}}+{{p.pos.ad|slugify}}+discuss">{{ p.pos.ad.plain_name }}: Discuss [{{ p.pos.discuss_time.date }}]</a>:
53-
<br>...
54-
{% endifequal %}{% if p.pos.comment %} <li><a href="#{{doc.obj.document.filename}}+{{p.ad.plain_name|slugify}}+comment">{{ p.pos.ad.plain_name }}: Comment [{{ p.pos.comment_time.date }}]</a>:
55-
<br>...
56-
{% endif %}{% endif %}{% endfor %}
57-
{% else %}
58-
{% for position in doc.obj.ballot.positions.all|dictsort:"ad.last_name" %}{% ifequal position.discuss 1 %} <li><a href="#{{doc.obj.document.filename}}+{{position.ad|slugify}}+discuss">{{ position.ad }}:{% for item in doc.obj.ballot.discusses.all %}{% ifequal position.ad item.ad %} Discuss [{{ item.date }}]</a>:
59-
<br>...
60-
{% endifequal %}{% endfor %}{% endifequal %}{% for item in doc.obj.ballot.comments.all %}{% ifequal position.ad item.ad %} <li><a href="#{{doc.obj.document.filename}}+{{position.ad|slugify}}+comment">{{ position.ad }}: Comment [{{ item.date }}]</a>:
61-
<br>...
62-
{% endifequal %}{% endfor %}{% endfor %}
63-
{% endif%}
64-
</ol>
65-
{%endif %} <p><b>Telechat</b>:
66-
<ul>
67-
<li>...
68-
<li>...
69-
<li>...
70-
<li>...
71-
<li>...
72-
</ul><p>
87+
<p><b>Telechat:</b></p>
88+
<ul>
89+
<li>...</li>
90+
<li>...</li>
91+
<li>...</li>
92+
<li>...</li>
93+
<li>...</li>
94+
</ul>
95+
</li>
7396
{% empty %}
74-
<li>(none)</li>
97+
<li>(none)</li>
7598
{% endfor %}
76-
</ol>
99+
</ul>

ietf/templates/iesg/scribe_doc2.html

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,28 @@
3232
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
-->{% endcomment %}{% comment %}
3434
Some parts Copyright (c) 2009 The IETF Trust, all rights reserved.
35-
{% endcomment %}{% load ietf_filters %}
35+
{% endcomment %}
36+
{% load ietf_filters %}
3637

3738
<!-- ============================================================ -->
38-
<p><b>{{ doc.obj.document.filename }}</b></p>
39-
{% if doc.obj.ballot.active %}
40-
<ol>
41-
{% for p in doc.obj.active_positions|dictsort:"ad.last_name" %}
42-
43-
{% if p.pos and p.pos.pos_id == "discuss" %}
44-
<li><a name="{{doc.obj.document.filename}}+{{p.ad.plain_name|slugify}}+discuss">{{ p.ad.plain_name }}</a>: Discuss [{{ p.pos.discuss_time|date:"Y-m-d" }}]:<br>
45-
<pre>{{ p.pos.orig.discuss|wrap_text:80|escape }}</pre>
46-
</li>
47-
{% endif %}
48-
49-
{% if p.pos and p.pos.comment %}
50-
<li><a name="{{doc.obj.document.filename}}+{{p.ad.plain_name|slugify}}+comment">{{ p.ad.plain_name }}</a>: Comment [{{ p.pos.comment_time|date:"Y-m-d" }}]:<br>
51-
<pre>{{ p.pos.comment|wrap_text:80|escape }}</pre>
52-
</li>
53-
{% endif %}
54-
{% endfor %}
55-
56-
</ol>
57-
39+
<p><b>{{ doc.obj.name }}</b></p>
40+
41+
{% if doc.obj.active_ballot %}
42+
<ul>
43+
{% for p in doc.obj.active_ballot_positions %}
44+
{% if p.pos and p.discuss %}
45+
<li>
46+
<a name="{{doc.obj.name}}+{{p.ad|slugify}}+discuss">{{ p.ad }}: Discuss [{{ p.discuss_time }}]</a>:
47+
<br/>{{ p.discuss }}
48+
</li>
49+
{% endif %}
50+
51+
{% if p.pos and p.comment %}
52+
<li>
53+
<a name="{{doc.obj.name}}+{{p.ad|slugify}}+comment">{{ p.ad }}: Comment [{{ p.comment_time }}]</a>:
54+
<br/>{{ p.comment }}
55+
</li>
56+
{% endif %}
57+
{% endfor %}
58+
</ul>
5859
{% endif%}

ietf/templates/iesg/scribe_template.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
{% endcomment %}{% comment %}
3434
Some parts Copyright (c) 2009 The IETF Trust, all rights reserved.
35-
{% endcomment %}<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
36-
<html>
35+
{% endcomment %}<!DOCTYPE html
36+
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
37+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
38+
<html xmlns="http://www.w3.org/1999/xhtml">
3739
<head>
38-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
39-
<title></title>
40+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
41+
<title>IESG Agenda - Scribe Template</title>
4042
</head>
4143
<body>
4244
{% load ietf_filters %}{% filter compress_empty_lines %}
@@ -46,7 +48,7 @@ <h1>Scribe template for IESG Narrative Minutes, {{date}}</h1>
4648
{% include "iesg/agenda_outline_23.html" %}
4749
{% endwith %}
4850

49-
<hr>
51+
<hr/>
5052
<h2>Appendix: Snapshot of discusses/comments</h2>
5153

5254
<p>(at {% now "Y-m-d H:i:s T" %})</p>

0 commit comments

Comments
 (0)