Skip to content

Commit 28e0f98

Browse files
committed
Merged [2412], [2413] and [2480] from rjsparks@nostrum.com, from log:sprint/78/rjs@2480. Splits the ballot writeups page into three pages, for a more understandable user interface.
- Legacy-Id: 2517 Note: SVN reference [2412] has been migrated to Git commit f87a937 Note: SVN reference [2413] has been migrated to Git commit 6835826 Note: SVN reference [2480] has been migrated to Git commit ec80763
1 parent 02b8e54 commit 28e0f98

8 files changed

Lines changed: 231 additions & 27 deletions

File tree

ietf/idrfc/tests.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ class BallotWriteupsTestCase(django.test.TestCase):
526526

527527
def test_edit_last_call_text(self):
528528
draft = InternetDraft.objects.get(filename="draft-ietf-mipshop-pfmipv6")
529-
url = urlreverse('doc_ballot_writeups', kwargs=dict(name=draft.filename))
529+
url = urlreverse('doc_ballot_lastcall', kwargs=dict(name=draft.filename))
530530
login_testing_unauthorized(self, "klm", url)
531531

532532
# normal get
@@ -563,7 +563,7 @@ def test_edit_last_call_text(self):
563563

564564
def test_request_last_call(self):
565565
draft = InternetDraft.objects.get(filename="draft-ietf-mipshop-pfmipv6")
566-
url = urlreverse('doc_ballot_writeups', kwargs=dict(name=draft.filename))
566+
url = urlreverse('doc_ballot_lastcall', kwargs=dict(name=draft.filename))
567567
login_testing_unauthorized(self, "klm", url)
568568

569569
mailbox_before = len(mail_outbox)
@@ -580,7 +580,7 @@ def test_request_last_call(self):
580580

581581
def test_edit_ballot_writeup(self):
582582
draft = InternetDraft.objects.get(filename="draft-ietf-mipshop-pfmipv6")
583-
url = urlreverse('doc_ballot_writeups', kwargs=dict(name=draft.filename))
583+
url = urlreverse('doc_ballot_writeupnotes', kwargs=dict(name=draft.filename))
584584
login_testing_unauthorized(self, "klm", url)
585585

586586
# normal get
@@ -600,7 +600,7 @@ def test_edit_ballot_writeup(self):
600600

601601
def test_issue_ballot(self):
602602
draft = InternetDraft.objects.get(filename="draft-ietf-mipshop-pfmipv6")
603-
url = urlreverse('doc_ballot_writeups', kwargs=dict(name=draft.filename))
603+
url = urlreverse('doc_ballot_writeupnotes', kwargs=dict(name=draft.filename))
604604
login_testing_unauthorized(self, "rhousley", url)
605605

606606
draft.idinternal.ballot.ballot_issued = False
@@ -635,7 +635,7 @@ def test_issue_ballot(self):
635635

636636
def test_edit_approval_text(self):
637637
draft = InternetDraft.objects.get(filename="draft-ietf-mipshop-pfmipv6")
638-
url = urlreverse('doc_ballot_writeups', kwargs=dict(name=draft.filename))
638+
url = urlreverse('doc_ballot_approvaltext', kwargs=dict(name=draft.filename))
639639
login_testing_unauthorized(self, "klm", url)
640640

641641
# normal get

