From 010583ffc54b0f9e03bcad39c044dcc2f7b9743b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 14 Apr 2023 16:35:24 +0200 Subject: [PATCH] cosmetic: remove flashed message after 5 secs --- app/templates/base.j2 | 10 +++++++++- app/templates/flashed_messages.j2 | 19 ++++++++++++++----- app/templates/sco_page.j2 | 8 +------- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app/templates/base.j2 b/app/templates/base.j2 index 640a4d72e..27618bba6 100644 --- a/app/templates/base.j2 +++ b/app/templates/base.j2 @@ -62,7 +62,7 @@ {% endblock %} {% block content %} -
+
{% with messages = get_flashed_messages(with_categories=true) %} {% for category, message in messages %} @@ -72,6 +72,14 @@ {# application content needs to be provided in the app_content block #} {% block app_content %}{% endblock %}
+ {% endblock %} {% block scripts %} diff --git a/app/templates/flashed_messages.j2 b/app/templates/flashed_messages.j2 index 5ded75245..b96ee27d4 100644 --- a/app/templates/flashed_messages.j2 +++ b/app/templates/flashed_messages.j2 @@ -1,9 +1,18 @@ -{# Message flask : utilisé uniquement par les anciennes pages ScoDoc #} -{# -*- mode: jinja-html -*- #} -
+{# Messages flask (flash) #} + +
{% with messages = get_flashed_messages(with_categories=true) %} {% for category, message in messages %} - + {% endfor %} {% endwith %} -
\ No newline at end of file +
+ + diff --git a/app/templates/sco_page.j2 b/app/templates/sco_page.j2 index 1e1e78430..a6e200d63 100644 --- a/app/templates/sco_page.j2 +++ b/app/templates/sco_page.j2 @@ -24,13 +24,7 @@ {% endblock %}
-
- {% with messages = get_flashed_messages(with_categories=true) %} - {% for category, message in messages %} - - {% endfor %} - {% endwith %} -
+ {% include "flashed_messages.j2" %} {% if sco.sem %} {% block formsemestre_header %} {% include "formsemestre_header.j2" %}