diff --git a/.env.docker b/.env.docker
index 166169aee..4789d055a 100644
--- a/.env.docker
+++ b/.env.docker
@@ -46,3 +46,4 @@ ENABLE_DASHBOARD=True
PUBLISH_BY_DEFAULT=True
ENABLE_VUE3=True
ENABLE_WASTE_MEASUREMENTS=True
+SHOW_MANAGEMENT_INFORMATION_BANNER=True
diff --git a/docs/ONBOARDING.md b/docs/ONBOARDING.md
index 4d7f8a6c0..b1bbcf37c 100644
--- a/docs/ONBOARDING.md
+++ b/docs/ONBOARDING.md
@@ -151,6 +151,7 @@ ENABLE_DASHBOARD= Optionnel - `True` pour montrer la nouvelle page d'accueil des
PUBLISH_BY_DEFAULT= Optionnel - `True` pour publier les cantines sauf celles qui sont identifiées autrement.
ENABLE_VUE3= Optionnel - `True` pour rendre les nouvelles vues disponibles.
ENABLE_WASTE_MEASUREMENTS= Optionnel - `True` pour rendre l'outil évaluation gaspillage alimentaire disponible
+SHOW_MANAGEMENT_INFORMATION_BANNER= Optionnel - `True` pour afficher une bannière dans la page d'accueil du tableau de bord
```
### Relances automatiques par email
diff --git a/frontend/src/views/ManagementPage/TeledeclarationBanner.vue b/frontend/src/views/ManagementPage/InformationBanner.vue
similarity index 96%
rename from frontend/src/views/ManagementPage/TeledeclarationBanner.vue
rename to frontend/src/views/ManagementPage/InformationBanner.vue
index 0840127d3..a1115f09c 100644
--- a/frontend/src/views/ManagementPage/TeledeclarationBanner.vue
+++ b/frontend/src/views/ManagementPage/InformationBanner.vue
@@ -1,5 +1,5 @@
-
+
CAMPAGNE DE TELEDECLARATION 2025 : Du 7 janvier au 31 mars
@@ -43,7 +43,7 @@
import DsfrCallout from "@/components/DsfrCallout"
export default {
- name: "TeledeclarationBanner",
+ name: "InformationBanner",
components: {
DsfrCallout,
},
diff --git a/frontend/src/views/ManagementPage/index.vue b/frontend/src/views/ManagementPage/index.vue
index 5ce078025..cd82baa6a 100644
--- a/frontend/src/views/ManagementPage/index.vue
+++ b/frontend/src/views/ManagementPage/index.vue
@@ -18,9 +18,9 @@
les cantines de votre territoire
+
@@ -92,7 +92,7 @@ import CanteensPagination from "./CanteensPagination.vue"
import PageSatisfaction from "@/components/PageSatisfaction.vue"
import DsfrSegmentedControl from "@/components/DsfrSegmentedControl"
import UserTools from "./UserTools"
-import TeledeclarationBanner from "./TeledeclarationBanner"
+import InformationBanner from "./InformationBanner"
import CanteenCreationDialog from "./CanteenCreationDialog"
import ActionsBanner from "./ActionsBanner"
import SuccessBanner from "./SuccessBanner"
@@ -110,7 +110,7 @@ export default {
CanteensPagination,
UserTools,
PageSatisfaction,
- TeledeclarationBanner,
+ InformationBanner,
ActionsBanner,
SuccessBanner,
CanteenCreationDialog,
@@ -123,8 +123,6 @@ export default {
canteenCount: undefined,
hasActions: false,
showCanteenCreationPrompt: null,
- teledeclarationCampaignActive: window.ENABLE_TELEDECLARATION,
- correctionCampaignActive: window.TELEDECLARATION_CORRECTION_CAMPAIGN,
actionsLoading: true,
resources: [
{
@@ -175,6 +173,7 @@ export default {
style: "background-color: #E8EDFF; border: none;", // light / background / contrast-info
},
],
+ showInformationBanner: window.SHOW_MANAGEMENT_INFORMATION_BANNER,
viewStyles: [
{
text: "Vue cartes",
diff --git a/macantine/settings.py b/macantine/settings.py
index 9f91b96bd..e638f62e0 100644
--- a/macantine/settings.py
+++ b/macantine/settings.py
@@ -533,6 +533,7 @@
PUBLISH_BY_DEFAULT = os.getenv("PUBLISH_BY_DEFAULT") == "True"
ENABLE_VUE3 = os.getenv("ENABLE_VUE3") == "True"
ENABLE_WASTE_MEASUREMENTS = os.getenv("ENABLE_WASTE_MEASUREMENTS") == "True"
+SHOW_MANAGEMENT_INFORMATION_BANNER = os.getenv("SHOW_MANAGEMENT_INFORMATION_BANNER") == "True"
# Custom testing
diff --git a/web/templates/vue-app.html b/web/templates/vue-app.html
index c715b03a3..091c147a8 100644
--- a/web/templates/vue-app.html
+++ b/web/templates/vue-app.html
@@ -41,6 +41,7 @@
window.TELEDECLARATION_END_DATE = "{% teledeclaration_end_date %}" || null
window.IS_WIDGET = "{{ is_widget }}"
window.ENABLE_WASTE_MEASUREMENTS = "{% enable_waste_measurements %}" === "True"
+ window.SHOW_MANAGEMENT_INFORMATION_BANNER = "{% show_management_information_banner %}" === "True"
diff --git a/web/templatetags/featureflags.py b/web/templatetags/featureflags.py
index b3baf20ca..741b323e4 100644
--- a/web/templatetags/featureflags.py
+++ b/web/templatetags/featureflags.py
@@ -37,3 +37,8 @@ def enable_dashboard():
@register.simple_tag
def enable_waste_measurements():
return getattr(settings, "ENABLE_WASTE_MEASUREMENTS", "")
+
+
+@register.simple_tag
+def show_management_information_banner():
+ return getattr(settings, "SHOW_MANAGEMENT_INFORMATION_BANNER", "")