ajout recherche par nom

This commit is contained in:
Tykayn 2025-05-28 16:24:34 +02:00 committed by tykayn
parent 3a73c1adad
commit ccab916286
11 changed files with 345 additions and 204 deletions

View file

@ -27,14 +27,22 @@
<th>Zone</th>
<th>Nombre de commerces</th>
<th>Complétude %</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for stat in stats %}
<tr>
<td>{{ stat.zone }}</td>
<td>
<a href="{{ path('app_admin_stats', {'zip_code': stat.zone}) }}">{{ stat.zone }}</a>
</td>
<td>{{ stat.placesCount }}</td>
<td style="background : rgba(0 , 255, 0, {{stat.completionPercent / 100 }} )">{{ stat.completionPercent }}</td>
<td>
<a class="btn btn-sm btn-primary" href="{{ path('app_admin_stats', {'zip_code': stat.zone}) }}"><i class="bi bi-eye"></i></a>
<a class="btn btn-sm btn-warning" href="{{ path('app_admin_labourer', {'zip_code': stat.zone}) }}"><i class="bi bi-arrow-repeat"></i></a>
<a class="btn btn-sm btn-danger" href="{{ path('app_admin_delete_by_zone', {'zip_code': stat.zone}) }}"><i class="bi bi-trash"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
@ -50,6 +58,7 @@
<th>Date de dernier contact</th>
<th>Date de dernière modification</th>
<th>Code postal</th>
<th>Actions</th>
@ -58,21 +67,26 @@
<tbody>
{% for place in places %}
<tr>
<td>{{ place.name }}</td>
<td>{% if place.name %}
<a href="{{ path('app_public_edit', {'zipcode': place.zipCode, 'name': place.name, 'uuid': place.uuidForUrl}) }}">{{ place.name }}</a>
{% else %}
<a href="{{ path('app_public_edit', {'zipcode': place.zipCode, 'name': '?', 'uuid': place.uuidForUrl}) }}"><i class="bi bi-question-circle"></i></a>
{% endif %} </td>
<td>{{ place.email }}</td>
<td>{{ place.modifiedDate | date('Y-m-d H:i:s') }}</td>
<td>{{ place.lastContactAttemptDate | date('Y-m-d H:i:s') }}</td>
<td>{{ place.modifiedDate | date('Y-m-d H:i:s') }}</td>
<td>{{ place.zipCode }}</td>
<td>
<a href="https://www.openstreetmap.org/{{place.osmKind}}/{{ place.osmId }}" target="_blank">Voir dans OSM</a>
<a href="https://www.openstreetmap.org/{{place.osmKind}}/{{ place.osmId }}" target="_blank"><i class="bi bi-globe"></i></a>
{% if place.name %}
<a href="{{ path('app_public_edit', {'zipcode': place.zipCode, 'name': place.name, 'uuid': place.uuidForUrl}) }}">Modifier</a>
<a href="{{ path('app_public_edit', {'zipcode': place.zipCode, 'name': place.name, 'uuid': place.uuidForUrl}) }}"><i class="bi bi-pencil"></i></a>
{% else %}
<a href="{{ path('app_public_edit', {'zipcode': place.zipCode, 'name': '?', 'uuid': place.uuidForUrl}) }}">Modifier</a>
<a href="{{ path('app_public_edit', {'zipcode': place.zipCode, 'name': '?', 'uuid': place.uuidForUrl}) }}"><i class="bi bi-pencil"></i></a>
{% endif %}
<a href="{{ path('app_admin_delete', {'id': place.id}) }}" onclick="return confirm('Êtes-vous sûr de vouloir supprimer ce lieu ?')"><i class="bi bi-trash"></i></a>
</td>
</tr>
{% endfor %}