Skip to content

Commit 635b700

Browse files
committed
Allow an AD to jump straight to the ballot editing page by right-clicking any ballot grid. Fixes ietf-tools#1669. Commit ready for merge.
- Legacy-Id: 9518
1 parent 58dabb6 commit 635b700

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ietf/doc/templatetags/ballot_icon.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ def sort_key(t):
8787
positions = list(doc.active_ballot().active_ad_positions().items())
8888
positions.sort(key=sort_key)
8989

90-
res = ['<a href="%s" data-toggle="modal" data-target="#modal-%d" title="IESG positions (click to show more)" class="ballot-icon"><table>' % (
90+
right_click_string = ''
91+
if has_role(user, "Area Director"):
92+
right_click_string = 'oncontextmenu="window.location.href=\'%s\';return false;"' % urlreverse('ietf.doc.views_ballot.edit_position', kwargs=dict(name=doc.name, ballot_id=ballot.pk))
93+
94+
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="IESG positions (click to show more)" class="ballot-icon"><table>' % (
95+
right_click_string,
9196
urlreverse("ietf.doc.views_doc.ballot_popup", kwargs=dict(name=doc.name, ballot_id=ballot.pk)),
9297
ballot.pk)]
9398

0 commit comments

Comments
 (0)