Skip to content

Commit 5d97058

Browse files
committed
Applied ballot popup patch from olau@iola.dk.
- Legacy-Id: 4629
1 parent bc53278 commit 5d97058

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

ietf/idrfc/templatetags/ballot_icon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def render_ballot_icon(user, doc):
7272
if not ballot:
7373
return ""
7474

75-
edit_position_url = urlreverse('doc_edit_position', kwargs=dict(name=doc.name, ballot_id=ballot.pk))
75+
edit_position_url = urlreverse('ietf.idrfc.views_ballot.edit_position', kwargs=dict(name=doc.name, ballot_id=ballot.pk))
7676

7777
def sort_key(t):
7878
_, pos = t

ietf/idrfc/testurlREDESIGN.list

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
200 /doc/draft-ietf-avt-rtp-atrac-family/
88
200 /doc/draft-ietf-avt-rtp-atrac-family/doc.json
99
200 /doc/draft-ietf-avt-rtp-atrac-family/ballot.json
10-
200 /doc/draft-ietf-avt-rtp-atrac-family/_ballot.data
10+
200 /doc/draft-ietf-avt-rtp-atrac-family/ballotpopup/
1111

1212
# replaced draft, never went to IESG
1313
200 /doc/draft-eronen-mobike-mopo/
1414
404 /doc/draft-eronen-mobike-mopo/ballot.json
15-
404 /doc/draft-eronen-mobike-mopo/_ballot.data
15+
404 /doc/draft-eronen-mobike-mopo/ballotpopup/
1616

1717
# expired draft
1818
200 /doc/draft-eronen-eap-sim-aka-80211/
@@ -21,25 +21,25 @@
2121
200 /doc/rfc4739/
2222
200 /doc/rfc4739/doc.json
2323
200 /doc/rfc4739/ballot.json # has ballot from I-D
24-
200 /doc/rfc4739/_ballot.data
24+
200 /doc/rfc4739/ballotpopup/
2525

2626
# RFC that's evaluated in IESG
2727
200 /doc/rfc3852/
2828
200 /doc/rfc3852/doc.json
2929
200 /doc/rfc3852/ballot.json
30-
200 /doc/rfc3852/_ballot.data
30+
200 /doc/rfc3852/ballotpopup/
3131

3232
# old RFC
3333
200 /doc/rfc822/
3434
200 /doc/rfc822/doc.json
3535

3636
# ballot sets
3737
200 /doc/rfc3550/ballot.json
38-
200 /doc/rfc3550/_ballot.data
38+
200 /doc/rfc3550/ballotpopup/
3939
200 /doc/rfc3551/ballot.json
40-
200 /doc/rfc3551/_ballot.data
40+
200 /doc/rfc3551/ballotpopup/
4141
200 /doc/draft-irtf-dtnrg-ltp/ballot.json
42-
200 /doc/draft-irtf-dtnrg-ltp/_ballot.data
42+
200 /doc/draft-irtf-dtnrg-ltp/ballotpopup/
4343

4444
# file formats
4545
200 /doc/rfc9/ # PDF only
@@ -59,10 +59,10 @@
5959

6060
# ballot exists, but it's not issued
6161
404 /doc/draft-ietf-aaa-diameter-api/ballot.json
62-
404 /doc/draft-ietf-aaa-diameter-api/_ballot.data
62+
404 /doc/draft-ietf-aaa-diameter-api/ballotpopup/
6363
# ballot does not exist
6464
404 /doc/draft-zeilenga-cldap/ballot.json
65-
404 /doc/draft-zeilenga-cldap/_ballot.data
65+
404 /doc/draft-zeilenga-cldap/ballotpopup/
6666
# comment with created_by=999
6767
200 /doc/draft-ietf-l3vpn-2547bis-mcast-bgp/
6868
# comment with created_by=0 (and no idinternal entry)

ietf/idrfc/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
url(r'^(?P<name>[A-Za-z0-9._+-]+)/ballot/(?P<ballot_id>[0-9]+)/$', views_doc.document_ballot, name="doc_ballot"),
5151
url(r'^(?P<name>[A-Za-z0-9._+-]+)/ballot/$', views_doc.document_ballot, name="doc_ballot"),
5252
(r'^(?P<name>[A-Za-z0-9._+-]+)/doc.json$', views_doc.document_debug),
53-
(r'^(?P<name>[A-Za-z0-9._+-]+)/_ballot.data$', views_doc.ballot_html), # why is this url so weird instead of just ballot.html?
53+
(r'^(?P<name>[A-Za-z0-9._+-]+)/ballotpopup/$', views_doc.ballot_for_popup),
5454
(r'^(?P<name>[A-Za-z0-9._+-]+)/ballot.tsv$', views_doc.ballot_tsv),
5555
(r'^(?P<name>[A-Za-z0-9._+-]+)/ballot.json$', views_doc.ballot_json),
5656

ietf/idrfc/views_doc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,9 @@ def get_ballot(name):
574574

575575
return (bw, dw, b, d)
576576

577-
def ballot_html(request, name):
578-
bw, dw, ballot, doc = get_ballot(name)
579-
return render_to_response('idrfc/doc_ballot.html', {'bw':bw, 'dw':dw, 'ballot':ballot, 'doc':doc}, context_instance=RequestContext(request))
577+
def ballot_for_popup(request, name):
578+
doc = get_object_or_404(Document, docalias__name=name)
579+
return HttpResponse(document_ballot_content(request, doc, ballot_id=None, editable=False))
580580

581581
def ballot_tsv(request, name):
582582
ballot, doc, b, d = get_ballot(name)

ietf/templates/idrfc/document_ballot_content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div class="position-group">
2626
<div class="heading"><span class="square position-{{ n.slug }}"></span> {{ n.name }}</div>
2727
{% for p in positions %}
28-
<div>{% if p.old_ad %}[{% endif %}<a{% if user|has_role:"Secretariat" %} href="{% url idrfc.views_ballot.edit_position name=doc.name,ballot_id=ballot.pk %}?ad={{ p.ad.pk }}" title="Click to edit the position of {{ p.ad.plain_name }}"{% endif %}>{{ p.ad.plain_name }}</a>{% if p.old_ad %}]{% endif %}{% if p.comment_text or p.discuss_text %}&nbsp;<a href="#{{ p.ad.plain_name|slugify }}"><img src="/images/comment.png" width="14" height="12" alt="*" border="0"/></a>{% endif %}</div>
28+
<div>{% if p.old_ad %}[{% endif %}<a{% if user|has_role:"Secretariat" %} href="{% url idrfc.views_ballot.edit_position name=doc.name,ballot_id=ballot.pk %}?ad={{ p.ad.pk }}" title="Click to edit the position of {{ p.ad.plain_name }}"{% endif %}>{{ p.ad.plain_name }}</a>{% if p.old_ad %}]{% endif %}{% if p.comment or p.discuss %}&nbsp;<a href="#{{ p.ad.plain_name|slugify }}"><img src="/images/comment.png" width="14" height="12" alt="*" border="0"/></a>{% endif %}</div>
2929
{% if p.old_positions %}<div class="was">(was {{ p.old_positions|join:", " }})</div>{% endif %}
3030
{% empty %}
3131
<i>none</i>

0 commit comments

Comments
 (0)