ietf/idrfc/urls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
url(r'^(?P<name>[^/]+)/edit/deferballot/$', views_ballot.defer_ballot, name='doc_defer_ballot'),
5656
url(r'^(?P<name>[^/]+)/edit/undeferballot/$', views_ballot.undefer_ballot, name='doc_undefer_ballot'),
5757
url(r'^(?P<name>[^/]+)/edit/sendballotcomment/$', views_ballot.send_ballot_comment, name='doc_send_ballot_comment'),
58-
url(r'^(?P<name>[^/]+)/edit/ballotwriteups/$', views_ballot.ballot_writeups, name='doc_ballot_writeups'),
58+
url(r'^(?P<name>[^/]+)/edit/lastcalltext/$', views_ballot.lastcalltext, name='doc_ballot_lastcall'),
59+
url(r'^(?P<name>[^/]+)/edit/ballotwriteupnotes/$', views_ballot.ballot_writeupnotes, name='doc_ballot_writeupnotes'),
60+
url(r'^(?P<name>[^/]+)/edit/approvaltext/$', views_ballot.ballot_approvaltext, name='doc_ballot_approvaltext'),
5961
url(r'^(?P<name>[^/]+)/edit/approveballot/$', views_ballot.approve_ballot, name='doc_approve_ballot'),
6062
url(r'^(?P<name>[^/]+)/edit/makelastcall/$', views_ballot.make_last_call, name='doc_make_last_call'),
6163
)

ietf/idrfc/views_ballot.py

Lines changed: 72 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ def clean_approval_text(self):
311311
return self.cleaned_data["approval_text"].replace("\r", "")
312312

313313
@group_required('Area_Director','Secretariat')
314-
def ballot_writeups(request, name):
315-
"""Editing of ballot write-ups, sending last calls, ..."""
314+
def lastcalltext(request, name):
315+
"""Editing of the last call text"""
316316
doc = get_object_or_404(InternetDraft, filename=name)
317317
if not doc.idinternal:
318318
raise Http404()
@@ -325,8 +325,6 @@ def ballot_writeups(request, name):
325325
ballot = generate_ballot(request, doc)
326326

327327
last_call_form = LastCallTextForm(instance=ballot)
328-
ballot_writeup_form = BallotWriteupForm(instance=ballot)
329-
approval_text_form = ApprovalTextForm(instance=ballot)
330328

331329
if request.method == 'POST':
332330
if "save_last_call_text" in request.POST or "send_last_call_request" in request.POST:
@@ -356,6 +354,43 @@ def ballot_writeups(request, name):
356354
# make sure form has the updated text
357355
last_call_form = LastCallTextForm(instance=ballot)
358356

357+
doc.idinternal.event_date = date.today()
358+
doc.idinternal.save()
359+
360+
can_request_last_call = doc.idinternal.cur_state_id < 27
361+
can_make_last_call = doc.idinternal.cur_state_id < 20
362+
can_announce = doc.idinternal.cur_state_id > 19
363+
docs_with_invalid_status = [d.document().file_tag() for d in doc.idinternal.ballot_set() if "None" in d.document().intended_status.intended_status or "Request" in d.document().intended_status.intended_status]
364+
need_intended_status = ", ".join(docs_with_invalid_status)
365+
366+
return render_to_response('idrfc/ballot_lastcalltext.html',
367+
dict(doc=doc,
368+
ballot=ballot,
369+
last_call_form=last_call_form,
370+
can_request_last_call=can_request_last_call,
371+
can_make_last_call=can_make_last_call,
372+
need_intended_status=need_intended_status,
373+
),
374+
context_instance=RequestContext(request))
375+
376+
@group_required('Area_Director','Secretariat')
377+
def ballot_writeupnotes(request, name):
378+
"""Editing of ballot write-up and notes"""
379+
doc = get_object_or_404(InternetDraft, filename=name)
380+
if not doc.idinternal:
381+
raise Http404()
382+
383+
login = IESGLogin.objects.get(login_name=request.user.username)
384+
385+
try:
386+
ballot = doc.idinternal.ballot
387+
except BallotInfo.DoesNotExist:
388+
ballot = generate_ballot(request, doc)
389+
390+
ballot_writeup_form = BallotWriteupForm(instance=ballot)
391+
392+
if request.method == 'POST':
393+
359394
if "save_ballot_writeup" in request.POST:
360395
ballot_writeup_form = BallotWriteupForm(request.POST, instance=ballot)
361396
if ballot_writeup_form.is_valid():
@@ -398,6 +433,38 @@ def ballot_writeups(request, name):
398433
context_instance=RequestContext(request))
399434

400435

