ajout podium, fix stats manquantes
This commit is contained in:
parent
d2d2ebe0f0
commit
c3a9bc52b2
3 changed files with 237 additions and 17 deletions
46
templates/admin/podium_contributeurs_osm.html.twig
Normal file
46
templates/admin/podium_contributeurs_osm.html.twig
Normal file
|
@ -0,0 +1,46 @@
|
|||
{% 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 :</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>
|
||||
</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 }} %
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="4">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 %}
|
Loading…
Add table
Add a link
Reference in a new issue