Skip to content

Commit b00824a

Browse files
committed
Merged in [12385] from rjsparks@nostrum.com:
Added an extra highlight to the ballot_icon box when the viewer holds a blocking position in that ballot. Fixes ietf-tools#2046. - Legacy-Id: 12388 Note: SVN reference [12385] has been migrated to Git commit 3c63fdb
2 parents 7cb2194 + 3c63fdb commit b00824a

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

ietf/doc/templatetags/ballot_icon.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
import datetime
3434

35+
import debug # pyflakes:ignore
36+
3537
from django import template
3638
from django.core.urlresolvers import reverse as urlreverse
3739
from django.db.models import Q
@@ -91,10 +93,19 @@ def sort_key(t):
9193
if has_role(user, "Area Director"):
9294
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))
9395

94-
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="IESG positions (click to show more)" class="ballot-icon"><table>' % (
96+
my_blocking = False
97+
for i, (ad, pos) in enumerate(positions):
98+
if user_is_person(user,ad) and pos and pos.pos.blocking:
99+
my_blocking = True
100+
break
101+
102+
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="IESG positions (click to show more)" class="ballot-icon"><table' % (
95103
right_click_string,
96104
urlreverse("ietf.doc.views_doc.ballot_popup", kwargs=dict(name=doc.name, ballot_id=ballot.pk)),
97-
ballot.pk)]
105+
ballot.pk,)]
106+
if my_blocking:
107+
res.append(' class="is-blocking" ')
108+
res.append('>')
98109

99110
res.append("<tr>")
100111

ietf/static/ietf/css/ietf.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ label.required:after { content: "\2217"; color: #a94442; font-weight: bold; }
149149
.ballot-icon table .my { border: 2px solid #000;}
150150
.ballot-icon table { margin: 0 0 10px 10px; }
151151

152+
.is-blocking { box-shadow: 0 0 8px 8px #dc0d12;
153+
padding: 3px 0px 3px 3px;
154+
margin: 5px 1px 3px 0px;
155+
border: 1px solid #dc0d12;
156+
}
152157

153158
/* Style the right-hand page navigation affix used on some pages. */
154159

0 commit comments

Comments
 (0)