diff --git a/caps/templates/caps/icons/scorecards-star.html b/caps/templates/caps/icons/scorecards-star.html index 2983228b7..1606678e7 100644 --- a/caps/templates/caps/icons/scorecards-star.html +++ b/caps/templates/caps/icons/scorecards-star.html @@ -1 +1 @@ - + diff --git a/scoring/static/scoring/img/social-graphics/planning-and-land-use/planning-and-land-use.zip b/scoring/static/scoring/img/social-graphics/planning-and-land-use/planning-and-land-use.zip index 5d47761d4..02ccac048 100644 Binary files a/scoring/static/scoring/img/social-graphics/planning-and-land-use/planning-and-land-use.zip and b/scoring/static/scoring/img/social-graphics/planning-and-land-use/planning-and-land-use.zip differ diff --git a/scoring/static/scoring/scss/main.scss b/scoring/static/scoring/scss/main.scss index 391513318..7913ac839 100644 --- a/scoring/static/scoring/scss/main.scss +++ b/scoring/static/scoring/scss/main.scss @@ -66,3 +66,4 @@ @import "open-graph-preview"; @import "years"; @import "gallery-component"; +@import "percentage-ring"; diff --git a/scoring/static/scoring/scss/percentage-ring.scss b/scoring/static/scoring/scss/percentage-ring.scss new file mode 100644 index 000000000..ec19d664d --- /dev/null +++ b/scoring/static/scoring/scss/percentage-ring.scss @@ -0,0 +1,36 @@ +/* USAGE: +Always check how the ring will look at 100% and if there is an overlap between elements. + +
Questions | -{{ council.name }} | +Questions | + +
+ 2025
+ {{ council.name }} + |
+
+ + Councils with full marks per question + | {% for comparison in comparisons %} -{{ comparison.council.name }} | +{{ comparison.council.name }} | {% endfor %} -- Councils with full marks per question - | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ Total score + | +
+
+ {{ plan_score.weighted_total|floatformat:0 }}%
+
+
+
+
+
+
+ {% comment %} TODO display tcard his b instead of the previous onelock if question was not measured in 2023 {% endcomment %}
+ + {% comment %} TODO check if it is a top performer that year {% endcomment %} + {% if section.top_performer %} + Top perfomer in this section in the action scorecards 2023 + {% include 'caps/icons/scorecards-star.html' with classes='text-info align-top' width='0.9em' height='0.9rem' role='presentation' %} + {% endif %} + 41% + +score in 2023 +
+
+
+ Not measured in 2023
+
+
+
+ {% comment %} ↓ {% endcomment %}
+
+ {% comment %} TODO Update value {% endcomment %}
+ {% comment %} TODO Update aria-label, there are three scenarios:
+ - x% increase to compare with previous version of action Scorecards
+ - x% decrease to compare with previous version of action Scorecards
+ - No variation compare with previous version of action Scorecards
+ {% endcomment %}
+ {% comment %} Replace text-success when needed:
+ - positive variation: text-success
+ - negative variation: text-danger
+ - no change: text-muted
+ {% endcomment %}
+ 2%
+ compare to 2023
+
+ |
- {% if section.has_negative_points %}
- ||||||||||||||
+ {{ comparison.weighted_total|floatformat:0 }}% + | + {% endfor %} -- {{ section.description }} + | + | + | ||||||||||||
+ {{ section.description }} + + {% if section.has_negative_points %} +
+
+ {% endif %}
-
- + {% include 'caps/icons/warning.html' with classes='me-1 mb-1' width='1.1em' height='1.1em' role='presentation' %} + Penalty marks + + {% if section.only_negative %} + {{ council.name }} was only awarded penalty marks in this section + {% else %} + {{ council.name }} incurred a penalty of {{ section.negative_percent|floatformat:0 }}% in this section {% endif %} + |
+
+
{% if section.top_performer %}
- - {% include 'caps/icons/scorecards-star.html' with classes='text-info align-text-bottom me-1' width='1.2em' height='1.2rem' role='presentation' %} - {{ section.weighted_score|floatformat:0 }}% + |
+
+
+ {% include 'caps/icons/scorecards-star.html' with classes='text-info' width='1rem' height='1rem' role='presentation' %}
+ {{section.weighted_score|floatformat:0 }}%
+ Top perfomer
+
+ Top performer in this section +
+
+
+
+ + {% comment %} TODO check if it is a top performer that year {% endcomment %} + {% if section.top_performer %} + Top perfomer in this section in the action scorecards 2023 + {% include 'caps/icons/scorecards-star.html' with classes='text-info align-top' width='0.9em' height='0.9rem' role='presentation' %} + {% endif %} + 41% + +score in 2023 +
+
+ {% comment %} ↓ {% endcomment %}
+
+ {% comment %} TODO Update value {% endcomment %}
+ {% comment %} TODO Update aria-label, there are three scenarios:
+ - x% increase to compare with previous version of action Scorecards
+ - x% decrease to compare with previous version of action Scorecards
+ - No variation compare with previous version of action Scorecards
+ {% endcomment %}
+ {% comment %} Replace text-success when needed:
+ - positive variation: text-success
+ - negative variation: text-danger
+ - no change: text-muted
+ {% endcomment %}
+ 2%
+ compare to 2023
+
+ |
{% else %}
-
- {{section.weighted_score|floatformat:0 }}%
- {% if section.has_negative_points %}
-
- {{ section.score }} = Total score ({{ section.non_negative_max|floatformat:"-2" }}) − Penalty points ({{ section.negative_points }})
+
+ |
{% endif %}
+
+ {{section.weighted_score|floatformat:0 }}%
+
+
+ {% comment %} ERASE THIS {% endcomment %}
+
+
- {% endif %}
+
+
+ + {% comment %} TODO check if it is a top performer that year {% endcomment %} + {% if section.top_performer %} + Top perfomer in this section in the action scorecards 2023 + {% include 'caps/icons/scorecards-star.html' with classes='text-info align-top' width='0.9em' height='0.9rem' role='presentation' %} + {% endif %} + 41% + +score in 2023 +
+
+ {% comment %} ↓ {% endcomment %}
+
+ {% comment %} TODO Update value {% endcomment %}
+ {% comment %} TODO Update aria-label, there are three scenarios:
+ - x% increase to compare with previous version of action Scorecards
+ - x% decrease to compare with previous version of action Scorecards
+ - No variation compare with previous version of action Scorecards
+ {% endcomment %}
+ {% comment %} Replace text-success when needed:
+ - positive variation: text-success
+ - negative variation: text-danger
+ - no change: text-muted
+ {% endcomment %}
+ 2%
+ compare to 2023
+
+
+ {% comment %} {% endcomment %}
+
+
+ {% if section.has_negative_points %}
+
+
+
+
+ + Relative variation + + + + + {% comment %} ↓ {% endcomment %} + ↑ + 100% + +
+
+ + Absolute variation + + + + + {% comment %} ↓ {% endcomment %} + ↑ + 4% + +
+ {{ section.score }} = Total score ({{ section.non_negative_max|floatformat:"-2" }}) − Penalty points ({{ section.negative_points }})
+
+ {% endif %}
+
{% for comparison in section.comparisons %}
- |
+ |
{{ comparison.weighted_score|floatformat:0 }}%
|
{% endfor %}
-
-
|
|
-
- {{ answer.score }}/{{ answer.max }}
+ |
+ |
+
+
+
+
+
+
+ + {{ answer.score }} + out of + {{ answer.max }} + +
+
+ {% comment %} TODO display this card block instead of the previous one if question was not measured in 2023 {% endcomment %}
+
+
+ + {{ answer.score }} + out of + {{ answer.max }} + +score in 2023 +
+
+ + + {% comment %} - {% endcomment %} + + + 1 marks + compare to 2023 + +
+
+
+ Not measured in 2023
+
+
+ |
{% for comparison in answer.comparisons %}
-
+
+
+
+ {% widthratio answer.council_count council_count 100%}%
+
+ + {% comment %} {{ answer.council_count }} out of {{ council_count }} {% endcomment %} + + {% if answer.type == "negative" %} + {% include 'caps/includes/authority_type.html' with group=authority_type %} + councils got no penalty marks for this question. + {% else %} + {% include 'caps/includes/authority_type.html' with group=authority_type %} + councils with full mark per question for 2025 + {% endif %} + + +
+ |
{{ comparison.score }}/{{ comparison.max }}
|
{% endfor %}
-
-
-
- {{ answer.council_count }} out of {{ council_count }}
-
-
- {% include 'caps/includes/authority_type.html' with group=authority_type %}
- {% if answer.type == "negative" %}
- councils got no penalty marks for this question.
- {% else %}
- councils got full marks for this question.
- {% endif %}
-
- |
|
- Total score - | -- {{ plan_score.weighted_total|floatformat:0 }}% - | - - {% for comparison in comparisons %} -- {{ comparison.weighted_total|floatformat:0 }}% - | - {% endfor %} - -- | - |