From 3c63fdb8004ead57b27595a5545785d152e498fd Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Fri, 18 Nov 2016 04:52:13 +0000 Subject: [PATCH] Added an extra highlight to the ballot_icon box when the viewer holds a blocking position in that ballot. Fixes #2046. Commit ready for merge. - Legacy-Id: 12385 --- ietf/doc/templatetags/ballot_icon.py | 15 +++++++++++++-- ietf/static/ietf/css/ietf.css | 5 +++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ietf/doc/templatetags/ballot_icon.py b/ietf/doc/templatetags/ballot_icon.py index 2d229213e..e1b644a49 100644 --- a/ietf/doc/templatetags/ballot_icon.py +++ b/ietf/doc/templatetags/ballot_icon.py @@ -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 = ['' % ( + 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 = ['') res.append("") diff --git a/ietf/static/ietf/css/ietf.css b/ietf/static/ietf/css/ietf.css index cfa55a5bb..45295bf8c 100644 --- a/ietf/static/ietf/css/ietf.css +++ b/ietf/static/ietf/css/ietf.css @@ -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. */