{% extends 'manager/manager_base.html.twig' %} {% block title %}Gestion des formulaires{% endblock %} {% block content %} {# --- MAPPINGS TWIG POUR TRADUIRE LES CODES EN TEXTE --- #} {% set periodicite_mapping = { 1: 'Annuelle', 2: 'Semestrielle', 3: 'Trimestrielle', 4: 'Mensuelle', 5: 'Journalière', } %} {% set localite_mapping = { 1: 'Pays', 2: 'District', 3: 'Région', 4: 'Département', 5: 'Sous-préfecture', 6: 'Commune', 7: 'Village', } %}
| Titre du formulaire | {# NOUVELLE COLONNE : Périodicité #}Périodicité | {# NOUVELLE COLONNE : Localité #}Localité | Dernière modif. | Statut | Actions |
|---|---|---|---|---|---|
| {{ formulaire.titre }} | {# AFFICHAGE PÉRIODICITÉ (Utilisation du mapping) #}{{ periodicite_mapping[formulaire.periodicite]|default('Non défini') }} | {# AFFICHAGE LOCALITÉ (Utilisation du mapping) #}{{ localite_mapping[formulaire.localite]|default('Non défini') }} | {# Date #}{{ formulaire.dates ? formulaire.dates|date('d/m/Y H:i') : 'N/A' }} | {# Statut #}{% if formulaire.active %} Actif {% else %} Inactif {% endif %} | {# Actions #}
|