Skip to content

Commit

Permalink
Merge pull request #528 from MTES-MCT/nenj-patch-infos-haie
Browse files Browse the repository at this point in the history
Modification de l'affichage des informations de GU haie dans les départements
  • Loading branch information
pyDez authored Jan 27, 2025
2 parents 414a4e5 + 4715f99 commit e91e1c9
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 33 deletions.
2 changes: 1 addition & 1 deletion envergo/moulinette/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "department_guichet_unique_url"]
list_display = ["department", "is_activated"]
list_filter = ["is_activated"]

def get_queryset(self, request):
Expand Down
Original file line number Diff line number Diff line change
@@ -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"),
),
]
13 changes: 13 additions & 0 deletions envergo/moulinette/migrations/0069_merge_20250124_1157.py
Original file line number Diff line number Diff line change
@@ -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 = []
8 changes: 1 addition & 7 deletions envergo/moulinette/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,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",
Expand Down
52 changes: 27 additions & 25 deletions envergo/templates/haie/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ <h1>Le point d'accès unique à la réglementation et aux démarches administrat
<h3>Simuler un projet</h3>
<p>
<span class="fr-text--lead">
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.
</span>
<br />
<span class="fr-text fr-text--sm">3 minutes, gratuit et anonyme</span>
<span class="fr-text fr-text--sm">Simulation gratuite et anonyme. Durée : 3 min.</span>
</p>
<div class="fr-grid-row">
{% for department in activated_departments %}
Expand All @@ -91,7 +90,7 @@ <h3 class="fr-tile__title">
</div>
<hr id="department-search" class="separator fr-mt-4w" />
<div class="fr-grid-row fr-grid-row--center">
<span id="department-search-title" class="fr-text--lead">Le projet est situé dans un autre département ?</span>
<span id="department-search-title" class="fr-text--lead">Dans quel département le projet est-il situé ?</span>
<div class="fr-col-12 fr-grid-row fr-grid-row--center">
<form action="#department-search" method="post">
{% csrf_token %}
Expand All @@ -110,29 +109,32 @@ <h3 class="fr-tile__title">
</form>
</div>
</div>
{% if department and config and config.department_guichet_unique_url %}
<p class="fr-mt-4w">Un guichet de la haie existe déjà pour le département {{ department }}.</p>
<p>
<a class="fr-btn"
href="{{ config.department_guichet_unique_url }}"
target="_blank">Aller au Guichet unique Haie pour ce
département</a>
</p>
{% elif department %}
<div class="fr-notice fr-notice--warning fr-mt-4w">
<div class="fr-container">
<div class="fr-notice__body">
<p>
<span class="fr-notice__title"></span>
<span class="fr-notice__desc">Le guichet unique haie n'existe pas encore dans le département {{ department }}.</span>
</p>
{% if department %}
{% if config and config.contacts_and_links %}
<div id="contacts_and_links" class="fr-mt-4w fr-p-2w">{{ config.contacts_and_links|safe }}</div>
<div class="fr-py-2w">
<p>
Vous représentez la DDT(M) du département et souhaitez compléter ou modifier les informations affichées ici ?
<a href="https://tally.so/r/w4Agpb" target="_blank" rel="noopener">Cliquez ici</a>.
</p>
</div>
{% else %}
<div class="fr-notice fr-notice--warning fr-mt-4w">
<div class="fr-container">
<div class="fr-notice__body">
<p>
<span class="fr-notice__title"></span>
<span class="fr-notice__desc">{{ department }} : nous ne disposons pas encore d'information sur les contacts de l'administration en rapport avec la haie.</span>
</p>
</div>
</div>
</div>
</div>
{% if config and config.contacts_and_links %}
<div id="contacts_and_links" class="fr-mt-4w fr-p-2w">
<h6>Liste des contacts et liens utiles</h6>
{{ config.contacts_and_links|safe }}
<div class="fr-py-2w">
<p>
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 ?
<a href="https://tally.so/r/w4Agpb" target="_blank" rel="noopener">Cliquez ici</a>.
</p>
</div>
{% endif %}
{% endif %}
Expand Down

0 comments on commit e91e1c9

Please sign in to comment.