{{ encore_entry_link_tags('app') }}

Gestion des pages ({{ pages|length }})

Nouvelle page Retour
{% for message in app.flashes('success') %}
{{ message }}
{% endfor %} {% for message in app.flashes('error') %}
{{ message }}
{% endfor %}
{% for page in pages %} {% if page.parent is null %} {% set isSystem = page.slug in ['accueil', 'a-propos', 'contact'] or page.template == 'coming_soon' %} {% set hasChildren = page.children|length > 0 %} {% set headerTag = hasChildren ? 'summary' : 'div' %} {% set groupTag = hasChildren ? 'details' : 'div' %} <{{ groupTag }} class="page-group{{ hasChildren ? '' : ' page-group--flat' }}" data-id="{{ page.id }}"> <{{ headerTag }} class="page-group__header" draggable="true"> ⋮⋮ {{ page.title }} {% if isSystem %}Système{% endif %} {% if hasChildren %} {{ page.children|length }} sous-page{{ page.children|length > 1 ? 's' : '' }} {% endif %} {{ page.slug }} {{ page.template }} {{ page.isPublished ? 'Publié' : 'Brouillon' }}
{% include 'components/admin/_btn_edit_content.html.twig' with {href: path('admin_edit_page', {slug: page.slug})} only %} {% include 'components/admin/_btn_settings.html.twig' with {href: path('admin_page_edit_settings', {id: page.id})} only %} {% include 'components/admin/_btn_toggle_publish.html.twig' with {id: page.id, published: page.isPublished} only %} {% include 'components/admin/_btn_duplicate_page.html.twig' with {id: page.id} only %} {% include 'components/admin/_btn_delete_page.html.twig' with {id: page.id, disabled: isSystem} only %}
{% if hasChildren %} {% for child in childrenByParent[page.id] ?? page.children %} {% set childIsSystem = child.slug in ['accueil', 'a-propos', 'contact'] or child.template == 'coming_soon' %} {% endfor %}
Titre Slug Template Date de réalisation Statut Actions
⋮⋮ {{ child.title }} {% if childIsSystem %}Système{% endif %} {{ child.slug }} {{ child.template }} {{ child.realizationDate ? child.realizationDate|date('d/m/Y') : '—' }} {{ child.isPublished ? 'Publié' : 'Brouillon' }} {% if child.contentEn or child.titleEn or child.slugEn %} 🌐 EN {% else %} 🌐 FR {% endif %}
{% include 'components/admin/_btn_edit_content.html.twig' with {href: path('admin_edit_page', {slug: child.slug})} only %} {% include 'components/admin/_btn_settings.html.twig' with {href: path('admin_page_edit_settings', {id: child.id})} only %} {% include 'components/admin/_btn_toggle_publish.html.twig' with {id: child.id, published: child.isPublished} only %} {% include 'components/admin/_btn_duplicate_page.html.twig' with {id: child.id} only %} {% include 'components/admin/_btn_delete_page.html.twig' with {id: child.id, disabled: childIsSystem} only %}
{% endif %} {% endif %} {% endfor %}
{{ encore_entry_script_tags('admin-pages-list') }}