436+
doc.idinternal.event_date = date.today()
437+
doc.idinternal.save()
438+
439+
docs_with_invalid_status = [d.document().file_tag() for d in doc.idinternal.ballot_set() if "None" in d.document().intended_status.intended_status or "Request" in d.document().intended_status.intended_status]
440+
need_intended_status = ", ".join(docs_with_invalid_status)
441+
442+
return render_to_response('idrfc/ballot_writeupnotes.html',
443+
dict(doc=doc,
444+
ballot=ballot,
445+
ballot_writeup_form=ballot_writeup_form,
446+
need_intended_status=need_intended_status,
447+
),
448+
context_instance=RequestContext(request))
449+
450+
@group_required('Area_Director','Secretariat')
451+
def ballot_approvaltext(request, name):
452+
"""Editing of approval text"""
453+
doc = get_object_or_404(InternetDraft, filename=name)
454+
if not doc.idinternal:
455+
raise Http404()
456+
457+
login = IESGLogin.objects.get(login_name=request.user.username)
458+
459+
try:
460+
ballot = doc.idinternal.ballot
461+
except BallotInfo.DoesNotExist:
462+
ballot = generate_ballot(request, doc)
463+
464+
approval_text_form = ApprovalTextForm(instance=ballot)
465+
466+
if request.method == 'POST':
467+
401468
if "save_approval_text" in request.POST:
402469
approval_text_form = ApprovalTextForm(request.POST, instance=ballot)
403470
if approval_text_form.is_valid():
@@ -414,20 +481,14 @@ def ballot_writeups(request, name):
414481
doc.idinternal.event_date = date.today()
415482
doc.idinternal.save()
416483

417-
can_request_last_call = doc.idinternal.cur_state_id < 27
418-
can_make_last_call = doc.idinternal.cur_state_id < 20
419484
can_announce = doc.idinternal.cur_state_id > 19
420485
docs_with_invalid_status = [d.document().file_tag() for d in doc.idinternal.ballot_set() if "None" in d.document().intended_status.intended_status or "Request" in d.document().intended_status.intended_status]
421486
need_intended_status = ", ".join(docs_with_invalid_status)
422487

