changeset 409:c2ac3dae1084

components: Data Policy panel: This panel shows score and details on data policy. In chat it's displayed when data policy badge is hovered/touched, in should be used in other locations in the future. rel 460
author Goffi <goffi@goffi.org>
date Thu, 26 Jun 2025 17:05:11 +0200
parents 44439110247f
children a5588ea3bcd6
files sat_templates/templates/bulma/components/data_policy_panel.html
diffstat 1 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sat_templates/templates/bulma/components/data_policy_panel.html	Thu Jun 26 17:05:11 2025 +0200
@@ -0,0 +1,30 @@
+<div class="container">
+    <div class="panel">
+        <div class="panel-heading">
+            <span class="icon fa fa-file-shield"></span>
+            {% trans %}Data Policy Report{% endtrans %}
+        </div>
+
+        <div class="panel-block">
+            <p class="title has-text-weight-bold is-4">Score: {{ score }}/10</p>
+        </div>
+
+        <div class="panel-block">
+            <strong>{% trans %}Details{% endtrans %}:</strong>
+        </div>
+
+        {% for item in detail %}
+            <div class="panel-block is-flex is-align-items-center">
+                <span class="mr-3
+                             {% if item.score > 0 %}has-text-success
+                             {% elif item.score < 0 %}has-text-danger
+                             {% else %}has-text-black
+                             {% endif %}
+                             has-text-weight-bold">
+                    {{ item.score }}
+                </span>
+                <p>{{ item.description }}</p>
+            </div>
+        {% endfor %}
+    </div>
+</div>