refacto labourage form
This commit is contained in:
parent
31b2bd4689
commit
5441abd405
12 changed files with 674 additions and 424 deletions
|
@ -106,24 +106,36 @@
|
|||
<p>Visualisez un tableau de bord de la complétion des commerces et autres lieux d'intérêt pour votre ville grâce à OpenStreetMap</p>
|
||||
|
||||
</div>
|
||||
|
||||
{% for stat in stats %}
|
||||
<a href="{{ path('app_admin_stats', {'insee_code': stat.zone}) }}" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
|
||||
{% set sorted_stats = stats|sort((a, b) => a.zone <=> b.zone) %}
|
||||
{% for stat in sorted_stats %}
|
||||
{% if stat.zone != 'undefined' %}
|
||||
<a href="{{ path('app_admin_stats', {'insee_code': stat.zone}) }}" class="list-group-item list-group-item-action d-flex p-4 rounded-3 justify-content-between align-items-center">
|
||||
<div class="d-flex flex-column">
|
||||
<span class="zone">{{ stat.zone }}</span>
|
||||
<span class="name">{{ stat.name }}</span>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="d-flex flex-column">
|
||||
<span class="badge bg-primary rounded-pill">{{ stat.placesCount }} lieux</span>
|
||||
<span class="badge rounded-pill completion {% if stat.completionPercent > 80 %}bg-success{% else %}bg-info{% endif %}" >{{ stat.completionPercent }}%</span>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
{% include 'public/labourage-form.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src='{{ asset('js/utils.js') }}'></script>
|
||||
<script type="module">
|
||||
import { adjustListGroupFontSize } from '{{ asset('js/utils.js') }}';
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
adjustListGroupFontSize('.list-group-item');
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Créer le formulaire email
|
||||
const emailFormHtml = `
|
||||
|
@ -225,17 +237,9 @@
|
|||
});
|
||||
}, 500);
|
||||
});
|
||||
enableLabourageForm();
|
||||
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script type="module">
|
||||
import { adjustListGroupFontSize } from '{{ asset('js/utils.js') }}';
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
adjustListGroupFontSize('.list-group-item');
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue