From 522df323db0d11ade24e27857b3b011f56b39918 Mon Sep 17 00:00:00 2001 From: Nicolas Enjalbert Date: Wed, 22 Jan 2025 18:04:11 +0100 Subject: [PATCH 1/8] Update home.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version initiale prenant en compte le cas où aucune information disponible : soit pas d'objet config, soit champ "contact_and_links" vide --- envergo/templates/haie/pages/home.html | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/envergo/templates/haie/pages/home.html b/envergo/templates/haie/pages/home.html index 008f4ebdc..98582e3cd 100644 --- a/envergo/templates/haie/pages/home.html +++ b/envergo/templates/haie/pages/home.html @@ -91,7 +91,7 @@

- Le projet est situé dans un autre département ? + Le projet est-il situé dans un autre département ?
{% csrf_token %} @@ -124,17 +124,27 @@

- Le guichet unique haie n'existe pas encore dans le département {{ department }}. + {{ department }} : nous ne disposons pas encore d'information sur les contacts de l'administration en rapport avec la haie.

- {% if config and config.contacts_and_links %} - + {% endif %} From db82c17823fd09cfe1f608f461d70a68ff40b361 Mon Sep 17 00:00:00 2001 From: Nicolas Enjalbert Date: Thu, 23 Jan 2025 08:37:19 +0100 Subject: [PATCH 2/8] Update home.html Modification mentions explicatives --- envergo/templates/haie/pages/home.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/envergo/templates/haie/pages/home.html b/envergo/templates/haie/pages/home.html index 98582e3cd..31a722f54 100644 --- a/envergo/templates/haie/pages/home.html +++ b/envergo/templates/haie/pages/home.html @@ -68,11 +68,10 @@

Le point d'accès unique à la réglementation et aux démarches administrat

Simuler un projet

- Vous envisagez des travaux sur vos haies ? Nous vous informons sur les règles de protection et les procédures à - suivre. + Vous envisagez des travaux sur vos haies ? Simulez ici votre projet pour connaître les règles de protection et la replantation attendue, puis déposez votre demande d'autorisation.
- 3 minutes, gratuit et anonyme + Simulation gratuite et anonyme. Durée : 3 min.

{% for department in activated_departments %} From f42465479ef39d4143abb1013f7dd24ad0635aa8 Mon Sep 17 00:00:00 2001 From: Nicolas Enjalbert Date: Thu, 23 Jan 2025 08:45:35 +0100 Subject: [PATCH 3/8] Update home.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suppression du bouton de lien vers le GUH d'un département pour que tout soit compris dans le texte "contact_and_links" --- envergo/templates/haie/pages/home.html | 54 ++++++++++---------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/envergo/templates/haie/pages/home.html b/envergo/templates/haie/pages/home.html index 31a722f54..f811e29d4 100644 --- a/envergo/templates/haie/pages/home.html +++ b/envergo/templates/haie/pages/home.html @@ -90,7 +90,7 @@

- Le projet est-il situé dans un autre département ? + Dans quel département le projet est-il situé ?
{% csrf_token %} @@ -109,41 +109,29 @@

- {% if department and config and config.department_guichet_unique_url %} -

Un guichet de la haie existe déjà pour le département {{ department }}.

-

- Aller au Guichet unique Haie pour ce - département -

- {% elif department %} -
-
-
-

- - {{ department }} : nous ne disposons pas encore d'information sur les contacts de l'administration en rapport avec la haie. -

+ {% if department %} + {% if config and config.contacts_and_links %} + + {% else %} +
+
+
+

+ + {{ department }} : nous ne disposons pas encore d'information sur les contacts de l'administration en rapport avec la haie. +

+
-
- - +

Vous représentez la DDT(M) du département et souhaitez faire apparaître ici des informations de contact, des liens vers le site de votre préfecture, + des ressources à présenter aux usagers ? + Cliquez ici. +

+
+ {% endif %} {% endif %}
From ff217163e65ee8e14f3945ec8a770ca4891a77d2 Mon Sep 17 00:00:00 2001 From: Nicolas Enjalbert Date: Thu, 23 Jan 2025 09:43:13 +0100 Subject: [PATCH 4/8] Update home.html --- envergo/templates/haie/pages/home.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/envergo/templates/haie/pages/home.html b/envergo/templates/haie/pages/home.html index f811e29d4..8262183ac 100644 --- a/envergo/templates/haie/pages/home.html +++ b/envergo/templates/haie/pages/home.html @@ -114,6 +114,11 @@

+
+

Vous représentez la DDT(M) du département et souhaitez compléter ou modifier les informations affichées ici ? + Cliquez ici. +

+
{% else %}
@@ -125,7 +130,7 @@

-
-

Vous représentez la DDT(M) du département et souhaitez faire apparaître ici des informations de contact, des liens vers le site de votre préfecture, +

+ Vous représentez la DDT(M) du département et souhaitez faire apparaître ici des informations de contact, des liens vers le site de votre préfecture, des ressources à présenter aux usagers ? Cliquez ici.

