Skip to content

Commit d2ec6b3

Browse files
committed
[Scorecards] Added percentage rings to council table
1 parent f148020 commit d2ec6b3

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

scoring/templates/scoring/council.html

+15-11
Original file line numberDiff line numberDiff line change
@@ -353,17 +353,21 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
353353
{% endfor %}
354354

355355
<td class="d-none d-md-table-cell top-tier-score border-bottom border-end">
356-
<a href="{% url 'scoring:question' answer.code %}?type={{ council.get_scoring_group.slug }}" class="mx-auto" style="text-transform: none">
357-
{{ answer.council_count }} out of {{ council_count }}
358-
</a>
359-
<span class="fs-8 mt-1 me-0 ms-auto d-block">
360-
{% include 'scoring/includes/scoring-group-name.html' with group=council.get_scoring_group.slug plural=True %}
361-
{% if answer.type == "negative" %}
362-
got <strong>no penalty marks</strong> for this question.
363-
{% else %}
364-
got full marks for this question.
365-
{% endif %}
366-
</span>
356+
<div class="d-flex flex-row gap-2 justify-content-end">
357+
<div class="progress-ring" style="--ring-size: 40px;--ring-percentage: {% widthratio answer.council_count council_count 100%};">
358+
<div class="percentage fs-8">
359+
{% widthratio answer.council_count council_count 100%}%
360+
</div>
361+
</div>
362+
<span class="fs-8 mt-1 me-0 text-start">
363+
{% include 'scoring/includes/scoring-group-name.html' with group=council.get_scoring_group.slug plural=True %}
364+
{% if answer.type == "negative" %}
365+
got <strong>no penalty marks</strong> for this question.
366+
{% else %}
367+
got full marks for this question.
368+
{% endif %}
369+
</span>
370+
</div>
367371
</td>
368372
</tr>
369373
{% endfor %}

0 commit comments

Comments
 (0)