{% extends 'app/base.html.twig' %} {% block title %}Personnes — {{ categorie.nom|default('Catégories') }}{% endblock %} {% block body %}

Personnes{% if categorie %} — {{ categorie.nom }}{% endif %}

{{ personnes|length }} personne(s) affichée(s)
{% if app.user.role in ['admin', 'gestionnaire'] and categorieId %} Ajouter une personne {% endif %}
{# Tabs par catégorie #} {% if categories|length > 0 %} {% endif %} {% if categorieId %} {# Filtre actifs / tous #}
Tous Actifs seulement
{% endif %} {% if personnes is empty %}

{% if actifsOnly %} Aucune personne active dans cette catégorie. {% else %} Aucune personne dans cette catégorie. {% endif %}

{% if app.user.role in ['admin', 'gestionnaire'] and categorieId %} Ajouter une personne {% endif %}
{% else %}
{% set allergenes_cols = { 'contient_gluten': 'Gluten', 'contient_crustaces': 'Crustacés', 'contient_oeufs': 'Œufs', 'contient_poisson': 'Poisson', 'contient_arachides': 'Arachides', 'contient_soja': 'Soja', 'contient_lactose': 'Lactose', 'contient_fruits_coque': 'Fruits à coque', 'contient_celeri': 'Céleri', 'contient_moutarde': 'Moutarde', 'contient_sesame': 'Sésame', 'contient_sulfites': 'Sulfites', 'contient_lupin': 'Lupin', 'contient_mollusques': 'Mollusques' } %} {% for p in personnes %} {% endfor %}
Nom Prénom Statut Allergènes Désactivé le
{{ p.nom }} {{ p.prenom }} {% if p.actif %} Actif {% else %} Inactif {% endif %} {% for col, label in allergenes_cols %} {% if p[col] is defined and p[col] %} {{ label }} {% endif %} {% endfor %} {% if p.allergies_autres is defined and p.allergies_autres %} {% for item in p.allergies_autres|split(',') %} {% set item = item|trim %} {% if item %} {{ item }} {% endif %} {% endfor %} {% endif %} {{ p.date_desactivation ? p.date_desactivation|date('d/m/Y') : '—' }} {% if app.user.role in ['admin', 'gestionnaire'] %}
{% if not p.actif %}
{% endif %} {% endif %}
{% endif %}
Gérer les catégories Saisie des présences
{% endblock %}