423-
return render_to_response('idrfc/ballot_writeups.html',
488+
return render_to_response('idrfc/ballot_approvaltext.html',
424489
dict(doc=doc,
425490
ballot=ballot,
426-
last_call_form=last_call_form,
427-
ballot_writeup_form=ballot_writeup_form,
428491
approval_text_form=approval_text_form,
429-
can_request_last_call=can_request_last_call,
430-
can_make_last_call=can_make_last_call,
431492
can_announce=can_announce,
432493
need_intended_status=need_intended_status,
433494
),
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}Approval announcement writeup for {{ doc }}{% endblock %}
4+
5+
{% block morecss %}
6+
form #id_approval_text {
7+
width: 700px;
8+
height: 600px;
9+
}
10+
{% endblock %}
11+
12+
{% block content %}
13+
<h1>Approval announcement writeup for {{ doc }}</h1>
14+
15+
<form action="" method="POST">
16+
17+
<p>Sent after approval.</p>
18+
19+
{{ approval_text_form.approval_text }}
20+
21+
<div class="actions">
22+
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
23+
<input type="submit" name="save_approval_text" value="Save Approval Announcement Text" />
24+
<input type="submit" name="regenerate_approval_text" value="Regenerate Approval Announcement Text" />
25+
</div>
26+
</form>
27+
28+
{% load ietf_filters %}
29+
{% if user|in_group:"Secretariat" %}
30+
<p>
31+
{% if can_announce %}
32+
<a href="{% url doc_approve_ballot name=doc.filename %}">Approve ballot</a>
33+
{% endif %}
34+
</p>
35+
{% endif %}
36+
{% endblock%}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}Last Call text for {{ doc }}{% endblock %}
4+
5+
{% block morecss %}
6+
form #id_last_call_text {
7+
width: 700px;
8+
height: 600px;
9+
}
10+
{% endblock %}
11+
12+
{% block content %}
13+
<h1>Last Call text for {{ doc }}</h1>
14+
15+
<form action="" method="POST">
16+
17+
<p>{{ last_call_form.last_call_text.errors }}</p>
18+
19+
{{ last_call_form.last_call_text }}
20+
21+
<p>{{ last_call_form.last_call_text.errors }}</p>
22+
23+
{% if can_request_last_call and need_intended_status %}
24+
<p>You need to select intended status of {{ need_intended_status }} and regenerate last call text to request last call.</p>
25+
{% endif %}
26+
27+
<div class="actions">
28+
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
29+
<input type="submit" name="save_last_call_text" value="Save Last Call Text" />
30+
<input type="submit" name="regenerate_last_call_text" value="Regenerate Last Call Text" />
31+
{% if can_request_last_call and not need_intended_status %}
32+
<input style="margin-left: 8px" type="submit" name="send_last_call_request" value="Save and Request Last Call" />
33+
{% endif %}
34+
</div>
35+
</form>
36+
37+
{% load ietf_filters %}
38+
{% if user|in_group:"Secretariat" %}
39+
<p>
40+
{% if can_make_last_call %}
41+
<a href="{% url doc_make_last_call name=doc.filename %}">Make Last Call</a>
42+
{% endif %}
43+
44+
</p>
45+
{% endif %}
46+
{% endblock%}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}Ballot writeup and notes for {{ doc }}{% endblock %}
4+
5+
{% block morecss %}
6+
form #id_ballot_writeup {
7+
width: 700px;
8+
height: 600px;
9+
}
10+
{% endblock %}
11+
12+
{% block content %}
13+
<h1>Ballot writeup and notes for {{ doc }}</h1>
14+
15+
16+
<form action="" method="POST">
17+
18+
<p>(Technical Summary, Working Group Summary, Document Quality,
19+
Personnel, RFC Editor Note, IRTF Note, IESG Note, IANA Note)</p>
20+
21+
<p>This text will be appended to all announcements and messages to
22+
the IRTF or RFC Editor.</p>
23+
24+
{{ ballot_writeup_form.ballot_writeup }}
25+
26+
<div class="actions">
27+
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
28+
<input type="submit" name="save_ballot_writeup" value="Save Ballot Writeup" />
29+
<input style="margin-left: 8px" type="submit" name="issue_ballot" value="Save and {% if ballot.ballot_issued %}Re-{% endif %}Issue Ballot" />
30+
</div>
31+
</form>
32+
33+
34+
{% endblock%}

ietf/templates/idrfc/doc_main.html

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ <h1>{% block doc_h1 %}{% endblock %}</h1>
9595
<span id="doc_edit_state_button" class="yui-button yui-link-button" style="margin-left:2px;"><span class="first-child"><a href="{% url doc_change_state name=doc.draft_name %}">Change state</a></span></span>
9696

9797
<span id="doc_edit_info_button" class="yui-button yui-link-button" style="margin-left:2px;"><span class="first-child"><a href="{% url doc_edit_info name=doc.draft_name %}">Edit</a></span></span>
98-
{% if not doc.ietf_process_has_iesg_ballot %}
99-
<span id="doc_edit_info_button" class="yui-button yui-link-button" style="margin-left:2px;"><span class="first-child"><a href="{% url doc_ballot_writeups name=doc.draft_name %}">Ballot Writeups</a></span></span>
100-
{% endif %}
10198
{% else %}
10299
<span id="doc_add_button" class="yui-button yui-link-button" style="margin-left:2px;"><span class="first-child"><a href="{% url doc_edit_info name=doc.draft_name %}">Add</a></span></span>
103100
{% endif %}
@@ -133,20 +130,39 @@ <h1>{% block doc_h1 %}{% endblock %}</h1>
133130

