{% extends 'entreprise/entreprise_base.html.twig' %} {% block title %}Gestion des lots | {{ entreprise.raisonSociale|default('Mon Bureau') }}{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block body %} {# 1. CALCUL DES VARIABLES DE CONTRÔLE #} {% set plan = (abonnementActuel and abonnementActuel.abonnement) ? abonnementActuel.abonnement : null %} {% set totalImmeubles = immeubles|length %} {% set isExpired = (abonnementActuel is null or not abonnementActuel.isActive()) %} {% set quotaAtteint = (plan and plan.limiteImmeuble > 0 and totalImmeubles >= plan.limiteImmeuble) %} {% set canAddImmeuble = (not isExpired and not quotaAtteint) %} {% set canModify = (not isExpired) %}
{# --- EN-TÊTE --- #}
Nouveau Lot
{% include 'flash_messages.html.twig' %} {% if immeubles is empty %}

Aucun lot enregistré dans votre bureau

{% else %}
{% for immeuble in immeubles %}
{# COLONNE 1 : CONTROLES D'ORDRE #}
{% if not loop.first %} {% else %} {% endif %} {{ loop.index }} {% if not loop.last %} {% else %} {% endif %}
{# COLONNE 2 : INFOS PRINCIPALES #}
{{ immeuble.titre }}
{{ immeuble.adresseGeographique|default('Localisation non définie') }} REF: {{ immeuble.lot|default('-') }} ÎLOT: {{ immeuble.ilot|default('-') }}
{% if immeuble.description %}

{{ immeuble.description|striptags|slice(0, 80) }}...

{% endif %}
{# COLONNE 3 : ACTIONS #} {# FIN COLONNE 3 #}
{% endfor %}
{% endif %}
{% endblock %}