From edcaf46138f992e9a4a4b4cb22295dc2efd15776 Mon Sep 17 00:00:00 2001
From: Robert Sparks <rjsparks@nostrum.com>
Date: Wed, 13 May 2015 18:00:09 +0000
Subject: [PATCH] Color agenda/documents rows with position taken when viewing
 as an AD. Fixes bug #1679. Commit ready for merge.  - Legacy-Id: 9637

---
 ietf/templates/doc/search/search_result_row.html | 9 ++++++++-
 ietf/templates/iesg/agenda_documents.html        | 2 +-
 static/css/ietf.css                              | 7 +++++++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/ietf/templates/doc/search/search_result_row.html b/ietf/templates/doc/search/search_result_row.html
index b7a33705c..1c5a38ff2 100644
--- a/ietf/templates/doc/search/search_result_row.html
+++ b/ietf/templates/doc/search/search_result_row.html
@@ -1,8 +1,15 @@
 {# Copyright The IETF Trust 2015, All Rights Reserved #}{% load origin %}{% origin %}
 {% load widget_tweaks %}
 {% load ietf_filters %}
+{% load ballot_icon %}
 
-<tr>
+<tr {% spaceless %}
+    {% if color_row_positions %}
+      {% with doc|ballotposition:user as pos %}
+          {% if pos %}class="position-{{pos.slug}}-row"{% endif %}
+      {% endwith %}
+    {% endif %}
+    {% endspaceless %}>
 
   <td>
     {% if user.is_authenticated %}
diff --git a/ietf/templates/iesg/agenda_documents.html b/ietf/templates/iesg/agenda_documents.html
index 7d8ad6cd2..c4989feb2 100644
--- a/ietf/templates/iesg/agenda_documents.html
+++ b/ietf/templates/iesg/agenda_documents.html
@@ -60,7 +60,7 @@
           </thead>
           <tbody>
             {% for doc in section.docs %}
-              {% include "doc/search/search_result_row.html" %}
+              {% include "doc/search/search_result_row.html" with color_row_positions=True %}
             {% endfor %}
           </tbody>
         </table>
diff --git a/static/css/ietf.css b/static/css/ietf.css
index 84a193dc8..3c098abc6 100644
--- a/static/css/ietf.css
+++ b/static/css/ietf.css
@@ -125,6 +125,13 @@ label.required:after { content: "\2217"; color: #a94442; font-weight: bold; }
 .position-abstain  { background-color: #f69f74; } /* @brand-warning */
 .position-recuse   { background-color: #808080; }
 .position-norecord { background-color: inherit; }
+.position-discuss-row,
+.position-block-row    { background-color: #F1CBC8 !important ; } /* lighter variants of above */
+.position-yes-row      { background-color: #E1FDD6 !important ; }
+.position-noobj-row    { background-color: #F2FCEE !important ; }
+.position-abstain-row  { background-color: #FAD0BB !important ; }
+.position-recuse-row   { background-color: #D9D9D9 !important ; }
+.position-norecord-row { background-color: inherit; }
 .ballot-icon table td { border: 1px solid #ddd; height: 10px; width: 8px; }
 .ballot-icon table .my { border: 2px solid #000;}
 .ballot-icon table { margin: 0 0 10px 10px; }