Skip to content

Commit b2e5873

Browse files
committed
Better explain ballot positions from former area dirctors. Fixes ietf-tools#3228. Branch ready for merge.
- Legacy-Id: 19200
1 parent 59df273 commit b2e5873

2 files changed

Lines changed: 82 additions & 50 deletions

File tree

ietf/doc/views_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ def document_ballot_content(request, doc, ballot_id, editable=True):
10751075
summary = needed_ballot_positions(doc, [p for p in positions if not p.is_old_pos])
10761076

10771077
text_positions = [p for p in positions if p.discuss or p.comment]
1078-
text_positions.sort(key=lambda p: (p.is_old_pos, p.balloter.plain_name()))
1078+
text_positions.sort(key=lambda p: (p.is_old_pos, p.balloter.last_name()))
10791079

10801080
ballot_open = not BallotDocEvent.objects.filter(doc=doc,
10811081
type__in=("closed_ballot", "created_ballot"),

ietf/templates/doc/document_ballot_content.html

Lines changed: 81 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
{% for n, positions in position_groups %}
99
<h4><span class="label label-{{ n|pos_to_label }}"> {{ n.name }}</span></h4>
10-
{% for p in positions|dictsort:"balloter.last_name" %}
10+
{% for p in positions %}
1111
<div class="balloter-name">
1212
{% if p.is_old_pos %}<span class="text-muted">({% endif %}{% if p.comment or p.discuss %}<a href="#{{ p.balloter.plain_name|slugify }}">{% endif %}{{ p.balloter.plain_name }}{% if p.comment or p.discuss %}</a>{% endif %}{% if p.is_old_pos %})</span>{% endif %}
1313
</div>
@@ -24,9 +24,7 @@ <h4><span class="label label-{{ n|pos_to_label }}"> {{ n.name }}</span></h4>
2424
<li class="disabled"><span><b>Ballots</b></span></li>
2525
{% for b in all_ballots %}
2626
<li {% if b == ballot %}class="active"{% endif %}>
27-
<a href="{% url "ietf.doc.views_doc.document_ballot" name=doc.name ballot_id=b.pk %}">
28-
{{ b.ballot_type.name }} ({{ b.rev }})
29-
</a>
27+
<a href="{% url "ietf.doc.views_doc.document_ballot" name=doc.name ballot_id=b.pk %}">{{ b.ballot_type.name }} ({{ b.rev }})</a>
3028
</li>
3129
{% endfor %}
3230
</ul>
@@ -73,59 +71,93 @@ <h4><span class="label label-{{ n|pos_to_label }}"> {{ n.name }}</span></h4>
7371
{% endif %}
7472

7573
{% for n, positions in position_groups %}
76-
{% for p in positions|dictsort:"balloter.last_name" %}
77-
<h4 class="anchor-target" id="{{ p.balloter.plain_name|slugify }}">
78-
{% if p.is_old_pos %}<span class="text-muted">({% endif %}{{ p.balloter.plain_name }}{% if p.is_old_pos %})</span>{% endif %}
79-
<span class="pull-right">
80-
{% if p.old_positions %}
81-
<span class="text-muted small">(was {{ p.old_positions|join:", " }})</span>
82-
{% endif %}
83-
<span class="label label-{{ p.pos|pos_to_label }}">{{p.pos}}</span>
84-
{% if user|has_role:"Secretariat" %}
85-
<a href="{% url "ietf.doc.views_ballot.edit_position" name=doc.name ballot_id=ballot.pk %}?balloter={{ p.balloter.pk }}" title="Click to edit the position of {{ p.balloter.plain_name }}" class="btn btn-default btn-xs">
86-
Edit</a>
87-
{% endif %}
74+
{% for p in positions %}
75+
{% if not p.is_old_pos %}
76+
<h4 class="anchor-target" id="{{ p.balloter.plain_name|slugify }}">{{ p.balloter.plain_name }}
77+
<span class="pull-right"><span class="label label-{{ p.pos|pos_to_label }}">{{p.pos}}</span>
78+
{% if user|has_role:"Secretariat" %}
79+
<a href="{% url "ietf.doc.views_ballot.edit_position" name=doc.name ballot_id=ballot.pk %}?balloter={{ p.balloter.pk }}" title="Click to edit the position of {{ p.balloter.plain_name }}" class="btn btn-default btn-xs">Edit</a>
80+
{% endif %}
8881
</span>
89-
</h4>
90-
91-
{% if p.pos.blocking and p.discuss %}
92-
<div class="panel panel-danger">
93-
<div class="panel-heading">
94-
<h5 class="panel-title">
95-
<b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev}}{% endif %})
96-
{% if p.send_email %}
97-
<span class="fa fa-envelope-o pull-right" title="Email requested to be sent for this discuss"></span>
98-
{% elif p.any_email_sent == True %}
99-
<span class="fa fa-envelope pull-right" title="Email requested to be sent for earlier discuss"></span>
100-
{% elif p.any_email_sent == False %}
101-
<span class="fa fa-comment-o pull-right" title="No email send requests for this discuss"></span>
102-
{% else %}
103-
<span class="fa fa-comment-o pull-right" title="No email send requests for this discuss"></span>
82+
</h4>
83+
{% if p.pos.blocking and p.discuss %}
84+
<div class="panel panel-danger">
85+
<div class="panel-heading">
86+
<h5 class="panel-title"><b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev }}{% endif %})
87+
{% if p.send_email %}
88+
<span class="fa fa-envelope-o pull-right" title="Email requested to be sent for this discuss"></span>
89+
{% elif p.any_email_sent == True %}
90+
<span class="fa fa-envelope pull-right" title="Email requested to be sent for earlier discuss"></span>
91+
{% elif p.any_email_sent == False %}
92+
<span class="fa fa-comment-o pull-right" title="No email send requests for this discuss"></span>
93+
{% else %}
94+
<span class="fa fa-comment-o pull-right" title="No email send requests for this discuss"></span>
95+
{% endif %}
96+
</h5>
97+
</div>
98+
<div class="panel-body"><pre class="ballot pasted">{{ p.discuss|linkify }}</pre></div>
99+
</div>
100+
{% endif %}
104101