From a356d3e17debe65c9ae6db026eb2d5908980ea50 Mon Sep 17 00:00:00 2001 From: PY Date: Fri, 24 Jan 2025 11:35:03 +0100 Subject: [PATCH 6/8] remove dept_guh_url, edit contacts and link verbose name --- envergo/moulinette/admin.py | 2 +- ..._department_guichet_unique_url_and_more.py | 22 +++++++++++++++++++ envergo/moulinette/models.py | 8 +------ 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 envergo/moulinette/migrations/0067_remove_confighaie_department_guichet_unique_url_and_more.py diff --git a/envergo/moulinette/admin.py b/envergo/moulinette/admin.py index 73fe6a5e8..cd92ee329 100644 --- a/envergo/moulinette/admin.py +++ b/envergo/moulinette/admin.py @@ -372,7 +372,7 @@ def get_demarche_simplifiee_pre_fill_config_help_text(self): @admin.register(ConfigHaie) class ConfigHaieAdmin(admin.ModelAdmin): form = ConfigHaieAdminForm - list_display = ["department", "is_activated", "department_guichet_unique_url"] + list_display = ["department", "is_activated", "contacts_and_links"] list_filter = ["is_activated"] def get_queryset(self, request): diff --git a/envergo/moulinette/migrations/0067_remove_confighaie_department_guichet_unique_url_and_more.py b/envergo/moulinette/migrations/0067_remove_confighaie_department_guichet_unique_url_and_more.py new file mode 100644 index 000000000..f9ffa101c --- /dev/null +++ b/envergo/moulinette/migrations/0067_remove_confighaie_department_guichet_unique_url_and_more.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.13 on 2025-01-24 10:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("moulinette", "0066_confighaie_demarches_simplifiees_city_id_and_more"), + ] + + operations = [ + migrations.RemoveField( + model_name="confighaie", + name="department_guichet_unique_url", + ), + migrations.AlterField( + model_name="confighaie", + name="contacts_and_links", + field=models.TextField(blank=True, verbose_name="Champ html d’information"), + ), + ] diff --git a/envergo/moulinette/models.py b/envergo/moulinette/models.py index 8317e11d6..af2cdc440 100644 --- a/envergo/moulinette/models.py +++ b/envergo/moulinette/models.py @@ -785,13 +785,7 @@ class ConfigHaie(ConfigBase): regulations_available = HAIE_REGULATIONS - department_guichet_unique_url = models.URLField( - "Url du guichet unique de la haie du département (si existant)", blank=True - ) - - contacts_and_links = models.TextField( - "Liste des contacts et liens utiles", blank=True - ) + contacts_and_links = models.TextField("Champ html d’information", blank=True) demarche_simplifiee_number = models.IntegerField( "Numéro de la démarche sur démarche simplifiée", From be0da93a77352d512cfbee15621c231161b0dcf3 Mon Sep 17 00:00:00 2001 From: PY Date: Fri, 24 Jan 2025 11:58:34 +0100 Subject: [PATCH 7/8] migration conflict --- .../migrations/0069_merge_20250124_1157.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 envergo/moulinette/migrations/0069_merge_20250124_1157.py diff --git a/envergo/moulinette/migrations/0069_merge_20250124_1157.py b/envergo/moulinette/migrations/0069_merge_20250124_1157.py new file mode 100644 index 000000000..64d5b5c44 --- /dev/null +++ b/envergo/moulinette/migrations/0069_merge_20250124_1157.py @@ -0,0 +1,13 @@ +# Generated by Django 4.2.13 on 2025-01-24 10:57 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("moulinette", "0067_remove_confighaie_department_guichet_unique_url_and_more"), + ("moulinette", "0068_remove_configamenagement_criteria_values"), + ] + + operations = [] From 4715f997ba1652494204df0c7e2456ded0cebe33 Mon Sep 17 00:00:00 2001 From: PY Date: Mon, 27 Jan 2025 06:39:17 +0100 Subject: [PATCH 8/8] remove contacts from list view + margin --- envergo/moulinette/admin.py | 2 +- envergo/templates/haie/pages/home.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/envergo/moulinette/admin.py b/envergo/moulinette/admin.py index 137c348d2..0be18b962 100644 --- a/envergo/moulinette/admin.py +++ b/envergo/moulinette/admin.py @@ -366,7 +366,7 @@ def get_demarche_simplifiee_pre_fill_config_help_text(self): @admin.register(ConfigHaie) class ConfigHaieAdmin(admin.ModelAdmin): form = ConfigHaieAdminForm - list_display = ["department", "is_activated", "contacts_and_links"] + list_display = ["department", "is_activated"] list_filter = ["is_activated"] def get_queryset(self, request): diff --git a/envergo/templates/haie/pages/home.html b/envergo/templates/haie/pages/home.html index a031d8f2c..8b0da8418 100644 --- a/envergo/templates/haie/pages/home.html +++ b/envergo/templates/haie/pages/home.html @@ -112,7 +112,7 @@

{% if department %} {% if config and config.contacts_and_links %} -
+

Vous représentez la DDT(M) du département et souhaitez compléter ou modifier les informations affichées ici ? Cliquez ici. @@ -129,7 +129,7 @@

-
+

Vous représentez la DDT(M) du département et souhaitez faire apparaître ici des informations de contact, des liens vers le site de votre préfecture, des ressources à présenter aux usagers ?