Skip to content

Commit d05adbb

Browse files
committed
[Scorecards] Added percentage rings to council table
1 parent 8a4a2f5 commit d05adbb

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
@@ -348,17 +348,21 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
348348
{% endfor %}
349349

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

0 commit comments

Comments
 (0)