Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Fix inverted matrix legends #20

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions core/templates/snippets/risk_matrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
{% if data %}
<div class="flex flex-row justify-center">
<div class="text-black font-bold text-center print-impact flex items-center">
<p class="-rotate-90">{% trans "Impact" %}</p>
<p class="-rotate-90">{% trans "Probability" %}</p>
</div>
<table class="w-full">
{% for row in matrix.render_grid_as_colors reversed %}
{% with row_index=forloop.revcounter0 %}
<tr class="w-full">
<td class="w-1/6 text-right pr-2 border-4 border-white">
{% with impact=matrix.parse_json.impact|index:row_index %}
{{ impact.name }}
{% with probability=matrix.parse_json.probability|index:row_index %}
{{ probability.name }}
{% endwith %}
</td>
{% for item in row %}
Expand All @@ -34,22 +34,22 @@
</table>
</div>
<div class="text-black font-bold text-center mx-auto mt-2">
<p>{% trans "Probability" %}</p>
<p>{% trans "Impact" %}</p>
</div>
{% else %}
<div class="w-full">
<div class="flex flex-row justify-center">
<div class="text-black font-bold text-center print-impact flex items-center">
<p class="-rotate-90">{% trans "Impact" %}</p>
<p class="-rotate-90">{% trans "Probability" %}</p>
</div>
<table class="w-3/4 mt-10">
{% for row in matrix.render_grid_as_colors reversed %}
{% with row_index=forloop.revcounter0 %}
<tr>
<td class="w-1/6 text-center text-black bg-gray-200 border-4 border-white pr-2">
{% with impact=matrix.parse_json.impact|index:row_index %}
{{ impact.name }}:
{{ impact.description|linebreaksbr }}
{% with probability=matrix.parse_json.probability|index:row_index %}
{{ probability.name }}:
{{ probability.description|linebreaksbr }}
{% endwith %}
</td>
{% if enriched_data %}
Expand All @@ -70,17 +70,17 @@
{% endfor %}
<tr>
<td></td>
{% for probability in matrix.parse_json.probability %}
{% for impact in matrix.parse_json.impact %}
<td class="w-1/6 h-16 text-center text-black bg-gray-200 border-4 border-white">
{{ probability.name }}:
{{ probability.description|linebreaksbr }}
{{ impact.name }}:
{{ impact.description|linebreaksbr }}
</td>
{% endfor %}
</tr>
</table>
</div>
<div class="text-black font-bold text-center mx-auto mt-4">
{% trans "Probability" %}
{% trans "Impact" %}
</div>
</div>
<div class="w-full flex flex-col justify-start">
Expand Down
2 changes: 1 addition & 1 deletion mira/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2a
3.0.2b