From f0e2062c1cd381ec10ed5055d0cd788fa867a4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Reuiller?= Date: Thu, 21 Nov 2024 14:58:26 +0100 Subject: [PATCH 1/3] replace obsolete SITE_CONFIG var --- lemarche/templates/layouts/_header.html | 80 ++++++++----------------- lemarche/templates/layouts/base.html | 6 +- 2 files changed, 28 insertions(+), 58 deletions(-) diff --git a/lemarche/templates/layouts/_header.html b/lemarche/templates/layouts/_header.html index 91802f5e0..a01fefd5a 100644 --- a/lemarche/templates/layouts/_header.html +++ b/lemarche/templates/layouts/_header.html @@ -1,13 +1,11 @@ {% load i18n static theme_inclusion %} - {% if not user.is_authenticated %} - {% if page.slug == "accueil-structure" %} - {% include "includes/_header_for_buyers.html" %} - {% else %} - {% include "includes/_header_for_siaes.html" %} - {% endif %} + {% if page.slug == "accueil-structure" %} + {% include "includes/_header_for_buyers.html" %} + {% else %} + {% include "includes/_header_for_siaes.html" %} + {% endif %} {% endif %} - \ No newline at end of file + diff --git a/lemarche/templates/layouts/base.html b/lemarche/templates/layouts/base.html index 4cd83e95d..fc6b471a9 100644 --- a/lemarche/templates/layouts/base.html +++ b/lemarche/templates/layouts/base.html @@ -1,7 +1,7 @@ {% load static compress dsfr_tags %} + {% if settings.content_manager.CmsDsfrConfig.mourning %}data-fr-mourning{% endif %}> Date: Thu, 21 Nov 2024 15:30:09 +0100 Subject: [PATCH 2/3] use expose_settings to avoid to much db queries --- lemarche/templates/layouts/_header.html | 5 ++--- lemarche/templates/layouts/base.html | 6 +++--- lemarche/utils/settings_context_processors.py | 4 ++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lemarche/templates/layouts/_header.html b/lemarche/templates/layouts/_header.html index a01fefd5a..e187f42bc 100644 --- a/lemarche/templates/layouts/_header.html +++ b/lemarche/templates/layouts/_header.html @@ -15,10 +15,9 @@