changeset 279:a35ddf972ad2

bulma (base/base.html): display backend confirmation and notifications
author Goffi <goffi@goffi.org>
date Sat, 15 Aug 2020 23:38:12 +0200
parents 672b6137ef29
children cf3fcbc797bc
files sat_templates/templates/bulma/base/base.html
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/bulma/base/base.html	Sat Aug 15 16:40:29 2020 +0200
+++ b/sat_templates/templates/bulma/base/base.html	Sat Aug 15 23:38:12 2020 +0200
@@ -82,6 +82,24 @@
         {% endblock main_menu %}
     {% endif %}
     <div id="body" class="container">
+        {% if confirm %}
+            <article class="message is-success mt-4">
+                <div class="message-header">{% trans %}Success{% endtrans %}</div>
+                <div class="message-body">
+                    {% trans %}Your data has been sent correctly.{% endtrans %}
+                </div>
+            </article>
+        {% endif %}
+        {% if notifications %}
+                {% for notification in notifications %}
+                    <article class="message {{ {C.LVL_WARNING: "is-warning"}.get(notification.level, "is-info") }} mt-4">
+                        <div class="message-header">{% trans %}Notification{% endtrans %}</div>
+                        <div class="message-body">
+                            {{ notification.message }}
+                        </div>
+                    </article>
+                {% endfor %}
+        {% endif %}
         <div id="notifs_area"></div>
         {% block body %}
         {% endblock body %}