{% extends '@SonataAdmin/CRUD/base_list.html.twig' %} {% block tab_menu %} {{ knp_menu_render(admin.sidemenu(action), { 'currentClass': 'active', 'template': get_global_template('tab_menu_template') }, 'twig') }} {% endblock %} {% block list_filters %}{% endblock %} {% block list_filters_actions %}{% endblock %} {% block list_table %}
{# ── Navigation buttons ── #}
{# ── Pie chart: users with/without consent ── #}

Utilisateurs actifs vs. consentements

{{ stats.usersWithConsent }} avec au moins 1 consentement   {{ stats.usersWithoutConsent }} sans consentement
{# ── Stats per consent type ── #}

Consentements par type

{% for item in stats.typeStats %} {% endfor %}
Type de consentement Utilisateurs % actifs Progression
{% if item.type == 'general' %} {% elseif item.type == 'ssa' %} {% elseif item.type == 'email_notifications' %} {% else %} {% endif %} {{ item.label }} {{ item.count }} / {{ stats.totalActiveUsers }} {{ item.percent }}%

Résumé

{{ stats.totalActiveUsers }} utilisateurs actifs au total.
{{ stats.usersWithConsent }} ont accordé au moins un consentement ({{ stats.totalActiveUsers > 0 ? ((stats.usersWithConsent / stats.totalActiveUsers) * 100)|round(1) : 0 }}%).
{{ stats.usersWithoutConsent }} n'ont encore accordé aucun consentement.

{# end row #} {# ── Per-user consent table ── #}

Détail par utilisateur ({{ stats.userConsentStats|length }} avec consentement)

{% for userStat in stats.userConsentStats %} {% else %} {% endfor %} {% if stats.usersWithoutConsent > 0 %} {% endif %}
Utilisateur Email Consentements actifs Statut
{{ userStat.username }} {{ userStat.email }} {{ userStat.consentCount }} {% if userStat.consentCount >= stats.requiredCount %} Complet {% else %} {{ stats.requiredCount - userStat.consentCount }} manquant(s) {% endif %}
Aucun consentement enregistré.
{{ stats.usersWithoutConsent }} utilisateur(s) actif(s) sans aucun consentement enregistré ne figurent pas dans ce tableau.
{# end col-xs-12 #} {# Data for Chart.js - passed via data attributes to avoid inline JS issues #} {% endblock %} {% block javascripts %} {{ parent() }} {{ encore_entry_script_tags('admin-consent-stats') }} {% endblock %}