2025-05-22 19:13:43 +02:00
{% extends 'base.html.twig' %}
{% block title %} Hello PublicController! {% endblock %}
{% block stylesheets %}
{{ parent ( ) }}
{% endblock %}
{% block body %}
2025-05-27 00:24:05 +02:00
<div class="container">
2025-07-12 12:53:06 +02:00
<h1>Modification du lieu {{ commerce .tags_converted .name is defined and commerce .tags_converted .name is not empty ? commerce .tags_converted .name : '(sans nom)' }} !</h1>
2025-05-22 19:13:43 +02:00
2025-05-27 11:18:29 +02:00
{% if status == "Les tags ont été mis à jour avec succès" %}
<span class="badge bg-success p-4"> {{ status }} </span>
2025-05-22 19:13:43 +02:00
2025-07-07 23:06:04 +02:00
{# Tableau comparatif des tags avant/après modification #}
{% if tags_before_modif is defined and tags_after_modif is defined %}
<h3 class="mt-4">Comparatif des tags avant/après modification</h3>
<div class="table-responsive mb-4">
<table class="table table-bordered table-sm align-middle">
<thead class="table-light">
<tr>
<th>Tag</th>
<th>Avant</th>
<th>Après</th>
</tr>
</thead>
<tbody>
{# Construction manuelle de la liste des clés sans filtre unique #}
{% set all_keys = [ ] %}
{% for k in tags_before_modif | keys %} {% if k not in all_keys %} {% set all_keys = all_keys | merge ( [ k ] ) %} {% endif %} {% endfor %}
{% for k in tags_after_modif | keys %} {% if k not in all_keys %} {% set all_keys = all_keys | merge ( [ k ] ) %} {% endif %} {% endfor %}
{% set all_keys = all_keys | sort %}
{% for key in all_keys %}
{% set before = tags_before_modif [ key ] | default ( null ) %}
{% set after = tags_after_modif [ key ] | default ( null ) %}
{% if before is not null and ( after is null or after == '' ) %}
{# Suppression #}
<tr>
<td><code> {{ key }} </code></td>
<td class="bg-danger text-white"> {{ before }} </td>
<td class="bg-danger text-white">(supprimé)</td>
</tr>
{% elseif before is null and after is not null and after != '' %}
{# Ajout #}
<tr>
<td><code> {{ key }} </code></td>
<td class="bg-success text-white">(nouveau)</td>
<td class="bg-success text-white"> {{ after }} </td>
</tr>
{% elseif before != after and after != '' %}
{# Modification #}
<tr>
<td><code> {{ key }} </code></td>
<td class="bg-warning"> {{ before }} </td>
<td class="bg-warning"> {{ after }} </td>
</tr>
{% else %}
<tr>
<td><code> {{ key }} </code></td>
<td> {{ before }} </td>
<td> {{ after }} </td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
<small class="text-muted">
<span class="bg-danger text-white px-2"> </span> supprimé
<span class="bg-warning px-2"> </span> modifié
<span class="bg-success text-white px-2"> </span> ajouté
</small>
</div>
{% if excluded_post_fields is defined and excluded_post_fields | length > 0 %}
<div class="alert alert-info">
<b>Champs du formulaire non pris en compte dans OpenStreetMap :</b>
<ul class="mb-0">
{% for field in excluded_post_fields %}
<li><code> {{ field }} </code></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}
{# Affichage en lecture seule des nouveaux tags #}
<h3 class="mt-4">Nouveaux tags enregistrés</h3>
<div class="table-responsive mb-4">
<table class="table table-bordered table-sm align-middle">
<thead class="table-light">
<tr>
<th>Tag</th>
<th>Valeur</th>
</tr>
</thead>
<tbody>
{% for key , value in tags_after_modif %}
{% if value is not empty %}
<tr>
<td><code> {{ key }} </code></td>
<td> {{ value }} </td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
<h4 class="mt-4">Tags OSM (texte à copier-coller)</h4>
{% include 'public/_tags_textarea.html.twig' with { 'tags' : tags_after_modif } %}
2025-05-28 16:24:34 +02:00
<p class="p-4 col-12 col-lg-8">
2025-06-09 00:11:16 +02:00
Merci d'avoir contribué à l'amélioration de la base de données OSM, votre contribution sera visible sur de nombreux sites web et dans la base adresse nationale des lieux et commerces.
2025-05-27 00:22:15 +02:00
2025-05-27 11:18:29 +02:00
<br>
2025-06-09 00:11:16 +02:00
Compléter les informations de votre commerce?
Complétez les informations ici ou bien réutilisez plus tard le lien secret que vous avez reçu par email.
2025-05-27 11:18:29 +02:00
<br>
2025-05-27 00:22:15 +02:00
2025-05-27 11:18:29 +02:00
Envie de contribuer ailleurs ?
2025-06-09 00:11:16 +02:00
Créez votre propre compte OpenStreetMap sur <a href="https://osm.org" >osm.org</a>, et venez discuter avec les autres contributeurs sur le forum de la communauté OSM sur <a href="https://forum.openstreetmap.fr" >forum.openstreetmap.fr</a>.
<hr>
2025-08-09 11:47:23 +02:00
<form action=" {{ path ( 'app_public_submit' , { 'osm_object_id' : commerce_overpass [ '@attributes' ] .id ,
'version': commerce_overpass['@attributes'].version,
'changesetID': commerce_overpass['@attributes'].changeset,
'insee_code' : insee_code }) }}" method="post" class="needs-validation">
2025-06-17 13:23:47 +02:00
<input type="hidden" name="osm_kind" value=" {{ place .osmKind }} ">
2025-06-09 00:11:16 +02:00
{% include 'public/edit/yenaunpeuplusjevouslemets.html.twig' %}
{% include 'public/edit/social_media.html.twig' %}
{% include 'public/edit/address.html.twig' %}
{% include 'public/edit/clim.html.twig' %}
{% include 'public/edit/ask_angela.html.twig' %}
{% include 'public/edit/wheelchair.html.twig' %}
<div id="validation_messages" class="alert alert-danger d-none"></div>
<div class="d-grid gap-2 d-md-flex justify-content-md-end mt-4">
<button type="submit" class="btn btn-primary col-12 col-md-5">
<i class="bi bi-send"></i>
{{ 'display.submit' | trans }}
</button>
</div>
</form>
2025-05-27 11:18:29 +02:00
</p>
{% else %}
<span class="badge bg-danger p-4"> {{ status }} </span>
{% endif %}
<br>
<a href=" {{ path ( 'app_public_index' ) }} ">Retour à la page d'accueil</a>
2025-05-27 00:24:05 +02:00
</div>
2025-05-22 19:13:43 +02:00
{% endblock %}
2025-06-09 00:11:16 +02:00
{% block javascripts %}
{{ parent ( ) }}
<script>
2025-06-09 00:34:33 +02:00
check_validity ? check_validity() : null;
2025-06-09 00:11:16 +02:00
</script>
2025-05-22 19:13:43 +02:00
{% endblock %}