{% extends 'admin/layout.html.twig' %} {% block title %}Plans de scène{% endblock %} {% block admin_body %} {% set actions = [{label:'Documents techniques',href:path('admin_technical_index'),icon:'bi-arrow-left'}] %} {% if can_permission('STAGE_PLAN', 2) %}{% set actions = actions|merge([{label:'Nouveau plan',href:path('admin_stage_plan_new'),icon:'bi-plus-lg',primary:true}]) %}{% endif %} {% include 'admin/ui/_page_header.html.twig' with {page_eyebrow:'Configuration technique',page_title:'Plans de scène',page_subtitle:'Gère les plans réutilisables et leurs versions.',page_actions:actions} only %}
L’éditeur est tactile. Pour une modification précise, privilégie un téléphone en paysage, une tablette ou un ordinateur.
{% for p in plans %}{% set u = usage[p.id] ?? {profiles:0, templates:0, sheets:0, total:0} %}
{{ p.code }} · V{{ p.version }}

{{ p.name }}

{{ p.widthMeters }} × {{ p.depthMeters }} m · {{ p.layout|length }} élément{{ p.layout|length > 1 ? 's' : '' }}
{{ p.active ? 'Actif' : 'Archivé' }}
{{ u.total ? u.total ~ ' utilisation' ~ (u.total > 1 ? 's' : '') : 'Jamais utilisé' }}
{% if can_permission('STAGE_PLAN', 2) and u.total == 0 %}Modifier{% endif %} {% if can_permission('STAGE_PLAN', 2) %}{{ u.total > 0 ? 'Nouvelle version' : 'Dupliquer' }}{% endif %}
{% else %}{% include 'admin/ui/_empty_state.html.twig' with {empty_title:'Aucun plan de scène',empty_text:'Crée un plan réutilisable pour les fiches techniques.'} only %}{% endfor %}
{% for p in plans %} {% set u = usage[p.id] ?? {profiles:0, templates:0, sheets:0, total:0} %} {% endfor %}
Code Nom Version Dimensions Éléments Utilisations État
{{ p.code }} {{ p.name }} V{{ p.version }} {{ p.widthMeters }} × {{ p.depthMeters }} m {{ p.layout|length }} {% if u.total > 0 %} {{ u.total }} utilisation{{ u.total > 1 ? 's' : '' }} {% else %} Aucune {% endif %} {% if p.active %} Actif {% else %} Archivé {% endif %} {% if can_permission('STAGE_PLAN', 2) and u.total == 0 %} {% endif %} {% if can_permission('STAGE_PLAN', 2) %} {{ u.total > 0 ? 'Nouvelle version' : 'Dupliquer' }} {% endif %} {% if can_permission('STAGE_PLAN', 2) and p.active %}
{% endif %} {% if can_permission('STAGE_PLAN', 3) and u.total == 0 %}
{% else %} {% endif %}
{% endblock %}