From cf4a3ec64b3da6301b4a6d891921c29d377756b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sat, 28 Jan 2017 19:46:56 +0100 Subject: [PATCH] Traitement des messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Les messages sont affichés à l'utilisateurs dans les vues de GestioCOF - On utilise une autre version de bootstrap et jquery (plus récent) Fixes #48 --- bda/templates/bda-participants.html | 2 -- bda/templates/bda/etat-places.html | 2 -- bda/templates/spectacle_list.html | 2 -- gestioncof/static/css/cof.css | 26 +++++++++++++++++++ gestioncof/templates/base.html | 12 ++++++--- gestioncof/templates/base_title.html | 2 +- .../{ => gestioncof}/base_header.html | 16 ++++++++++++ gestioncof/templates/home.html | 2 +- gestioncof/templates/registration.html | 1 - ...ment_demande_petit_cours_autre_niveau.html | 1 - 10 files changed, 53 insertions(+), 13 deletions(-) rename gestioncof/templates/{ => gestioncof}/base_header.html (60%) diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html index 3efeccc3..f52e6b96 100644 --- a/bda/templates/bda-participants.html +++ b/bda/templates/bda-participants.html @@ -48,8 +48,6 @@ {% endfor %} - + {% block extra_head %}{% endblock %} diff --git a/gestioncof/templates/base_title.html b/gestioncof/templates/base_title.html index c52f29bb..2e9687dd 100644 --- a/gestioncof/templates/base_title.html +++ b/gestioncof/templates/base_title.html @@ -1,4 +1,4 @@ -{% extends "base_header.html" %} +{% extends "gestioncof/base_header.html" %} {% block interm_content %} diff --git a/gestioncof/templates/base_header.html b/gestioncof/templates/gestioncof/base_header.html similarity index 60% rename from gestioncof/templates/base_header.html rename to gestioncof/templates/gestioncof/base_header.html index baaa24b6..a7e29eb7 100644 --- a/gestioncof/templates/base_header.html +++ b/gestioncof/templates/gestioncof/base_header.html @@ -16,5 +16,21 @@

{% if user.first_name %}{{ user.first_name }}{% else %}{{ user.username }}{% endif %}, {% if user.profile.is_cof %}au COF{% else %}non-COF{% endif %}

+{% if messages %} + {% for message in messages %} +
+
+
+ + {% if 'safe' in message.tags %} + {{ message|safe }} + {% else %} + {{ message }} + {% endif %} +
+
+
+ {% endfor %} +{% endif %} {% block interm_content %}{% endblock %} {% endblock %} diff --git a/gestioncof/templates/home.html b/gestioncof/templates/home.html index c85cbbe1..3c0ec767 100644 --- a/gestioncof/templates/home.html +++ b/gestioncof/templates/home.html @@ -1,4 +1,4 @@ -{% extends "base_header.html" %} +{% extends "gestioncof/base_header.html" %} {% block homelink %} {% endblock %} diff --git a/gestioncof/templates/registration.html b/gestioncof/templates/registration.html index 4f15a4b7..0353b885 100644 --- a/gestioncof/templates/registration.html +++ b/gestioncof/templates/registration.html @@ -4,7 +4,6 @@ {% block page_size %}col-sm-8{% endblock %} {% block extra_head %} - {% endblock %} diff --git a/gestioncof/templates/traitement_demande_petit_cours_autre_niveau.html b/gestioncof/templates/traitement_demande_petit_cours_autre_niveau.html index f92be513..c2c7e734 100644 --- a/gestioncof/templates/traitement_demande_petit_cours_autre_niveau.html +++ b/gestioncof/templates/traitement_demande_petit_cours_autre_niveau.html @@ -16,7 +16,6 @@ {% endif %} - {% if proposals %}
{% csrf_token %}