Added an extra highlight to the ballot_icon box when the viewer holds a blocking position in that ballot. Fixes . Commit ready for merge.

- Legacy-Id: 12385
This commit is contained in:
Robert Sparks 2016-11-18 04:52:13 +00:00
parent 4e7d077b16
commit 3c63fdb800
2 changed files with 18 additions and 2 deletions
ietf
doc/templatetags
static/ietf/css

View file

@ -32,6 +32,8 @@
import datetime
import debug # pyflakes: ignore
from django import template
from django.core.urlresolvers import reverse as urlreverse
from django.db.models import Q
@ -91,10 +93,19 @@ def ballot_icon(context, doc):
if has_role(user, "Area Director"):
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))
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="IESG positions (click to show more)" class="ballot-icon"><table>' % (
my_blocking = False
for i, (ad, pos) in enumerate(positions):
if user_is_person(user,ad) and pos and pos.pos.blocking:
my_blocking = True
break
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="IESG positions (click to show more)" class="ballot-icon"><table' % (
right_click_string,
urlreverse("ietf.doc.views_doc.ballot_popup", kwargs=dict(name=doc.name, ballot_id=ballot.pk)),
ballot.pk)]
ballot.pk,)]
if my_blocking:
res.append(' class="is-blocking" ')
res.append('>')
res.append("<tr>")

View file

@ -149,6 +149,11 @@ label.required:after { content: "\2217"; color: #a94442; font-weight: bold; }
.ballot-icon table .my { border: 2px solid #000;}
.ballot-icon table { margin: 0 0 10px 10px; }
.is-blocking { box-shadow: 0 0 8px 8px #dc0d12;
padding: 3px 0px 3px 3px;
margin: 5px 1px 3px 0px;
border: 1px solid #dc0d12;
}
/* Style the right-hand page navigation affix used on some pages. */