105-
{% endif %}
106-
</h5>
102+
{% if p.comment %}
103+
<div class="panel panel-{{ p.pos|pos_to_label }}">
104+
<div class="panel-heading">
105+
<h5 class="panel-title"><b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev }}{% endif %})
106+
{% if p.send_email %}
107+
<span class="fa fa-envelope-o pull-right" title="Email requested to be sent for this comment"></span>
108+
{% elif p.any_email_sent == True %}
109+
<span class="fa fa-envelope pull-right" title="Email requested to be sent for earlier comment"></span>
110+
{% elif p.any_email_sent == False %}
111+
<span class="fa fa-comment-o pull-right" title="No email send requests for this comment"></span>
112+
{% else %}
113+
<div class="pull-right small italic" style="margin-top: -0.3em;" title="No ballot position send log available">No email<br/>send info</div>
114+
{% endif %}
115+
</h5>
116+
</div>
117+
<div class="panel-body"><pre class="ballot pasted">{{ p.comment|linkify }}</pre></div>
107118
</div>
108-
<div class="panel-body"><pre class="ballot pasted">{{ p.discuss|linkify }}</pre></div>
109-
</div>
119+
{% endif %}
110120
{% endif %}
121+
{% endfor %}
122+
{% endfor %}
111123

112-
{% if p.comment %}
124+
{% for n, positions in position_groups %}
125+
{% for p in positions %}
126+
{% if p.is_old_pos %}
127+
<h4 class="anchor-target" id="{{ p.balloter.plain_name|slugify }}">
128+
<span class="text-muted">({{ p.balloter.plain_name }}; former steering group member)</span>
129+
<span class="pull-right">
130+
{% if p.old_positions %}<span class="text-muted small">(was {{ p.old_positions|join:", " }})</span>{% endif %}
131+
<span class="label label-{{ p.pos|pos_to_label }}">{{p.pos}}</span>
132+
{% if user|has_role:"Secretariat" %}
133+
<a href="{% url "ietf.doc.views_ballot.edit_position" name=doc.name ballot_id=ballot.pk %}?balloter={{ p.balloter.pk }}" title="Click to edit the position of {{ p.balloter.plain_name }}" class="btn btn-default btn-xs">Edit</a>
134+
{% endif %}
135+
</span>
136+
</h4>
113137
<div class="panel panel-{{ p.pos|pos_to_label }}">
114138
<div class="panel-heading">
115-
<h5 class="panel-title">
116-
<b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev}}{% endif %})
117-
{% if p.send_email %}
118-
<span class="fa fa-envelope-o pull-right" title="Email requested to be sent for this comment"></span>
119-
{% elif p.any_email_sent == True %}
120-
<span class="fa fa-envelope pull-right" title="Email requested to be sent for earlier comment"></span>
121-
{% elif p.any_email_sent == False %}
122-
<span class="fa fa-comment-o pull-right" title="No email send requests for this comment"></span>
123-
{% else %}
124-
<div class="pull-right small italic" style="margin-top: -0.3em;" title="No ballot position send log available">No email<br/>send info</div>
125-
{% endif %}
126-
</h5>
139+
<h5 class="panel-title"><b>{{ p.pos.name }} </b>
140+
{% if p.pos.blocking and p.discuss %}
141+
<b>[Treat as non-blocking comment]</b> ({{ p.discuss_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev }}{% endif %})
142+
{% else %}
143+
({{ p.comment_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev }}{% endif %})
144+
{% endif %}
145+
{% if p.send_email %}
146+
<span class="fa fa-envelope-o pull-right" title="Email requested to be sent for this ballot position"></span>
147+
{% elif p.any_email_sent == True %}
148+
<span class="fa fa-envelope pull-right" title="Email requested to be sent for earlier ballot position"></span>
149+
{% elif p.any_email_sent == False %}
150+
<span class="fa fa-comment-o pull-right" title="No email send requests for this ballot position"></span>
151+
{% else %}
152+
<div class="pull-right small italic" style="margin-top: -0.3em;" title="No ballot position send log available">No email<br/>send info</div>
153+
{% endif %}
154+
</h5>
127155
</div>
128-
<div class="panel-body"><pre class="ballot pasted">{{ p.comment|linkify }}</pre></div>
156+
{% if p.pos.blocking and p.discuss %}
157+
<div class="panel-body"><pre class="ballot pasted">{{ p.discuss|linkify }}</pre></div>
158+
{% else %}
159+
<div class="panel-body"><pre class="ballot pasted">{{ p.comment|linkify }}</pre></div>
160+
{% endif %}
129161
</div>
130162
{% endif %}
131163
{% endfor %}

0 commit comments

Comments
 (0)