osm-commerces/templates/admin/labourage_results.html.twig
2025-06-26 23:14:22 +02:00

47 lines
1.4 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Résultats du labourage sur la zone {{ zone }}{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Labourage fait sur la zone "{{ stats.zone }} {{stats.name}}" ✅</h1>
<a href="{{ path('app_admin_labourer', {'insee_code': stats.zone}) }}" class="btn btn-primary" id="labourer">Labourer les mises à jour</a>
<a href="{{ path('app_admin_stats', {'insee_code': stats.zone}) }}" class="btn btn-primary" id="labourer">Voir les résultats</a>
<p>
lieux trouvés en plus: {{ new_places_counter }}
</p>
<hr>
<p>
commerces existants déjà en base: {{ commerces|length }}
</p>
{# {{ dump(commerces[0]) }} #}
<table class="table table-striped table-sort">
{% include 'admin/stats/table-head.html.twig' %}
<tbody>
{% for commerce in commerces %}
{% include 'admin/stats/row.html.twig' %}
{% endfor %}
</tbody>
</table>
{% if redirect_to_stats %}
<script>
setTimeout(function() {
window.location.href = '{{ path('app_admin_stats', {'insee_code': zone}) }}';
}, 5000);
</script>
<div class="alert alert-info mt-4">Vous allez être redirigé automatiquement vers la page de statistiques de la ville dans 5 secondes.</div>
{% endif %}
</div>
{% endblock %}