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

63 lines
No EOL
2.7 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Podium des contributeurs OSM{% endblock %}
{% block body %}
<div class="container mt-4">
<h1>Podium des contributeurs OSM</h1>
<p>Voici les 10 contributeurs OpenStreetMap ayant ajouté ou modifié le plus de lieux dans la base, pondérés de la complétion moyenne des lieux :</p>
<p>Le <strong>score de complétion moyen</strong> correspond à la moyenne du taux de complétion des lieux ajoutés ou modifiés par chaque contributeur.</p>
<table class="table table-striped table-bordered mt-4" style="max-width:800px">
<thead class="table-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Utilisateur OSM</th>
<th scope="col">Nombre de lieux</th>
<th scope="col">Score de complétion moyen</th>
<th scope="col">Score de complétion pondéré</th>
<th scope="col">Score pondéré normalisé (0-100)</th>
</tr>
</thead>
<tbody>
{% for row in podium %}
<tr>
<th scope="row">{{ loop.index }}</th>
<td>
<a href="https://www.openstreetmap.org/user/{{ row.osm_user|e('url') }}" target="_blank">
{{ row.osm_user }}
</a>
</td>
<td>{{ row.nb }}</td>
<td>
{% if row.completion_moyen is not null %}
{{ row.completion_moyen }}&nbsp;%
{% else %}
<span class="text-muted">N/A</span>
{% endif %}
</td>
<td>
{% if row.completion_pondere is not null %}
{{ row.completion_pondere }}
{% else %}
<span class="text-muted">N/A</span>
{% endif %}
</td>
<td>
{% if row.completion_pondere_normalisee is not null %}
{{ row.completion_pondere_normalisee }}
{% else %}
<span class="text-muted">N/A</span>
{% endif %}
</td>
</tr>
{% else %}
<tr><td colspan="6">Aucun contributeur trouvé.</td></tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_admin') }}" class="btn btn-secondary mt-3"><i class="bi bi-arrow-left"></i> Retour à l'administration</a>
</div>
{% endblock %}