Skip to content

Commit d125521

Browse files
committed
Right-click ballot icon to edit your position (when logged in as IESG)
- Legacy-Id: 1934
1 parent 0527dde commit d125521

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

ietf/idrfc/templatetags/ballot_icon.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,16 @@ def render_ballot_icon(context, doc):
7474
if adId and (p['ad'].id == adId):
7575
my = position_to_string(p['pos'])
7676
if doc.is_rfc_wrapper:
77-
return render_ballot_icon2("rfc"+str(doc.rfc_number), doc.rfc_number, red,green,gray,blank,my)+"<!-- adId="+str(adId)+" my="+str(my)+"-->"
77+
return render_ballot_icon2("rfc"+str(doc.rfc_number), doc.rfc_number, red,green,gray,blank,my,adId)+"<!-- adId="+str(adId)+" my="+str(my)+"-->"
7878
else:
79-
return render_ballot_icon2(doc.draft_name, doc.tracker_id, red,green,gray,blank,my)+"<!-- adId="+str(adId)+" my="+str(my)+"-->"
79+
return render_ballot_icon2(doc.draft_name, doc.tracker_id, red,green,gray,blank,my,adId)+"<!-- adId="+str(adId)+" my="+str(my)+"-->"
8080

81-
def render_ballot_icon2(draft_name, tracker_id, red,green,gray,blank,my):
82-
res = '<table class="ballot_icon" title="IESG Evaluation Record (click to show more)" onclick="showBallot(\'' + draft_name + '\',' + str(tracker_id) + ')">'
81+
def render_ballot_icon2(draft_name, tracker_id, red,green,gray,blank,my,adId):
82+
if adId:
83+
res_cm = ' oncontextmenu="editBallot('+str(tracker_id)+');return false;"'
84+
else:
85+
res_cm = ''
86+
res = '<table class="ballot_icon" title="IESG Evaluation Record (click to show more)" onclick="showBallot(\'' + draft_name + '\',' + str(tracker_id) + ')"'+res_cm+'>'
8387
for y in range(3):
8488
res = res + "<tr>"
8589
for x in range(5):

static/js/base.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,6 @@ function showBallot(draftName, trackerId) {
7373
argument: null
7474
}, null);
7575
}
76-
76+
function editBallot(trackerId) {
77+
window.open("https://datatracker.ietf.org/cgi-bin/idtracker.cgi?command=open_ballot&id_document_tag="+trackerId);
78+
}

0 commit comments

Comments
 (0)