Skip to content
Snippets Groups Projects
Unverified Commit 71f8c5e3 authored by gmurtaza00's avatar gmurtaza00 Committed by GitHub
Browse files

feature: show review count as fraction (#3300)


Visual enhancement of Reviews column in All submission table. Adds a
slash between completed reviews and assigned reviewers.

Closes #3299

---------

Co-authored-by: default avatarChris Zubak-Skees <chriszs@gmail.com>
parent d5ffdca6
No related branches found
No related tags found
2 merge requests!18Fix application form submit button remaining disabled (#3483),!13Merge in v4.1.1
...@@ -132,7 +132,7 @@ class LabeledCheckboxColumn(tables.CheckBoxColumn): ...@@ -132,7 +132,7 @@ class LabeledCheckboxColumn(tables.CheckBoxColumn):
class BaseAdminSubmissionsTable(SubmissionsTable): class BaseAdminSubmissionsTable(SubmissionsTable):
lead = tables.Column(order_by=('lead__full_name',)) lead = tables.Column(order_by=('lead__full_name',))
reviews_stats = tables.TemplateColumn(template_name='funds/tables/column_reviews.html', verbose_name=mark_safe("Reviews<div>Assgn.\tComp.</div>"), orderable=False) reviews_stats = tables.TemplateColumn(template_name='funds/tables/column_reviews.html', verbose_name=mark_safe("Reviews<div>Comp. <span class=\"counts-separator\">/</span> Assgn.</div>"), orderable=False)
screening_status = tables.Column(verbose_name=_('Screening'), accessor='screening_statuses') screening_status = tables.Column(verbose_name=_('Screening'), accessor='screening_statuses')
class Meta(SubmissionsTable.Meta): class Meta(SubmissionsTable.Meta):
......
...@@ -3,13 +3,16 @@ ...@@ -3,13 +3,16 @@
<table class="reviews-summary"> <table class="reviews-summary">
<tr class="reviews-summary__tr"> <tr class="reviews-summary__tr">
<td class="reviews-summary__td"> <td class="reviews-summary__td">
{% if record.stage.has_external_review %} <div class="reviews-summary__td-width">
{{ record.review_count|default:'0' }} {{ record.review_submitted_count|default:'0' }}
{% else %} <span class="counts-separator">/</span>
{{ record.review_staff_count|default:'0' }} {% if record.stage.has_external_review %}
{% endif %} {{ record.review_count|default:'0' }}
{% else %}
{{ record.review_staff_count|default:'0' }}
{% endif %}
</div>
</td> </td>
<td class="reviews-summary__td">{{ record.review_submitted_count|default:'0' }}</td>
<td class="reviews-summary__td">{{ record.review_recommendation|traffic_light }}</td> <td class="reviews-summary__td">{{ record.review_recommendation|traffic_light }}</td>
</tr> </tr>
</table> </table>
...@@ -29,7 +29,7 @@ def traffic_light(value): ...@@ -29,7 +29,7 @@ def traffic_light(value):
try: try:
return mark_safe(TRAFFIC_LIGHT_TEMPLATE.format(**TRAFFIC_LIGHT_COLORS[value])) return mark_safe(TRAFFIC_LIGHT_TEMPLATE.format(**TRAFFIC_LIGHT_COLORS[value]))
except KeyError: except KeyError:
return '-' return ''
@register.filter @register.filter
......
...@@ -14,5 +14,14 @@ ...@@ -14,5 +14,14 @@
&__td { &__td {
padding: 10px; padding: 10px;
vertical-align: middle; vertical-align: middle;
text-align: center;
} }
&__td-width {
width: max-content;
}
}
.counts-separator {
color: $color--mid-grey;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment