Skip to content

Commit 08ed369

Browse files
committed
IESG ballot grid icon: show 'abstain' as yellow instead of gray
- Legacy-Id: 2001
1 parent a4cc886 commit 08ed369

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

ietf/idrfc/templatetags/ballot_icon.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def render_ballot_icon(context, doc):
5757
adId = get_user_adid(context)
5858
red = 0
5959
green = 0
60+
yellow = 0
6061
gray = 0
6162
blank = 0
6263
my = None
@@ -67,18 +68,20 @@ def render_ballot_icon(context, doc):
6768
green = green + 1
6869
elif (p['pos'].discuss > 0):
6970
red = red + 1
70-
elif (p['pos'].recuse > 0) or (p['pos'].abstain > 0):
71+
elif (p['pos'].abstain > 0):
72+
yellow = yellow + 1
73+
elif (p['pos'].recuse > 0):
7174
gray = gray + 1
7275
else:
7376
blank = blank + 1
7477
if adId and (p['ad'].id == adId):
7578
my = position_to_string(p['pos'])
7679
if doc.is_rfc_wrapper:
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)+"-->"
80+
return render_ballot_icon2("rfc"+str(doc.rfc_number), doc.rfc_number, red,yellow,green,gray,blank, my, adId)+"<!-- adId="+str(adId)+" my="+str(my)+"-->"
7881
else:
79-
return render_ballot_icon2(doc.draft_name, doc.tracker_id, red,green,gray,blank,my,adId)+"<!-- adId="+str(adId)+" my="+str(my)+"-->"
82+
return render_ballot_icon2(doc.draft_name, doc.tracker_id, red,yellow,green,gray,blank, my, adId)+"<!-- adId="+str(adId)+" my="+str(my)+"-->"
8083

81-
def render_ballot_icon2(draft_name, tracker_id, red,green,gray,blank,my,adId):
84+
def render_ballot_icon2(draft_name, tracker_id, red,yellow,green,gray,blank, my,adId):
8285
if adId:
8386
res_cm = ' oncontextmenu="editBallot('+str(tracker_id)+');return false;"'
8487
else:
@@ -92,14 +95,18 @@ def render_ballot_icon2(draft_name, tracker_id, red,green,gray,blank,my,adId):
9295
c = "ballot_icon_red"
9396
red = red - 1
9497
myMark = (my == "Discuss")
98+
elif yellow > 0:
99+
c = "ballot_icon_yellow"
100+
yellow = yellow - 1
101+
myMark = (my == "Abstain")
95102
elif green > 0:
96103
c = "ballot_icon_green"
97104
green = green - 1
98105
myMark = (my == "Yes") or (my == "No Objection")
99106
elif gray > 0:
100107
c = "ballot_icon_gray"
101108
gray = gray - 1
102-
myMark = (my == "Abstain") or (my == "Recuse")
109+
myMark = (my == "Recuse")
103110
else:
104111
c = ""
105112
myMark = (y == 2) and (x == 4) and (my == "No Record")

ietf/templates/idrfc/doc_ballot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<p><span class="square" style="background:#80ff80;"></span><b>No Objection</b><br/>
5353
{% with ballot.get_no_objection as positions %}{% include "idrfc/doc_ballot_list.html" %}{% endwith %}</p>
5454

55-
<p><span class="square" style="background:#c0c0c0;"></span><b>Abstain</b><br/>
55+
<p><span class="square" style="background:#ffff00;"></span><b>Abstain</b><br/>
5656
{% with ballot.get_abstain as positions %}{% include "idrfc/doc_ballot_list.html" %}{% endwith %}</p>
5757

5858
<p><span class="square" style="background:#c0c0c0;"></span><b>Recuse</b><br/>

static/css/base2.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ table.ballot_icon td { border: 1px solid black; height: 7px; width: 6px; padding
109109
td.ballot_icon_green { background:#80ff80; }
110110
td.ballot_icon_red { background: #c00000; color: yellow; }
111111
td.ballot_icon_gray { background: #c0c0c0; }
112+
td.ballot_icon_yellow { background: #ffff00; }
112113
table.ballot_icon td.ballot_icon_my { border: 3px outset black;}
113114

114115
.ietf-highlight-y { padding:0 2px;background:yellow;font-size:85%;}

0 commit comments

Comments
 (0)