From 7fe830292a31fb757c048e5840c0a37a68cb8c1e Mon Sep 17 00:00:00 2001
From: Chris Lawton <chris.lawton@torchbox.com>
Date: Fri, 22 Feb 2019 16:42:59 +0000
Subject: [PATCH] add agree/disagree table dropdown styles

---
 .../funds/templates/funds/tables/table.html   | 16 ++++++--
 .../src/sass/apply/components/_list.scss      | 39 +++++++++++++++++++
 2 files changed, 51 insertions(+), 4 deletions(-)

diff --git a/opentech/apply/funds/templates/funds/tables/table.html b/opentech/apply/funds/templates/funds/tables/table.html
index 3111c4aef..6a5b6179c 100644
--- a/opentech/apply/funds/templates/funds/tables/table.html
+++ b/opentech/apply/funds/templates/funds/tables/table.html
@@ -40,10 +40,18 @@
                                         <span class="list__item list__item--reviewer-outcome">{{ review.get_recommendation_display }}</span>
                                     </li>
                                     {% for opinion in review.opinions.all %}
-                                    <li class="list__item list__item--reviewer">
-                                        <span class="list__item--reviewer-name">{{ opinion.author }}</span>
-                                        <span class="list__item list__item--reviewer-outcome">{{ opinion.get_opinion_display }}</span>
-                                    </li>
+                                        {% if forloop.first %}
+                                            <ul class="list list--opinion">
+                                        {% endif %}
+
+                                            <li class="list__item list__item--reviewer list__item--opinion">
+                                                <span class="list__item--reviewer-name">{{ opinion.author }}</span>
+                                                <span class="list__item list__item--reviewer-outcome {{ opinion.get_opinion_display|lower }}">{{ opinion.get_opinion_display }}</span>
+                                            </li>
+
+                                        {% if forloop.last %}
+                                            </ul>
+                                        {% endif %}
                                     {% endfor %}
                                 {% endfor %}
                             </ul>
diff --git a/opentech/static_src/src/sass/apply/components/_list.scss b/opentech/static_src/src/sass/apply/components/_list.scss
index 630a571bb..8b1f94a63 100644
--- a/opentech/static_src/src/sass/apply/components/_list.scss
+++ b/opentech/static_src/src/sass/apply/components/_list.scss
@@ -5,6 +5,36 @@
         margin: 0;
     }
 
+    &--opinion {
+        position: relative;
+        font-size: 14px;
+        border-top: 1px solid $color--mid-grey;
+        border-bottom: 1px solid $color--mid-grey;
+        margin: 10px 0;
+        padding: 5px 0;
+        max-width: 150px;
+
+        #{$root}__item--opinion:first-child {
+            span:last-child {
+                &::before,
+                &::after {
+                    position: absolute;
+                    top: -15px;
+                    right: 5px;
+                }
+
+                &::after {
+                    @include triangle(top, $color--mist, 6px);
+                    top: -13px;
+                }
+
+                &::before {
+                    @include triangle(top, $color--mid-grey, 6px);
+                }
+            }
+        }
+    }
+
     &__item {
         &--reviewer {
             display: flex;
@@ -30,10 +60,19 @@
                     text-align: right;
                 }
             }
+
+            #{$root}__item--opinion & {
+                font-weight: $weight--normal;
+            }
         }
 
         &--reviewer-outcome {
             color: $color--tomato;
+            position: relative;
+
+            &.agree {
+                color: $color--green;
+            }
         }
     }
 }
-- 
GitLab