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

Commit

Permalink
Merge pull request #20 from intuitem/hotfix/inverted-matrix-legend
Browse files Browse the repository at this point in the history
Fix inverted matrix legends
  • Loading branch information
eric-intuitem authored Oct 19, 2023
2 parents 31f7733 + a383e7d commit 4e336de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
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

0 comments on commit 4e336de

Please sign in to comment.