ajout infos formulaire envoi
This commit is contained in:
parent
44b4f49289
commit
2bcec59281
11 changed files with 211 additions and 61 deletions
|
@ -13,6 +13,102 @@
|
|||
{% if status == "Les tags ont été mis à jour avec succès" %}
|
||||
<span class="badge bg-success p-4">{{status}}</span>
|
||||
|
||||
{# 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 } %}
|
||||
|
||||
<p class="p-4 col-12 col-lg-8">
|
||||
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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue