{% set etape0 = not app.request.query.get('filiere', null) and not app.request.query.get('diplome', null) and niveauOnglet == "tout" %}
{% set etape1 = not app.request.query.get('filiere', null) and not app.request.query.get('diplome', null) and niveauOnglet in ['cap', 'bac-pro', 'formation-pro-continue'] and position == "header" %}
{% set etape2 = app.request.query.get('filiere', null) and not app.request.query.get('diplome', null) and position == "header" %}
{% set etape3 = app.request.query.get('filiere', null) and app.request.query.get('diplome', null) %}
{% set etape = 0*etape0 + 1*etape1 + 2*etape2 + 3*etape3 %}
{% set idFiliere = app.request.query.get('filiere') | first %}
{% set idDiplome = app.request.query.get('diplome') | first %}
{% set affichageBas = position == 'footer' and etape == 3 %}
{% if affichageBas %}
{% set hideMe = "d-none-important" %}
{% else %}
{% set hideMe = "" %}
{% endif %}
{# ##ETAPE {{etape}}## position = {{position}} ### niveauOnglet = {{niveauOnglet}} ####
##{{etape0}}/{{etape1}}/{{etape2}}/{{etape3}}## #}
{% if etape == 0 and position == "header" %}
<div class="title-aide-dip collapsed" data-bs-toggle="collapse" data-bs-target="#stepDiplome">Diplômes : Aide à l'orientation</div>
<div id="stepDiplome" class="collapse p-4 mb-3 step-diplome {{ typeOnglet }}">
<div class="diplome-aide position-relative">
<div class="stepwizard pt-2 pb-2 d-flex align-items-center flex-column flex-lg-row">
<div class="steps setup-panel d-flex justify-content-between position-relative">
<div class="stepwizard-step step1 text-center">
{# TODO ajout classe btn clicked pour le changement d'image hexagonal #}
<a href="#step-1" type="button" class="btn clicked position-relative">
<strong class="btn1 position-relative">1</strong>
<small class="d-flex one mt-4">Niveau de formation</small>
</a>
</div>
<div class="stepwizard-step step2 text-center">
<a href="#step-2" type="button" class="btn position-relative" disabled="disabled">
<strong class="btn2 position-relative">2</strong>
<small class="d-flex two mt-4">Filières</small>
</a>
</div>
<div class="stepwizard-step step3 text-center">
<a href="#step-3" type="button" class="btn position-relative" disabled="disabled">
<strong class="btn3 position-relative">3</strong>
<small class="d-flex justify-content-center three mt-4">Diplômes</small>
</a>
</div>
</div>
</div>
<!-- Step 1 -->
<form role="diplome-choice" action="" method="post" class="d-flex pl-5 pr-5 all-steps justify-content-center">
<div class="setup-content" id="step-1">
<div class="">
<h2 class="title font-weight-bold text-center pb-2">Quel niveau de formation souhaitez-vous ?</h2>
<div class="d-flex justify-content-center">
<div class="btn-group w-100 flex-wrap" role="group" aria-label="checkbox buttons">
{% if idsFiltresContexte|filter(v => v starts with 'LYCPRO-CAP-')|length > 0 %}
{% set url = lieu is defined and lieu.slug != 'default' ?
path('annuaire_liste_par_onglet_localisation', {"niveauOnglet": 'cap', "typeOnglet": "professionnel", "localisation": lieu.slug}) :
path('annuaire_liste_par_onglet', {"niveauOnglet": 'cap', "typeOnglet": "professionnel"}) %}
<a class="btn col-lg mb-3" href="{{url}}">CAP</a>
{% endif %}
{% if idsFiltresContexte|filter(v => v starts with 'LYCPRO-BACP-')|length > 0 %}
{% set url = lieu is defined and lieu.slug != 'default' ?
path('annuaire_liste_par_onglet_localisation', {"niveauOnglet": 'bac-pro', "typeOnglet": "professionnel", "localisation": lieu.slug}) :
path('annuaire_liste_par_onglet', {"niveauOnglet": 'bac-pro', "typeOnglet": "professionnel"}) %}
<a class="btn col-lg mb-3" href="{{url}}">Bac Pro</a>
{% endif %}
{% if idsFiltresContexte|filter(v => v starts with 'LYCPRO-FPC-')|length > 0 %}
{% set url = lieu is defined and lieu.slug != 'default' ?
path('annuaire_liste_par_onglet_localisation', {"niveauOnglet": 'formation-pro-continue', "typeOnglet": "professionnel", "localisation": lieu.slug}) :
path('annuaire_liste_par_onglet', {"niveauOnglet": 'formation-pro-continue', "typeOnglet": "professionnel"}) %}
<a class="btn col-lg" href="{{url}}">Formation Pro Continue</a>
{% endif %}
</div>
</div>
</div>
</div>
</form>
</div>
</div>
{% elseif etape == 1 %}
<div class="title-aide-dip collapsed" data-bs-toggle="collapse" data-bs-target="#stepDiplome" aria-expanded="true">Diplômes : Aide à l'orientation</div>
<div id="stepDiplome" class="collapse p-4 mb-3 step-diplome {{ typeOnglet }} show">
<div class="diplome-aide position-relative">
<div class="stepwizard pt-2 pb-2 d-flex align-items-center flex-column flex-lg-row">
{#
<div class="font-weight-bold color"><span class="title">Diplômes : </span>Aide à l'orientation</div>
#}
<div class="steps setup-panel d-flex justify-content-between position-relative">
<div class="stepwizard-step step1 text-center">
<a href="/onglet/professionnel" type="button" class="btn position-relative">
<strong class="btn1 position-relative">1</strong>
<small class="d-flex one mt-4">Niveau de formation</small>
</a>
</div>
<div class="stepwizard-step step2 text-center">
<a href="#" type="button" class="btn clicked position-relative" disabled="disabled">
<strong class="btn2 position-relative">2</strong>
<small class="d-flex two mt-4">Filières</small>
</a>
</div>
<div class="stepwizard-step step3 text-center">
<a href="#step-3" type="button" class="btn position-relative" disabled="disabled">
<strong class="btn3 position-relative">3</strong>
<small class="d-flex justify-content-center three mt-4">Diplômes</small>
</a>
</div>
</div>
</div>
<!-- Step 2 -->
<form role="diplome-choice" action="" method="post" class="d-flex pl-5 pr-5 all-steps justify-content-center">
<div class="setup-content" id="step-2">
<div class="">
<h2 class="title font-weight-bold text-center">Quelles filières {{niveauOnglet | niveauLibelle}} envisagez-vous ?</h2>
<div class="d-flex justify-content-center">
<div class="list-items">
{# TODO à dynamiser niveau de formation #}
<ul class="card-three-columns">
{% for filiere in filieres %}
{% set url = lieu is defined and lieu.slug != 'default' ?
path('annuaire_liste_par_onglet_localisation', {"niveauOnglet": niveauOnglet, "typeOnglet": typeOnglet, "localisation": lieu.slug}) :
path('annuaire_liste_par_onglet', {"niveauOnglet": niveauOnglet, "typeOnglet": typeOnglet}) %}
<li class="position-relative step-diplome-li"><a href="{{url}}?filiere[]={{filiere.id}}">{{filiere | itemsLibelle}}</a></li>
{% else %}
<style>
.list-description {
display: none;
}
</style>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
{% elseif etape == 2 or (etape == 3 and position == "footer") %}
<div class="title-aide-dip collapsed" data-bs-toggle="collapse" data-bs-target="#stepDiplome" aria-expanded="true">Diplômes : Aide à l'orientation</div>
<div id="stepDiplome" class="collapse p-4 mb-3 step-diplome {{ typeOnglet }} show">
<div class="diplome-aide position-relative">
<div class="stepwizard pt-2 pb-2 d-flex align-items-center flex-column flex-lg-row {{hideMe}}">
{#
<div class="font-weight-bold color"><span class="title">Diplômes : </span>Aide à l'orientation</div>
#}
<div class="steps setup-panel d-flex justify-content-between position-relative">
<div class="stepwizard-step step1 text-center">
<a href="/onglet/professionnel" type="button" class="btn position-relative">
<strong class="btn1 position-relative">1</strong>
<small class="d-flex one mt-4">Niveau de formation</small>
</a>
</div>
<div class="stepwizard-step step2 text-center">
<a href="/onglet/professionnel/{{niveauOnglet}}" type="button" class="btn position-relative" disabled="disabled">
<strong class="btn2 position-relative">2</strong>
<small class="d-flex two mt-4">Filières</small>
</a>
</div>
<div class="stepwizard-step step3 text-center">
<a href="#step-3" type="button" class="btn clicked position-relative" disabled="disabled">
<strong class="btn3 position-relative">3</strong>
<small class="d-flex justify-content-center three mt-4">Diplômes</small>
</a>
</div>
</div>
</div>
<!-- Step 3 -->
<form role="diplome-choice" action="" method="post" class="d-flex pl-5 pr-5 all-steps justify-content-center">
<div class="setup-content" id="step-3">
<div class="">
{# TODO à dynamiser nom du diplôme #}
<h2 class="title font-weight-bold text-center">Liste des <a href="/onglet/professionnel/{{niveauOnglet}}" class="wizard-niveau-professionnel">diplômes {{niveauOnglet | niveauLibelle}}</a> : {{ idFiliere | itemIdLibelle}}</h2>
<p class="font-weight-bolder font-italic text-center {{hideMe}}">En sélectionnant l'un des diplômes ci-dessous, découvrez les établissements dispensant ce diplôme :</p>
<div class="d-flex justify-content-center">
<div class="list-items">
{# TODO à dynamiser liste diplômes #}
<ul class="card-three-columns">
{% for diplome in diplomes %}
<li class="position-relative step-diplome-li">
{% set url = lieu is defined and lieu.slug != 'default' ?
path('annuaire_liste_par_onglet_localisation', {"niveauOnglet": niveauOnglet, "typeOnglet": typeOnglet, "localisation": lieu.slug}) :
path('annuaire_liste_par_onglet', {"niveauOnglet": niveauOnglet, "typeOnglet": typeOnglet}) %}
<a href="{{ url }}?filiere[]={{idFiliere}}&diplome[]={{diplome.id}}">{{diplome | itemsLibelle}} {% if diplome.options is not empty %} - {{ diplome.options }} {% endif %}</a>
</li>
{% else %}
<style>
.list-description {
display: none;
}
</style>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
{% endif %}