diff --git a/opentech/apply/funds/tables.py b/opentech/apply/funds/tables.py index 3ff94a270b514153d2d4265a81d6e64764e66e26..1497755a9dc5d6ad35c2f14c0075c818932eaf5b 100644 --- a/opentech/apply/funds/tables.py +++ b/opentech/apply/funds/tables.py @@ -3,6 +3,7 @@ import textwrap from django import forms from django.contrib.auth import get_user_model from django.db.models import OuterRef, Subquery, F, Q +from django.utils.html import format_html from django.utils.text import mark_safe, slugify import django_filters as filters @@ -54,7 +55,7 @@ class SubmissionsTable(tables.Table): return value.get_full_name() def render_phase(self, value): - return mark_safe(f'<span>{ value }</span>') + return format_html('<span>{}</span>', value) def render_comments(self, value): request = self.context['request'] @@ -80,6 +81,9 @@ class AdminSubmissionsTable(SubmissionsTable): fields = ('title', 'phase', 'stage', 'page', 'round', 'lead', 'submit_time', 'last_update', 'reviews_stats') # type: ignore sequence = fields + ('comments',) + def render_lead(self, value): + return format_html('<span>{}</span>', value) + def get_used_rounds(request): return Round.objects.filter(submissions__isnull=False).distinct() diff --git a/opentech/apply/funds/templates/funds/includes/review_table_row.html b/opentech/apply/funds/templates/funds/includes/review_table_row.html index 5db9d45072c92696b5d5844a60bb4dcb04fbd4fc..18b05f47d4f41642624e0b0f7a62a125b01d2572 100644 --- a/opentech/apply/funds/templates/funds/includes/review_table_row.html +++ b/opentech/apply/funds/templates/funds/includes/review_table_row.html @@ -1,7 +1,7 @@ {% for review in reviews %} <tr class="tr--subchild {{ class }} {% if missing %}no-response{% endif %}"> {% if missing %} - <td colspan="2">{{ review }}</td> + <td class="reviews-sidebar__author" colspan="2"><span>{{ review }}</span></td> <td>-</td> <td>-</td> {% else %} diff --git a/opentech/static_src/src/sass/apply/components/_list.scss b/opentech/static_src/src/sass/apply/components/_list.scss index d08c258b7cc111cfef066bf81049173c7ed5b394..630a571bb0878ee57e5e670cb5270a66a73ab44b 100644 --- a/opentech/static_src/src/sass/apply/components/_list.scss +++ b/opentech/static_src/src/sass/apply/components/_list.scss @@ -23,7 +23,7 @@ position: absolute; max-width: initial; overflow: visible; - background-color: #f3fafe; + background-color: $color--mist; + #{$root}__item--reviewer-outcome { width: 100%; diff --git a/opentech/static_src/src/sass/apply/components/_table.scss b/opentech/static_src/src/sass/apply/components/_table.scss index 898e0b0389ec4976702d17295a98d9d4cf57e126..b757c6239b46d52d8ec5ea9f31a2ac1814f293d4 100644 --- a/opentech/static_src/src/sass/apply/components/_table.scss +++ b/opentech/static_src/src/sass/apply/components/_table.scss @@ -33,6 +33,12 @@ table { &.is-expanded { border-bottom: 1px solid $color--light-mid-grey; + + .lead { + span { + background-color: $color--mist; + } + } } &:hover { @@ -53,6 +59,24 @@ table { display: table-cell; width: initial; } + + &.lead { + span { + position: relative; + z-index: 1; + display: block; + padding-right: 5px; + overflow: hidden; + text-overflow: ellipsis; + background: $color--white; + + &:hover { + display: inline-block; + overflow: visible; + } + } + + } } }