{% block pole_offres_widget %} {# La ligne de formulaire EasyAdmin affiche déjà les erreurs de ce champ. #} {{ form_errors(form.offres) }} {{ form_errors(form.mainOffre) }}
{% for id, offre in offres %} {% set row = form.offres[id] %} {% else %} {% endfor %}
OffreÉtat enregistréEnjeuÀ la unePrincipale
{{ offre.titre }} {{ offre.published ? 'Publiée' : 'Dépubliée' }} {% if offre.hasDetailContent %} / fiche complète {% else %} / fiche incomplète
{% if not offre.image %}Image manquante. {% endif %} {% if not offre.hasShortDescription %}Description courte manquante. {% endif %} {% if not offre.hasDescription %}Description longue manquante. {% endif %} Vérifier le contenu et le slug dans la fiche Offre.
{% endif %} {% if offre.featured and not offre.canBeFeatured %}
À la une — actuellement inéligible
{% endif %} {% if offre.pole and offre.pole.mainOffre == offre and not offre.canBeFeatured %}
Principale — actuellement inéligible
{% endif %} {% if offre.canBeFeatured %}
Éligible à la une
{% elseif not offre.enjeu %}
Sans enjeu : absente du schéma
{% elseif not offre.enjeu.published %}
Enjeu non publié : absente du schéma
{% endif %}
{% if not offre.isDetailAccessible %} Mise à la une indisponible : publier et compléter la fiche Offre. {% else %} La mise à la une et la principale exigent un enjeu publié. {% endif %}
{{ form_errors(row) }}{{ form_errors(row.enjeu) }}{{ form_widget(row.enjeu, {'attr': {'aria-label': row.enjeu.vars.label}}) }} {{ form_errors(row.featured) }}{{ form_widget(row.featured, {'label': false, 'attr': {'aria-label': row.featured.vars.label, 'aria-describedby': row.vars.id ~ '_eligibility'}}) }} {% for choice in form.mainOffre %} {% if choice.vars.value == id ~ '' %} {{ form_widget(choice, {'label': false, 'attr': {'aria-label': 'Offre principale : ' ~ offre.titre, 'aria-describedby': row.vars.id ~ '_eligibility'}}) }} {% endif %} {% endfor %}
Aucune offre rattachée. Créez une offre et choisissez ce pôle depuis sa fiche.
{% for choice in form.mainOffre %} {% if choice.vars.value == '' %} {{ form_row(choice) }} {% endif %} {% endfor %} {% do form.offres.setRendered %} {% do form.mainOffre.setRendered %} {% endblock %}