{# templates/admin/projet/index.html.twig #} {% extends 'layouts/admin_layout.html.twig' %} {% block title %}Gestion des Projets {% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block content %}

Pilotage du catalogue des promotions et inventaires.

Nouveau Projet
{% for projet in projets %} {% set detailUrl = path('app_admin_projet_show', {'id': projet.id}) %} {% else %} {% endfor %}
Visuel Projet & Type Localisation Statut Foncier Inventaire & Ventes
{% if projet.imagePrincipale %} {{ projet.nom }} {% else %} {% endif %}
{{ projet.nom }}
{% if projet.typeBusiness %} {% set type_class = projet.typeBusiness.value == 'PROMOTION' ? 'bg-info-subtle text-info' : 'bg-success-subtle text-success' %} {{ projet.typeBusiness.getLabel() }} {% endif %}
{{ projet.localisationVille }}, {{ projet.localisationCommune }}
{{ projet.statutFoncier ? projet.statutFoncier.getLabel() : 'Non défini' }} {# Aide spécifique pour les statuts sensibles #} {% if projet.statutFoncier and projet.statutFoncier.value == 'EN_COURS' %} {% endif %} {% set totalLots = projet.lots|length %} {% set vendus = projet.lots|filter(l => l.statut.value == 'VENDU' or l.statut.value == 'LIVRE')|length %} {% set pourcentageVente = totalLots > 0 ? (vendus / totalLots * 100) : 0 %}
{{ vendus }} / {{ totalLots }} vendus {{ pourcentageVente|number_format(0) }}%
{% set reserves = projet.lots|filter(l => l.statut.value == 'RESERVE')|length %} {% if reserves > 0 %}
{{ reserves }} réservé(s)
{% endif %}

Aucun projet n'a été créé pour le moment.

Créer le premier projet
{% endblock %}