134131
<div id="writeup">
135132
<div id="writeup_content">
133+
---- following is a DRAFT of message to be sent AFTER approval ---
136134
{% if doc.in_ietf_process and doc.ietf_process.has_iesg_ballot %}
137135
{% if user|in_group:"Area_Director,Secretariat" %}
138-
<div style="margin-bottom:8px;">
139-
<span id="doc_writeup_edit_button" class="yui-button yui-link-button"><span class="first-child">
140-
<a href="{% url doc_ballot_writeups name=doc.draft_name %}">Ballot write-ups</a>
141-
</span></span></div>
142-
{% endif %}{# user in_group #}
143-
---- following is a DRAFT of message to be sent AFTER approval ---
136+
<div style="background:#E0E0FF">
137+
<p align=right>
138+
<span id="doc_edit_announce_button" class="yui-button yui-link-button"><span class="first-child">
139+
<a href="{% url doc_ballot_approvaltext name=doc.draft_name %}">Edit Announcement Text</a>
140+
</span></span>
141+
</p>
142+
{% endif %}
143+
{% endif %}
144144
<pre>
145145
{{ doc.ietf_process.iesg_ballot.approval_text|escape|urlize }}
146146
</pre>
147+
{% if doc.in_ietf_process and doc.ietf_process.has_iesg_ballot %}
148+
{% if user|in_group:"Area_Director,Secretariat" %}
149+
</div>
150+
151+
<div style="background:#E0E0FF">
152+
<p align=right>
153+
<span id="doc_ballot_edit_button" class="yui-button yui-link-button"><span class="first-child">
154+
<a href="{% url doc_ballot_writeupnotes name=doc.draft_name %}">Edit Ballot Text</a>
155+
</span></span>
156+
</p>
157+
{% endif %}
158+
{% endif %}
147159
<pre>
148160
{{ doc.ietf_process.iesg_ballot.ballot_writeup|escape|urlize }}
149161
</pre>
162+
{% if doc.in_ietf_process and doc.ietf_process.has_iesg_ballot %}
163+
{% if user|in_group:"Area_Director,Secretariat" %}
164+
</div>
165+
{% endif %}
150166
{% endif %}
151167
</div>
152168
</div>

ietf/templates/idrfc/doc_main_id.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,20 @@
7676
{% endblock doc_metatable %}
7777

7878
{% block doc_metalinks %}
79-
<a href="mailto:{{doc.draft_name}}@tools.ietf.org?subject=Mail%20regarding%20{{doc.draft_name}}" rel="nofollow">Email Authors</a>
79+
<div>
80+
<a href="mailto:{{doc.draft_name}}@tools.ietf.org?subject=Mail%20regarding%20{{doc.draft_name}}" rel="nofollow">Email Authors</a>
8081
| <a href="/ipr/search/?option=document_search&amp;id_document_tag={{doc.tracker_id}}" rel="nofollow">IPR Disclosures</a>
8182
| <a href="http://www.fenron.net/~fenner/ietf/deps/index.cgi?dep={{doc.draft_name}}" rel="nofollow">Dependencies to this draft</a>
8283
| <a href="http://tools.ietf.org/idnits?url=http://tools.ietf.org/id/{{doc.draft_name_and_revision}}.txt" rel="nofollow" target="_blank">Check nits</a>
8384
{% if doc.in_ietf_process %}| <a href="/feed/comments/{% if info.is_rfc %}rfc{{doc.rfc_number}}{% else %}{{doc.draft_name}}{% endif %}/">Comments feed</a>{% endif %}
85+
</div>
86+
{% if user|in_group:"Area_Director,Secretariat" %}
87+
<div>
88+
<a href="{% url doc_ballot_lastcall name=doc.draft_name %}">Last Call Text</a>
89+
| <a href="{% url doc_ballot_writeupnotes name=doc.draft_name %}">Ballot Text</a>
90+
| <a href="{% url doc_ballot_approvaltext name=doc.draft_name %}">Announcement Text</a>
91+
</div>
92+
{% endif %}
8493
{% endblock %}
8594

8695
{% block doc_text1 %}

0 commit comments

Comments
 (0)