Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwood committed Dec 12, 2024
1 parent 14bb49e commit 1438d1b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ <h4>{{category}}</h4>
</tr>
</thead>
<tbody>
{# using regroup here would be good if we had dictionaries #}
{% for message, json_location, spreadsheet_location in quality_accuracy_checks %}
{% if message.category == category %}
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ <h4>{{category}}</h4>
{% for message, json_location, spreadsheet_location in usefulness_checks %}
{% if message.category == category %}
<tr>
<td><i class="material-icons table--false" style="color: {% if message.percentage < 0.5 %}orange {% elif message.percentage < 0.1 %}yellow{% else %}hsl(var(--red-hsl), 1){% endif %}">close</i></td>
<td>
<div style="border-radius: 3px; background-color: hsl(var(--teal-dark-hsl), 1); width:100%; height:20px; min-width:90px">
<div style="border-radius: 3px; background-color: hsl(var(--red-hsl), 1); height: 20px; width: {{message.percentage|multiply:100}}%; min-width:5px"></div>
</div>
</td>
<td>
<strong>{{ message.heading }}</strong><br /><br />{{ message.message }}
</td>
Expand Down
5 changes: 5 additions & 0 deletions cove/cove_360/templatetags/cove_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ def cove_360_modal_errors(**context):
@register.inclusion_tag("cove_360/modal_list.html")
def cove_360_modal_list(**context):
return cove_modal_list(**context)


@register.filter("multiply")
def multiply(a, b):
return a*b

0 comments on commit 1438d1b

Please sign in to comment.