détection des arrondissements dans le dashboard

This commit is contained in:
Tykayn 2025-06-29 11:03:41 +02:00 committed by tykayn
parent 73e021c854
commit d2c0326231

View file

@ -138,7 +138,7 @@
<div class="row mt-4">
<div class="col-12">
<h2>Statistiques par ville</h2>
<input type="text" id="dashboard-table-search" class="form-control mb-2" placeholder="Filtrer les villes...">
<div class="table-container" >
<div class="table-responsive">
<table id="dashboard-table" class="table table-striped table-sort">
@ -160,11 +160,19 @@
{% for stat in stats_list %}
<tr>
<td><a href="{{ path('app_admin_stats', {'insee_code': stat.zone}) }}" title="Voir les statistiques de cette ville">
{{ stat.name }}
{% if not stat.name and stat.zone starts with '751' %}
Paris {{ stat.zone|slice(-2) }}e.
{% endif %}
{% if stat.name %}
{{ stat.name }}
{% else %}
{% if stat.zone starts with '751' %}
Paris {{ stat.zone|slice(-2) }}e arr.
{% elseif stat.zone starts with '693' %}
Lyon {{ stat.zone|slice(-2) }}e arr.
{% elseif stat.zone starts with '132' %}
Marseille {{ stat.zone|slice(-2) }}e arr.
{% else %}
{{ stat.zone }}
{% endif %}
{% endif %}
</a></td>
<td>{{ stat.zone }}</td>
<td>{{ stat.completionPercent }}%</td>