up global folloup
This commit is contained in:
parent
e3f8680472
commit
1c2c3575f9
1 changed files with 26 additions and 3 deletions
|
@ -2,7 +2,12 @@
|
||||||
{% block title %}Suivi global de toutes les villes{% endblock %}
|
{% block title %}Suivi global de toutes les villes{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container mt-4">
|
<div class="container mt-4">
|
||||||
<h1>Suivi global de toutes les villes</h1>
|
<div class="d-flex align-items-center mb-3">
|
||||||
|
<h1 class="me-3">Suivi global de toutes les villes</h1>
|
||||||
|
<a href="{{ path('admin_followup_global') }}" class="btn btn-warning">
|
||||||
|
<i class="bi bi-arrow-repeat"></i> Rafraîchir le suivi global
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<h3>Nombre de villes et complétion moyenne</h3>
|
<h3>Nombre de villes et complétion moyenne</h3>
|
||||||
<canvas id="global-summary-chart" height="80"></canvas>
|
<canvas id="global-summary-chart" height="80"></canvas>
|
||||||
|
@ -13,11 +18,29 @@
|
||||||
{% set themes = [
|
{% set themes = [
|
||||||
'fire_hydrant', 'charging_station', 'toilets', 'bus_stop', 'defibrillator', 'camera', 'recycling', 'substation', 'laboratory', 'school', 'police', 'healthcare', 'places'
|
'fire_hydrant', 'charging_station', 'toilets', 'bus_stop', 'defibrillator', 'camera', 'recycling', 'substation', 'laboratory', 'school', 'police', 'healthcare', 'places'
|
||||||
] %}
|
] %}
|
||||||
|
{% set theme_icons = {
|
||||||
|
'fire_hydrant': 'bi-droplet',
|
||||||
|
'charging_station': 'bi-lightning-charge',
|
||||||
|
'toilets': 'bi-toilet',
|
||||||
|
'bus_stop': 'bi-bus-front',
|
||||||
|
'defibrillator': 'bi-heart-pulse',
|
||||||
|
'camera': 'bi-camera-video',
|
||||||
|
'recycling': 'bi-recycle',
|
||||||
|
'substation': 'bi-plug',
|
||||||
|
'laboratory': 'bi-beaker',
|
||||||
|
'school': 'bi-mortarboard',
|
||||||
|
'police': 'bi-shield-lock',
|
||||||
|
'healthcare': 'bi-hospital',
|
||||||
|
'places': 'bi-geo-alt'
|
||||||
|
} %}
|
||||||
{% for theme in themes %}
|
{% for theme in themes %}
|
||||||
<div class="col-md-6 mb-4">
|
<div class="col-md-6 mb-4">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">{{ theme|replace({'_': ' '})|title }}</h5>
|
<h5 class="card-title">
|
||||||
|
<i class="bi {{ theme_icons[theme]|default('bi-question-circle') }}"></i>
|
||||||
|
{{ theme|replace({'_': ' '})|title }}
|
||||||
|
</h5>
|
||||||
<canvas id="chart-{{ theme }}-count" height="60"></canvas>
|
<canvas id="chart-{{ theme }}-count" height="60"></canvas>
|
||||||
<canvas id="chart-{{ theme }}-completion" height="60"></canvas>
|
<canvas id="chart-{{ theme }}-completion" height="60"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
@ -59,7 +82,7 @@ new Chart(ctxSummary, {
|
||||||
scales: {
|
scales: {
|
||||||
x: {type: 'time', time: {unit: 'day'}},
|
x: {type: 'time', time: {unit: 'day'}},
|
||||||
y1: {type: 'linear', position: 'left', title: {display: true, text: 'Villes'}},
|
y1: {type: 'linear', position: 'left', title: {display: true, text: 'Villes'}},
|
||||||
y2: {type: 'linear', position: 'right', title: {display: true, text: '%'}},
|
y2: {type: 'linear', position: 'right', title: {display: true, text: '%'}, min: 0, max: 100},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue