{# BASE LOAD #}
{% extends 'base.html.twig' %}
{# TITLE TOP PAGE #}
{% block title %}CPI | {% if app.request.locale == 'fr' %}Formation{% else %}Training{% endif %}{% endblock %}
{# CSS #}
{% block stylesheet %}
<link rel="stylesheet" href="{{ asset('css/formation.css')}}">
{% endblock %}
{# BODY HOME PAGE #}
{% block body %}
<main>
<!-- AJOUT DU CMS -->
<main>
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ GESTION DES SECTION ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% set i = 0 %}
{% for section in sections %}
{% set i = i +1 %}
<section id="section" style="
{% if section.image %}
background-image: url(../uploads/sections/{{section.image}});
background-size: contain;
background-repeat: no-repeat;
background-color: #1D016F!important;
{% else %}
background-color:#1D016F;
{% endif %}
{% if i > 1 %}
margin-top:54px
{% endif %}
">
<style>
.accordion-body li{
color:white;
}
.accordion-body li p{
margin-bottom:0
}
</style>
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% for res in section.lignes %}
<div id="{% if i == 1 %}sectionMain{% else %}sectionReste{% endif %}" data-aos="fade-up" data-aos-duration="1000" style="{% if i == 1 %}padding-top:237px;padding-bottom:237px;{% else %}padding-top:112px; padding-bottom:112px;{% endif %}">
<div class="container text-light pb-3">
<div class="row pt-5 justify-content-center justify-content-md-start">
{% for res2 in res.blocs %}
<div id="bloc{{res2.id}}" data-aos="fade-up" data-aos-duration="1000" class="
{% if res2.type == 2 %}
col-xl-2 col-12
{% endif %}
{% if res2.type == 3 %}
col-xxl-3 col-md-6 col-12
{% endif %}
{% if res2.type == 4 %}
col-xxl-4 col-md-6 col-12
{% endif %}
{% if res2.type == 6 %}
col-lg-6 col-12
{% endif %}
{% if res2.type == 8 %}
col-12
{% endif %}
{% if res2.type == 12 %}
col-12
{% endif %}
" {% if app.user %} style="border:dashed 1px grey; border-radius:10px; margin-bottom:10px"{% endif %}>
{% if res2.contenuses is not empty %}
{% if res2.contenuses.0.typesContenus.id != 8 %}
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ AFFCHER CONTENUS ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ TEXTE ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 1 %}
{% if app.request.locale == 'en' %}{{res2.contenuses.0.TexteEn|raw}}{% else %}{{res2.contenuses.0.TexteFr|raw}}{% endif %}
{% if res2.contenuses.0.document is not empty %}
<a href="{{res2.contenuses.0.document}}" target="_blank" style="text-decoration:none;">
<button type="button btn-modal" class="justify-content-center align-items-center text-center"
style="
background-color:{{res2.contenuses.0.background}}!important;
border:solid 3px {{res2.contenuses.0.couleur1}}!important;
border-radius: 30px!important;
color: rgb(0, 206, 255);
font-weight: bold;
background-color: #0c24b3;
cursor: pointer;
padding-top: 12px;
padding-left: 50px;
padding-right: 50px;
margin-top:20px
">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}</button>
</a>
{% endif %}
{% endif %}
{% if i == 1 %}
{% if loop.first %}
<div class="traitBlanc"></div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN TEXTE ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ IMAGE ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
{% if res2.contenuses.0.typesContenus.id == 2 %}
<div class="col-12 d-flex d-lg-block justify-content-center mt-5 mt-lg-0">
<img data-aos="fade-up" data-aos-duration="1000" class="img-fluid imgRadius" src="{{asset('uploads/contenus/'~res2.contenuses.0.image)}}" alt="{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}">
</div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN IMAGE ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ VIDEOS ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
{% if res2.contenuses.0.typesContenus.id == 3 %}
<div data-aos="fade-up" data-aos-duration="1000" class="col-12 justify-content-center">
<div class="image">
<iframe class="img-fluid" style="height: 165px !important; width: 100% !important; border-radius: 15px!important;" src="{{res2.contenuses.0.video}}" title="YouTube video {% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<div class="texte">
<p style="font-weight:bold">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}
</p>
</div>
</div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN VIDEO ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ BOX PICTO ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
{% if res2.contenuses.0.typesContenus.id == 4 %}
<div data-aos="fade-up" data-aos-duration="1000" class="carte">
<div class="image d-flex justify-content-center">
<img src="{{asset('uploads/contenus/'~res2.contenuses.0.image)}}" alt="{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}">
</div>
<div class="corps-carte">
<div class="tete-carte" style="background-color:{{res2.contenuses.0.background}}">
<p>{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}</p>
</div>
<div class="texte-carte" style="min-height:204px; background-color:{{res2.contenuses.0.couleur1}}">
<div class="texte-1">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.TexteEn|raw}}{% else %}{{res2.contenuses.0.TexteFr|raw}}{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN BOX PICTO ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ AVANTAGES ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
{% if res2.contenuses.0.typesContenus.id == 7 %}
<div data-aos="fade-up" data-aos-duration="1000" class="avantages">
<div class="carteA bg-bleu" style="background-color:{{res2.contenuses.0.background}}">
<div class="tete-carte d-flex flex-column flex-md-row">
{% if res2.contenuses.0.image != '' %}
<img class="img-fluid" src="{{asset('uploads/contenus/'~res2.contenuses.0.image)}}" alt="">
{% endif %}
<span style="font-weight:bold">{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}</span>
</div>
<div class="texte-carte">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.TexteEn|raw}}{% else %}{{res2.contenuses.0.TexteFr|raw}}{% endif %}
</div>
</div>
</div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN AVANTAGES ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ACCORDEON ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 8 %}
<div data-aos="fade-up" data-aos-duration="1000" class="texteDeroulant text-light">
<div class="accordion" id="accordionExample">
{% set ac = 0 %}
<div style="margin-bottom:32px;">
{% if app.request.locale == 'fr' %}{{res2.contenuses.0.titreFr|raw}}{% else %}{{res2.contenuses.0.titreEn|raw}}{% endif %}
</div>
{% for res3 in res2.contenuses.0.accordeons %}
{% set ac = ac+1 %}
<div class="accordion-item" style="background-color:{{res3.background}}!important;">
<h2 class="accordion-header" id="heading{{res3.id}}">
<button class="button1-accordion accordion-button" style="background-color:{{res3.background}}!important;" type="button" data-bs-toggle="collapse" data-bs-target="#collapse{{res3.id}}" aria-expanded="true" aria-controls="collapse{{res3.id}}">
<i class="fa {{ ac == 1 ? 'fa-plus-circle' : 'fa-plus-circle' }}" style="margin-right:10px;font: normal!important;" aria-hidden="true"></i>{% if app.request.locale == 'en' %}{{res3.TitreEn|raw}}{% else %}{{res3.TitreFr|raw}}{% endif %}
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse {% if ac == 1 %}{% endif %}" aria-labelledby="heading{{res3.id}}" data-bs-parent="#accordionExample">
<div class="accordion-body">
<div class="accordion-hr"></div>
{% if app.request.locale == 'en' %}{{res3.TexteEn|raw}}{% else %}{{res3.TexteFr|raw}}{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<script>
$(document).ready(function () {
$('.accordion-button').click(function () {
$(this).find('i').toggleClass('fa-plus-circle fa-minus-circle');
$('.accordion-button').not(this).find('i').removeClass('fa-minus-circle').addClass('fa-plus-circle');
});
});
</script>
{% if app.user %}
<br>
<div class="d-flex justify-content-center">
<a href="{{path('app_accordeons_index',{'contenu':res2.contenuses.0.id})}}"><button type="button" style="margin-bottom:5px" class="btn btn-info" >Gérer les accordéons</button></a>
</div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN ACCORDEON ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ BOX PICTO CAROUSEL ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 10 %}
<div data-aos="fade-up" data-aos-duration="1000" class="container d-flex paddingPerso2" >
<div class="slider-demo-valeur">
{% for carou in res2.contenuses.0.carousels %}
<div data-aos="fade-up" data-aos-duration="1000" class="carte ">
<div class="col-12">
<div class="image d-flex justify-content-center">
<img src="{{asset('uploads/carousels/'~carou.image)}}" alt="{% if app.request.locale == 'en' %}{{carou.titreEn}}{% else %}{{carou.titreFr}}{% endif %}">
</div>
<div class="corps-carte">
<div class="tete-carte">
<p>{% if app.request.locale == 'en' %}{{carou.titreEn|raw}}{% else %}{{carou.titreFr|raw}}{% endif %} </p>
</div>
<div class="texte-carte">
<div class="texte-1">
{% if app.request.locale == 'en' %}{{carou.texteEn|raw}}{% else %}{{carou.texteFr|raw}}{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if app.user %}
{% if res2.contenuses.0.typesContenus.id == 10 %}
<br>
<div data-aos="fade-up" data-aos-duration="1000" class="d-flex justify-content-center">
<a href="{{path('app_carousels_index',{'contenu':res2.contenuses.0.id})}}"><button type="button" style="margin-bottom:5px" class="btn btn-info" >Gérer les carousels</button></a>
</div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN BOXPICTO CAROUSEL ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ BOX PICTO CAROUSEL ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 11 %}
<div class="row justify-content-center justify-content-md-start" >
<div class="col-12">
<div class="row pb-4">
<div class="titre ">
<p class="opensans_bold_red_15">TEMOIGNAGES</p>
</div>
</div>
</div>
</div>
{% set tem = -1 %}
<div class="row text-light" >
<div class="col-12">
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
{% for res in temoignages %}
{% set tem = tem + 1 %}
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="{{tem}}" {% if tem == 0 %}class="active" aria-current="true"{% endif %} aria-label="Slide {{tem}}"></button>
{% endfor %}
</div>
{% set tem2 = -1 %}
<div class="carousel-inner">
{% for res in temoignages %}
{% set tem2 = tem2 + 1 %}
<div class="carousel-item {% if tem2 == 0 %}active{% endif %}">
<div class="row text-light">
<h2 class="">{{res.titre}}</hé>
</div>
<br>
<p class="citation ">{{res.texte}}</p>
<br>
<p style="color:red; font-weight: bold; ">{{res.auteur}}</p>
</div>
{% endfor %}
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</div>
{% if app.user %}
{% if res2.contenuses.0.typesContenus.id == 11 %}
<br>
<div class="d-flex justify-content-center">
<a href="{{path('app_temoignages_index')}}"><button type="button" style="margin-bottom:5px" class="btn btn-info" >Gérer les témoignages</button></a>
</div>
{% endif %}
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN BOX PICTO CAROUSEL ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ CAROUSEL ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 9 %}
<div class="formation">
<div class="container-carousel-true">
<div class="slider-demo-galerie " style="padding-bottom:120px;">
{% for carou in res2.contenuses.0.carousels %}
<div class="carteFormation" style="">
<img src="{{asset('uploads/carousels/'~carou.image)}}" alt="{% if app.request.locale == 'en' %}{{carou.titreEn}}{% else %}{{carou.titreFr}}{% endif %}">
{% if carou.titreEn != '' or carou.titreFr != '' %}
<div class="image-overlay1">
<p class="sous-title-manufa">{% if app.request.locale == 'en' %}{{carou.titreEn|raw}}{% else %}{{carou.titreFr|raw}}{% endif %}</p>
</div>
{% endif %}
{% if carou.texteEn != '' or carou.texteFr != '' %}
{% if app.request.locale == 'en' %}{{carou.texteEn|raw}}{% else %}{{carou.texteFr|raw}}{% endif %}
{% endif %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if app.user %}
{% if res2.contenuses.0.typesContenus.id == 9 %}
<br>
<div class="d-flex justify-content-center">
<a href="{{path('app_carousels_index',{'contenu':res2.contenuses.0.id})}}"><button type="button" style="margin-bottom:5px" class="btn btn-info" >Gérer les carousels</button></a>
</div>
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ FIN CAROUSEL ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ CHIFFRES CLES ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 5 %}
<div class="cartes-3" style="background:{{res2.contenuses.0.background}}; border-radius: 30px;">
<div class="carte">
{% if res2.contenuses.0.image is not empty %}
<img src="{{asset('uploads/contenus/'~res2.contenuses.0.image)}}" alt="" style="width:100%;height:100%;border-radius:25px;">
{% else %}
<div class="titre">
<p>{% if app.request.locale == 'en' %}{{res2.contenuses.0.titreEn|raw}}{% else %}{{res2.contenuses.0.titreFr|raw}}{% endif %} </p>
</div>
<div class="texte">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.texteEn|raw}}{% else %}{{res2.contenuses.0.texteFr|raw}}{% endif %}
</div>
{% endif %}
</div>
</div>
{% endif %}
<!-- ///\\\ ///\\\ FIN CHIFFRES CLES ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ CHIFFRES CLES 2 ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 6 %}
<div class="accueil4">
<div {% if res2.contenuses.0.titreFr|length > 4 %}id="soixante-dix"{% endif %} class="carte">
<div class="tete-carte" style="background-color:{{res2.contenuses.0.background}}">
<div class="chiffre justify-content-center" style="background-color:{{res2.contenuses.0.background}}">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.titreEn|raw}}{% else %}{{res2.contenuses.0.titreFr|raw}}{% endif %}
</div>
</div>
<div class="texte">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.texteEn|raw}}{% else %}{{res2.contenuses.0.texteFr|raw}}{% endif %}
</div>
</div>
</div>
{% endif %}
<!-- ///\\\ ///\\\ FIN CHIFFRES CLES 2 ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ BOX PICTO + LIEN ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 13 %}
<div data-aos="fade-up" data-aos-duration="1000" class="carte">
<div class="image d-flex justify-content-center">
<img src="{{asset('uploads/contenus/'~res2.contenuses.0.image)}}" alt="{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}">
</div>
<div class="corps-carte">
<div class="tete-carte" style="background-color:{{res2.contenuses.0.background}}">
<p>{% if app.request.locale == 'en' %}{{res2.contenuses.0.TitreEn|raw}}{% else %}{{res2.contenuses.0.TitreFr|raw}}{% endif %}</p>
</div>
<div class="texte-carte" style="min-height:204px; background-color:{{res2.contenuses.0.couleur1}}">
<div class="texte-1">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.TexteEn|raw}}{% else %}{{res2.contenuses.0.TexteFr|raw}}{% endif %}
</div>
</div>
/div>
</div>
{% endif %}
<!-- ///\\\ ///\\\ FIN BOX PICTO + LIEN ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
<!-- ///\\\ ///\\\ BOUTTON ///\\\ ///\\\ -->
{% if res2.contenuses.0.typesContenus.id == 12 %}
<a href="{{res2.contenuses.0.document}}" target="_blank" style="text-decoration:none;">
<button type="button btn-modal" class=""
style="
background-color:{{res2.contenuses.0.background}};
border:solid 3px {{res2.contenuses.0.couleur1}};
border-radius: 30px!important;
padding-right: 2%!important;
padding-left: 2%!important;
padding-top: 3%!important;
width: 400px;
float:right;
">
{% if app.request.locale == 'en' %}{{res2.contenuses.0.TexteEn|raw}}{% else %}{{res2.contenuses.0.TexteFr|raw}}{% endif %}</button>
</a>
{% endif %}
<!-- ///\\\ ///\\\ FIN BOUTTON ///\\\ ///\\\ -->
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ BOUTON MODIFIER CMS ///\\\ ///\\\ -->
{% if res2.contenuses is not empty %}
{% if res2.contenuses.0.typesContenus.id != 10 and res2.contenuses.0.typesContenus.id != 9 %}
{% if app.user %}
<div class="d-flex justify-content-center mb-3">
<a href="{{path('app_editContent',{'id':res2.contenuses.0.id,'type':res2.contenuses.0.typesContenus.libelle})}}">
<div class="d-flex justify-content-center align-items-center cubeIcon">
<i class="fa-solid fa-pen"></i>
</div>
</a>
</div>
{% endif %}
{% endif %}
{% endif %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ MODAL CONTENUS ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
{% if app.user %}
<!-- ///\\\ ///\\\ MODAL CONTENUS ///\\\ ///\\\ -->
<div class="modal fade" id="addContenu{{res2.id}}" tabindex="-1" aria-labelledby="addContenu" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="container-modal d-flex flex-column">
<h2>Ajouter un contenu</h2>
<p>Les «blocs» peuvent contenir chacun un «Contenu» dédiés à du texte, une image, un lien youtube, …</p>
</div>
<div class="container-contenu d-flex flex-wrap justify-content-start">
<a href="{{path('app_addContent',{'bloc':res2.id,'type':'texte'})}}">
<div class="container-picto container-picto-texte">
<div class="simu-grid-picto d-flex justify-content-center align-items-center">
<img src="{{asset('img/cms/cpi-textes.svg')}}" alt="">
</div>
<p class="colonneText text-center">Texte</p>
</div>
</a>
<a href="{{path('app_addContent',{'bloc':res2.id,'type':'image'})}}">
<div class="container-picto container-picto-texte">
<div class="simu-grid-picto d-flex justify-content-center align-items-center">
<img src="{{asset('img/cms/cpi-images.svg')}}" alt="">
</div>
<p class="colonneText text-center">Image</p>
</div>
</a>
<a href="{{path('app_addContent',{'bloc':res2.id,'type':'video'})}}">
<div class="container-picto container-picto-texte">
<div class="simu-grid-picto d-flex justify-content-center align-items-center">
<img src="{{asset('img/cms/cpi-videos.svg')}}" alt="">
</div>
<p class="colonneText text-center">Vidéo</p>
</div>
</a>
<a href="{{path('app_addContent',{'bloc':res2.id,'type':'temoignage'})}}">
<div class="container-picto container-picto-texte">
<div class="simu-grid-picto d-flex justify-content-center align-items-center">
<img src="{{asset('img/cms/cpi-temoignage.svg')}}" alt="">
</div>
<p class="colonneText text-center">{% if app.request.locale == 'fr' %}Témoignage{% else %}Testimonial{% endif %}</p>
</div>
</a>
<a href="{{path('app_addContent',{'bloc':res2.id,'type':'button'})}}">
<div class="container-picto container-picto-texte">
<div class="simu-grid-picto d-flex justify-content-center align-items-center">
<img src="{{asset('img/cms/cpi-temoignage.svg')}}" alt="">
</div>
<p class="colonneText text-center">Bouton</p>
</div>
</a>
</div>
<div class="modal-submit d-flex justify-content-end align-items-end">
<button type="submit" class=" btnAdd btnAdd2">{% if app.request.locale == 'fr' %}Ajouter{% else %}Add{% endif %}</button>
</div>
</div>
</div>
</div>
</div>
<!-- ///\\\ ///\\\ FIN MODAL CONTENUS ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ MODAL CONTENUS 2 ///\\\ ///\\\ -->
<div class="modal fade" id="addContenu{{res2.id}}" tabindex="-1" aria-labelledby="addContenu" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="container-modal d-flex flex-column">
<h2>Ajouter un contenu</h2>
<p>Les «blocs» sont des éléments de « Section » répartis en colonnes contenant chacun un «Contenu» dédiés à du texte, une image ou un lien youtube.</p>
</div>
<div class="container-grid-choix d-flex flex-wrap justify-content-around ">
<a href="{{path('app_addContent',{'bloc':res2.id,'type':'texte'})}}">
<div class="container-choix">
<div class="simu-grid d-flex justify-content-center align-items-center">
<div class="simu-col simu-col-12 d-flex justify-content-center align-items-center">
<p>12</p>
</div>
</div>
<p class="colonneText text-center">Texte</p>
</div>
</a>
<a href="{{path('app_addBloc',{'ligne':res.id,'type':66})}}">
<div class="container-choix">
<div class="simu-grid d-flex justify-content-around align-items-center">
<div class="simu-col simu-col-6 d-flex justify-content-center align-items-center">
<p>6</p>
</div>
<div class="simu-col simu-col-6 d-flex justify-content-center align-items-center">
<p>6</p>
</div>
</div>
<p class="colonneText text-center">3 colonne</p>
</div>
</a>
<a href="{{path('app_addBloc',{'ligne':res.id,'type':444})}}">
<div class="container-choix">
<div class="simu-grid d-flex justify-content-around align-items-center">
<div class="simu-col simu-col-4 d-flex justify-content-center align-items-center">
<p>4</p>
</div>
<div class="simu-col simu-col-4 d-flex justify-content-center align-items-center">
<p>4</p>
</div>
<div class="simu-col simu-col-4 d-flex justify-content-center align-items-center">
<p>4</p>
</div>
</div>
<p class="colonneText text-center">2 colonne</p>
</div>
</a>
<a href="{{path('app_addBloc',{'ligne':res.id,'type':84})}}">
<div class="container-choix">
<div class="simu-grid d-flex justify-content-around align-items-center">
<div class="simu-col simu-col-8 d-flex justify-content-center align-items-center">
<p>8</p>
</div>
<div class="simu-col simu-col-4 d-flex justify-content-center align-items-center">
<p>4</p>
</div>
</div>
<p class="colonneText text-center">2 colonne</p>
</div>
</a>
<a href="{{path('app_addBloc',{'ligne':res.id,'type':48})}}">
<div class="container-choix">
<div class="simu-grid d-flex justify-content-around align-items-center">
<div class="simu-col simu-col-4 d-flex justify-content-center align-items-center">
<p>4</p>
</div>
<div class="simu-col simu-col-8 d-flex justify-content-center align-items-center">
<p>8</p>
</div>
</div>
<p class="colonneText text-center">2 colonne</p>
</div>
</a>
</div>
<div class="modal-submit d-flex justify-content-end align-items-end">
<button type="submit" class=" btnAdd btnAdd2">Ajouter</button>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<!-- ///\\\ ///\\\ FIN MODAL CONTENUS 2 ///\\\ ///\\\ -->
</div>
{% endfor %}
</div>
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ MODAL BLOCK ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
</div>
</div>
{% endfor %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ MODAL SECTION ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ FIN SECTION + FORME BLEU SOUS SECTION DANS LE DOM ///\\\ ///\\\ -->
</section>
<div class="container">
<div class="formeBleu">
<div class="row justify-content-center d-flex">
{% if section.rond != '' %}
<img src="{{asset('uploads/sections/'~section.rond)}}" class="img-fluid d-none d-lg-block">
{% endif %}
</div>
</div>
</div>
{% endfor %}
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ SCRIPT PCONTENT ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ ///\\\ -->
<!-- ///\\\ ///\\\ SCRIPT ACCORDEON ///\\\ ///\\\ -->
<script>
let accordionHeaders = document.querySelectorAll('.accordion-header');
accordionHeaders.forEach(header => {
let button = header.querySelector('.texteDeroulant button');
button.addEventListener('click', function () {
let parentAccordion = header.closest('.accordion');
let buttons = parentAccordion.querySelectorAll('.texteDeroulant button');
let content = header.nextElementSibling; // The content section to show/hide
// Check if the content section is already open
if (content.classList.contains('show')) {
// Close the content section
content.classList.remove('show');
content.classList.add('collapse');
} else {
// Close all other open sections (if any) and open this content section
buttons.forEach(btn => {
let contentToClose = btn.parentElement.nextElementSibling;
if (contentToClose.classList.contains('show')) {
contentToClose.classList.remove('show');
contentToClose.classList.add('collapse');
}
});
// Open the content section
content.classList.remove('collapse');
content.classList.add('show');
}
// Toggle the button color
if (button.style.color !== 'red') {
buttons.forEach(btn => {
btn.style.color = 'white';
});
button.style.color = 'red';
} else {
button.style.color = 'white';
}
});
});
let buttonsForIcon = document.querySelectorAll('.texteDeroulant button');
let icons = document.querySelectorAll('.jsIcon');
let previousIcon = null;
buttonsForIcon.forEach((button, index) => {
let icon = icons[index];
button.addEventListener('click', function () {
if (previousIcon !== null && previousIcon !== icon) {
// Restore the previous icon to fa-plus-circle
previousIcon.classList.remove('fa-minus-circle');
previousIcon.classList.add('fa-plus-circle');
}
if (icon.classList.contains('fa-plus-circle')) {
icon.classList.remove('fa-plus-circle');
icon.classList.add('fa-minus-circle');
} else {
icon.classList.remove('fa-minus-circle');
icon.classList.add('fa-plus-circle');
}
previousIcon = icon;
});
});
</script>
</section>
</main>
<script type="text/javascript">
$(document).ready(function(){
$('.slider-demo-valeur').slick({
arrows: true,
infinite:true,
prevArrow: '<button type="button" data-role="none" class="slick-prev">Previous</button>',
nextArrow: '<button type="button" data-role="none" class="slick-next">Next</button>',
slidesToShow:4,
slidesToScroll:4,
responsive:[{
breakpoint:1400,
settings:{
slidesToShow:3,
slidesToScroll:3,
}
},{
breakpoint:1200,
settings:{
slidesToShow:2,
slidesToScroll:2,
}
},
{
breakpoint:769,
settings:{
slidesToShow:1,
slidesToScroll:1,
}
}],
});
});
</script>
<script>
function changeLanguage(selectedButton, modalId) {
let modal = document.getElementById(modalId);
let buttons = modal.querySelectorAll(".button-langue");
let inputField = modal.querySelector(".sectionTitle");
buttons.forEach((button) => {
if (button === selectedButton) {
button.classList.add("button-langue-active");
button.classList.remove("button-langue-noactive");
// Set the input field value based on the active language
switch (button.textContent) {
case "FR":
inputField.value = "Titre de la section FR";
break;
case "EN":
inputField.value = "Section Title EN";
break;
case "DE":
inputField.value = "Abschnittstitel DE";
break;
// Add cases for other languages if needed
default:
inputField.value = "";
}
} else {
button.classList.remove("button-langue-active");
button.classList.add("button-langue-noactive");
}
});
}
function changeColor(selectedColorButton, modalId) {
let modal = document.getElementById(modalId);
const colorButtons = modal.querySelectorAll(".button-couleur");
colorButtons.forEach((colorButton) => {
if (colorButton === selectedColorButton) {
colorButton.classList.add("button-color-active");
colorButton.classList.remove("button-color-noactive");
} else {
colorButton.classList.remove("button-color-active");
colorButton.classList.add("button-color-noactive");
}
});
}
function clearDefaultText(inputField) {
// Clear the default value if it matches the default text
if (inputField.value === inputField.defaultValue) {
inputField.value = '';
}
}
function restoreDefaultText(inputField) {
// Restore the default value if the input is empty
if (inputField.value === '') {
inputField.value = inputField.defaultValue;
}
}
</script>
<!-- ///\\\ ///\\\ IMPORT ///\\\ ///\\\ -->
<script type="text/javascript">
$(document).ready(function() {
$('.slider-demo-galerie').slick({
arrows: true,
infinite:true,
autoplay: true, // Ajout de l'option autoplay
autoplaySpeed: 4000, // Durée de chaque diapositive en millisecondes
slidesToShow:4,
slidesToScroll:4,
prevArrow: '<button type="button" data-role="none" class="slick-prev">Previous</button>',
nextArrow: '<button type="button" data-role="none" class="slick-next">Next</button>',
responsive:[{
breakpoint:1400,
settings: {
slidesToShow:3,
slidesToScroll:3,
}
},{
breakpoint:1200,
settings:{
slidesToShow:2,
slidesToScroll:2,
}
},
{
breakpoint:769,
settings:{
slidesToShow:1,
slidesToScroll:1,
}
}],
});
$('.slider-demo-actu').slick({
arrows: true,
infinite: true,
prevArrow: '<button type="button" data-role="none" class="slick-prev">Previous</button>',
nextArrow: '<button type="button" data-role="none" class="slick-next">Next</button>',
slidesToShow: 4,
slidesToScroll: 4,
responsive:[{
breakpoint:1400,
settings:{
slidesToShow:3,
slidesToScroll:3,
}
},{
breakpoint:1200,
settings:{
slidesToShow:2,
slidesToScroll:2,
}
},
{
breakpoint:769,
settings:{
slidesToShow:1,
slidesToScroll:1,
}
}],
});
});
</script>
<!-- FIN CMS -->
<style>
.dropdown-menu{
z-index:9999!important;
}
</style>
{% set typeSelected = app.request.query.get('type') %}
{% set sujetSelected = app.request.query.get('sujet') %}
{% set logicielSelected = app.request.query.get('logiciel') %}
{% set versionSelected = app.request.query.get('version') %}
{% set formationSelected = app.request.query.get('formation') %}
<style>
.btn-dangerr{
background-color:#30278E!important;
font-weight:bold!important;
color:white!important;
}
</style>
<div class="accueil2" id="formaList">
<div class="container">
<div class="row change" style="padding-top: 112px;">
<div class="col-12">
<p data-aos="fade-right" data-aos-duration="1000" class="sous-titre">{% trans %}formation-soustitre{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':84})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</p>
<h1 data-aos="fade-right" data-aos-duration="1000" class="primaire-blue">{% trans %}notre-catalogue-titre{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':85})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</h1>
</div>
<div class="tri_formations my-4" >
<div class="col-12">
<div class="row d-flex justify-contenttbetween">
<div class="col-6 col-md-4 col-lg-2 d-flex justify-content-start align-items-center" style="z-index:3">
<div data-aos="fade-up" data-aos-duration="1000" class="dropdown my-3" >
<button class="btn {{ (typeSelected == 'all' or typeSelected is null) ? 'btn-secondary' : 'btn-dangerr' }} dropdown-toggle" type="button" id="dropdownMenuButtonType" data-bs-toggle="dropdown" aria-expanded="false" style="">
{% if typeSelected and typeSelected != 'all' %}
{% for res in types %}
{% if res.id == typeSelected %}
{% set title = app.request.locale == 'fr' ? res.titreFr : res.titreEn %}
{{ title|length > 10 ? title|slice(0, 11) ~ '...' : title }}
{% endif %}
{% endfor %}
{% else %}
{{ app.request.locale == 'fr' ? 'Type' : 'Type' }}
{% endif %}
</button>
<ul class="dropdown-menu" >
<li>
<a style="font-weight:600;" class="dropdown-item text-light font-weight-bold" href="{{ path('formations', {'type': 'all', 'sujet': sujetSelected, 'formation': formationSelected, 'logiciel': logicielSelected, 'version': versionSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}Tous les Types{% else %}All Types{% endif %}
</a>
</li>
{% for res in types %}
<li><a class="dropdown-item text-light" href="{{ path('formations', {'type': res.id, 'sujet': sujetSelected, 'logiciel': logicielSelected,'formation': formationSelected, 'version': versionSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}
</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2 d-flex justify-content-start align-items-center" style="z-index:4">
<div data-aos="fade-up" data-aos-duration="1000" class="dropdown my-3" style="">
<button class="btn {{ sujetSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" id="dropdownMenuButtonType" data-bs-toggle="dropdown" aria-expanded="false">
{% if sujetSelected %}
{% for res in sujets %}
{% if res.id == sujetSelected %}
{% set title = app.request.locale == 'fr' ? res.titreFr : res.titreEn %}
{{ title|length > 10 ? title|slice(0, 11) ~ '...' : title }}
{% endif %}
{% endfor %}
{% else %}
{% set defaultTitle = app.request.locale == 'fr' ? 'Sujet' : 'Subject' %}
{{ defaultTitle|length > 10 ? defaultTitle|slice(0, 11) ~ '...' : defaultTitle }}
{% endif %}
</button>
<ul class="dropdown-menu" >
<li>
<a style="font-weight:600;" class="dropdown-item text-light font-weight-bold" href="{{ path('formations', {'sujet': '', 'type': typeSelected,'formation': formationSelected, 'logiciel': logicielSelected, 'version': versionSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}Tous les Sujets{% else %}All Subjects{% endif %}
</a>
</li>
{% for res in sujets %}
<li><a class="dropdown-item text-light" href="{{ path('formations', {'sujet': res.id, 'type': typeSelected, 'logiciel': logicielSelected, 'formation': formationSelected,'version': versionSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}
</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2 d-flex justify-content-start align-items-center" style="z-index:2">
<div data-aos="fade-up" data-aos-duration="1000" class="dropdown my-3" style="">
<button class="btn {{ logicielSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" id="dropdownMenuButtonType" data-bs-toggle="dropdown" aria-expanded="false">
{% if logicielSelected %}
{% for res in logiciels %}
{% if res.id == logicielSelected %}
{% set title = app.request.locale == 'fr' ? res.titreFr : res.titreEn %}
{{ title|length > 10 ? title|slice(0, 11) ~ '...' : title }}
{% endif %}
{% endfor %}
{% else %}
{% set defaultTitle = app.request.locale == 'fr' ? 'Logiciel' : 'Software' %}
{{ defaultTitle|length > 10 ? defaultTitle|slice(0, 11) ~ '...' : defaultTitle }}
{% endif %}
</button>
<ul class="dropdown-menu" >
<li>
<a style="font-weight:600;" class="dropdown-item text-light font-weight-bold" href="{{ path('formations', {'logiciel': '', 'type': typeSelected, 'sujet': sujetSelected, 'formation': formationSelected,'version': versionSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}Tous les Logiciels{% else %}All Software{% endif %}
</a>
</li>
{% for res in logiciels %}
<li>
<a class="dropdown-item text-light" href="{{ path('formations', {'logiciel': res.id, 'type': typeSelected, 'sujet': sujetSelected, 'version': versionSelected,'formation': formationSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2 d-flex justify-content-start align-items-center" style="z-index:2">
<div data-aos="fade-up" data-aos-duration="1000" class="dropdown my-3" >
<button class="btn {{ versionSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" id="dropdownMenuButtonType" data-bs-toggle="dropdown" aria-expanded="false">
{% if versionSelected %}
{% for res in versions %}
{% if res.id == versionSelected %}
{% set title = app.request.locale == 'fr' ? res.titreFr : res.titreEn %}
{{ title|length > 10 ? title|slice(0, 11) ~ '...' : title }}
{% endif %}
{% endfor %}
{% else %}
{% set defaultTitle = app.request.locale == 'fr' ? 'Version' : 'Version' %}
{{ defaultTitle|length > 10 ? defaultTitle|slice(0, 11) ~ '...' : defaultTitle }}
{% endif %}
</button>
<ul class="dropdown-menu" >
<li>
<a style="font-weight:600;" class="dropdown-item text-light font-weight-bold" href="{{ path('formations', {'version': '', 'type': typeSelected, 'sujet': sujetSelected, 'logiciel': logicielSelected, 'formation': formationSelected,'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}Toutes les Versions{% else %}All Versions{% endif %}
</a>
</li>
{% for res in versions %}
<li>
<a class="dropdown-item text-light" href="{{ path('formations', {'version': res.id, 'type': typeSelected, 'sujet': sujetSelected, 'logiciel': logicielSelected, 'formation': formationSelected,'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2 d-flex justify-content-start align-items-center zIndexControl" style="z-index:1">
<div data-aos="fade-up" data-aos-duration="1000" class="dropdown my-3" style="position:relative">
<button id="dropdownButton" class="btn {{ formationSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{% if formationSelected %}
{% for res in formation %}
{% if res.titreFr == formationSelected %}
{% set title = app.request.locale == 'fr' ? res.titreFr : res.titreEn %}
{{ title|length > 10 ? title|slice(0, 11) ~ '...' : title }}
{% endif %}
{% endfor %}
{% else %}
{% set defaultTitle = app.request.locale == 'fr' ? 'Formation' : 'Training' %}
{{ defaultTitle|length > 10 ? defaultTitle|slice(0, 11) ~ '...' : defaultTitle }}
{% endif %}
</button>
<ul class="dropdown-menu" >
<li>
<a style="font-weight:600;" class="dropdown-item text-light font-weight-bold" href="{{ path('formations', {'formation': '', 'type': typeSelected, 'sujet': sujetSelected, 'logiciel': logicielSelected, 'version': versionSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}Toutes les Formations{% else %}All training {% endif %}
</a>
</li>
{% for res in formation %}
<li>
<a class="dropdown-item text-light" href="{{ path('formations', {'formation': res.titreFr, 'type': typeSelected, 'sujet': sujetSelected, 'logiciel': logicielSelected, 'version': versionSelected, 'locale': app.request.locale}) }}#formaList">
{% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
let dropdownButton = document.getElementById('dropdownButton');
let zIndexDiv = document.querySelector('.zIndexControl');
dropdownButton.addEventListener('click', function () {
if (dropdownButton.classList.contains('show')) {
zIndexDiv.style.zIndex = '90';
} else {
zIndexDiv.style.zIndex = '1';
}
});
});
</script>
<div class="col-6 col-md-4 col-lg-2 d-flex justify-content-start align-items-center" style="z-index:1" >
<div data-aos="fade-up" data-aos-duration="2000" class="dropdown my-3 col-12 d-flex justify-content-start align-items-center">
<a href="{{path('formations',{'locale':app.request.locale})}}#formaList"><button class="btn btn-secondary btn-res " type="button">
<i style="margin-right: 6px;" class="fas fa-arrows-rotate"></i>
<p style="margin-bottom: 0;">{% if app.request.locale == 'fr' %}Réinitialiser{% else %}Reset{% endif %}</p>
</button></A>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cards">
<div class="container">
<div class="row">
<div class="col-12">
<div class="row">
<div class="col-12 col-lg-9">
<div class="row">
{% set formationsWithDates = [] %}
{% set formationsWithoutDates = [] %}
{% set currentDate = "now"|date("Y-m-d") %}
{% set currentDateTimestamp = "now"|date("U") %}
{% for res in formations %}
{% if res.afficher == 1 %}
{% set closestFutureDate = null %}
{% set mostRecentPastDate = null %}
{% set correspondingLocation = null %}
{# Iterate through each session to find the most relevant date #}
{% for session in res.sessionsFormations %}
{% if session.date is not null %}
{% set sessionDate = session.date|date("Y-m-d") %}
{# Check for closest future date or most recent past date #}
{% if sessionDate >= currentDate %}
{# Update the closest future date if this session date is closer #}
{% if closestFutureDate is null or sessionDate < closestFutureDate %}
{% set closestFutureDate = sessionDate %}
{% set correspondingLocation = session.lieu %} {# Assuming session.lieu is the location #}
{% endif %}
{% elseif mostRecentPastDate is null or sessionDate > mostRecentPastDate %}
{# Update the most recent past date if this session date is more recent #}
{% set mostRecentPastDate = sessionDate %}
{% set correspondingLocation = session.lieu %}
{% endif %}
{% endif %}
{% endfor %}
{# Determine which date to use for the formation #}
{% set chosenDate = closestFutureDate is not null ? closestFutureDate : mostRecentPastDate %}
{# Add formation to the appropriate list #}
{% if chosenDate is not null %}
{% set formationsWithDates = formationsWithDates|merge([{ 'formation': res, 'date': chosenDate, 'location': correspondingLocation }]) %}
{% else %}
{% set formationsWithoutDates = formationsWithoutDates|merge([res]) %}
{% endif %}
{% endif %}
{% endfor %}
{# Sort formations by the closest date to the current date #}
{% set sortedFormationsWithDates = formationsWithDates|sort((a, b) =>
(a.date|date("U") >= currentDateTimestamp ? a.date|date("U") - currentDateTimestamp : currentDateTimestamp - a.date|date("U"))
-
(b.date|date("U") >= currentDateTimestamp ? b.date|date("U") - currentDateTimestamp : currentDateTimestamp - b.date|date("U"))
) %}
{% for item in sortedFormationsWithDates %}
<div data-aos="fade-up" data-aos-duration="1000" class="col-12 col-md-6 col-lg-4">
<div class="card">
<a href="{{ path('detailsFormation', {'ref': item.formation.Reference, 'locale': app.request.locale}) }}">
<div class="imgAnimee" style="height:260px; width:310px; border-radius:10px; display: table-cell; vertical-align: middle;">
<div class="hover-effect d-flex justify-content-center align-items-center" style="margin-top: 0;">
<button type="button" class="btn btn-outline-light hover-btn buttonMore">{% trans %}accueil-carousel-bouton{% endtrans %}</button>
<p class="hover-effcet-txt"><i class="far fa-calendar"></i> {{ item.date|date('d/m/Y') }}</p>
{# Other elements of the card... #}
<p class="hover-effcet-txt"><i class="fas fa-user-plus"></i>{% if app.request.locale == 'fr' %}{{ item.formation.nbParticipants }} {% else %}{{ item.formation.nbParticipantsEn }} {% endif %}</p>
<p class="hover-effcet-txt"><i class="fas fa-location-dot"></i>{{ item.location}}</p>
</div>
<div class="card-image">
<img src="{{ asset('uploads/formations/'~item.formation.image) }}" class="card-img-top" alt="formation" style="border-radius:0px">
</div>
</div>
<div class="card-body">
<p class="card-text" style="font-size: 28px; font-weight: 700;">{% if app.request.locale == 'fr' %}{{ item.formation.titreFr }}{% else %}{{ item.formation.titreEn }}{% endif %}</p>
</div>
</a>
</div>
</div>
{% endfor %}
{# Display formations without dates #}
{% for res in formationsWithoutDates %}
<div data-aos="fade-up" data-aos-duration="1000" class="col-12 col-md-6 col-lg-4">
<div class="card">
<a href="{{ path('detailsFormation', {'ref': res.Reference, 'locale': app.request.locale}) }}">
<div class="imgAnimee" style="height:260px; width:310px; border-radius:10px; display: table-cell; vertical-align: middle;">
<div class="hover-effect d-flex justify-content-center align-items-center" style="margin-top: 0;">
<button type="button" class="btn btn-outline-light hover-btn buttonMore">{% trans %}accueil-carousel-bouton{% endtrans %}</button>
<p class="hover-effcet-txt"><i class="far fa-calendar"></i> Nous consulter</p>
<p class="hover-effcet-txt"><i class="fas fa-user-plus"></i> {% if app.request.locale == 'fr' %}{{ res.nbParticipants }}{% else %}{{ res.nbParticipantsEn }}{% endif %}</p>
<p class="hover-effcet-txt"><i class="fas fa-location-dot"></i>{% if app.request.locale == 'fr' %}A convenir{% else %}To be agreed{% endif %}</p>
</div>
<div class="card-image">
<img src="{{ asset('uploads/formations/'~res.image) }}" class="card-img-top" alt="formation" style="border-radius:0px">
</div>
</div>
<div class="card-body">
<p class="card-text" style="font-size: 28px; font-weight: 700;">{% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}</p>
</div>
</a>
</div>
</div>
{% endfor %}
<div class="btn-plannig d-flex justify-content-center" >
<a href="{{path('app_planningFormation',{'locale':app.request.locale})}}" style="padding: 10px; background-color: #0048FF ; border-radius:30px ; color: white; text-decoration: none; margin-bottom: 40px;">{% trans %}voir-planning-formation{% endtrans %}</a>{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':96})}}"><button type="button" style="margin-left:5px" class="btn btn-warning" ><i class="fa-solid fa-pen"></i></button></a>{% endif %}
</div>
</div>
</div>
<div data-aos="fade-up" data-aos-duration="1000" class="col-12 col-lg-3">
<div class="infos">
<div class="certificats pt-3">
<div class="titre_traitBleu">
{% if app.user %}
<a href="{{path('app_certificats_formations_index')}}"><button type="button" class="btn btn-warning">Gestion Certificats</button></a>
{% endif %}
<div class="titre" style="margin-top: 15px;">
<img class="img-fluid" src="{{asset('img/formations/awards.svg')}}" alt="">
<p>{% trans %}certificats-titre{% endtrans %}
{% if app.user %}
<a href="{{path('app_dictionnaire_edit',{'id':86})}}"><button type="button" style="margin-left:5px" class="btn btn-warning" ><i class="fa-solid fa-pen"></i></button></a>
{% endif %}</p>
</div>
<div class="trait-bleu">
<img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
</div>
</div>
<div class="d-flex flex-lg-column flex-md-row flex-column">
{% for res in certificats %}
<div class="col-12 col-md-6 col-lg-12">
<div class="carte carte1">
<div class="titre">
<p>{% if app.request.locale == 'fr' %}{{res.TitreFr|raw}}{% else %}{{res.TitreEn|raw}}{% endif %}</p>
</div>
<div class="logo">
{% if res.Image != 'ok' %}
<img class="img-fluid" src="{{ asset('uploads/certi/' ~ res.Image) }}" alt="qualiopi">
{% endif %}
</div>
<div class="texte">
<p>{% if app.request.locale == 'fr' %}{{res.TexteFr|raw}}{% else %}{{res.TexteEn|raw}}{% endif %}</p>
</div>
{% if res.document != 'ok' %}
<div class="document">
<div class="btn-plannig d-flex justify-content-center" >
<a href="{{ asset('uploads/certi/' ~ res.document) }}" target="_blank" style="padding: 10px; background-color: #0048FF ; border-radius:30px ; color: white; text-decoration: none; ">{% if app.request.locale == 'fr' %}Télécharger le certificat{% else %}Download certificate{% endif %} </a>
</div>
{% endif %}
</div>
<hr>
</div>
{% endfor %}
</div>
</div>
<div class="col-12 col-md-6 col-lg-12 respT respMargeee">
<div class="titre_traitBleu titre_traitBleu2" style="margin-top:30px;">
{% if app.user %}
<a href="{{path('app_criteres_formations_index')}}"><button style="margin-bottom: 15px;" type="button" class="btn btn-warning">Gestion Critères</button></a>
{% endif %}
<div class="titre">
<img class="img-fluid" src="{{asset('img/formations/qualiopi.png')}}" alt="">
<p>{% trans %}critere-qualiopi-titre{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':92})}}"><button type="button" style="margin-left:5px;z-index:99;position:relative" class="btn btn-warning" ><i class="fa-solid fa-pen"></i></button></a>{% endif %}</p>
</div>
<div class="trait-bleu">
<img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
</div>
</div>
{% for res in criteres %}
<div class="carte-pourcentage">
<div class="image">
<img src="{{asset('img/formations/Ellipse_blanche.png')}}" alt="">
</div>
<div class="chiffre">
{{res.Nombre}}
</div>
<div class="texte">
<p>{% if app.request.locale == 'fr' %}{{res.TexteFr|raw}}{% else %}{{res.TexteEn|raw}}{% endif %}</p>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="col-12 col-md-6 col-lg-12 respT respMargeee">
<div class="titre_traitBleu titre_traitBleu2 mb-5 pb-3" style="margin-top:30px;">
{% if app.user %}
<a href="{{path('app_catalogue_index')}}"><button style="margin-bottom: 15px;" type="button" class="btn btn-warning">Gestion Catalogue</button></a>
{% endif %}
<div class="titre">
<img class="img-fluid" src="{{asset('img/formations/qualiopi.png')}}" alt="">
<p>{% if app.request.locale == 'fr' %}CATALOGUE CPI{% else %}CPI CATALOG{% endif %}</p>
</div>
<div class="trait-bleu">
<img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
</div>
</div>
{% for res in cataloguesFormations %}
<div class="carte-pourcentage">
{% if res.document != 'ok' %}
<div class="document">
<div class="btn-plannig d-flex justify-content-center" >
<a href="{{ asset('uploads/catalogueFormation/' ~ res.document) }}" target="_blank" style="padding: 10px; background-color: #0048FF ; border-radius:30px ; color: white; text-decoration: none; font-weight:500; ">{% if app.request.locale == 'fr' %}Télécharger le catalogue{% else %}Download catalog{% endif %} </a>
</div>
{% endif %}
</div>
<hr>
{% endfor %}
</div>
</div>
<div class="agenda" style="display:none !important;">
<div class="titre_traitBleu">
<div class="titre">
<img class="img-fluid" src="{{asset('img/formations/session.png')}}" alt="">
<p>PROCHAINES SESSIONS</p>
</div>
<div class="trait-bleu">
<img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
</div>
</div>
<a href="#">
<div class="carte">
<div class="date">
27 MARS 2023
</div>
<div class="texte">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium, ratione.</p>
<hr>
</div>
</div>
</a>
<a href="#">
<div class="carte">
<div class="date">
27 MARS 2023
</div>
<div class="texte">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium, ratione.</p>
<hr>
</div>
</div>
</a>
<a href="#">
<div class="carte">
<div class="date">
27 MARS 2023
</div>
<div class="texte">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium, ratione.</p>
<hr>
</div>
</div>
</a>
<a href="#">
<div class="carte">
<div class="date">
27 MARS 2023
</div>
<div class="texte">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium, ratione.</p>
<hr>
</div>
</div>
</a>
<div class="bouton-bleu-clair my-3">
<button>Voir le planing complet</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="temoignage" style="display:none">
<div class="container">
<div class="row">
<div class="formeBleu">
<div class="row justify-content-center d-flex">
<img src="img/formations/Groupe 197_blanc.svg" class="img-fluid">
</div>
</div>
</div>
<div style="padding-top:112px;" class="row justify-content-center justify-content-md-start">
<div class="col-12 col-md-6">
<div class="row mt-2">
<div class="titre">
<p class="opensans_bold_red_15">TÉMOIGNAGES</p>
</div>
</div>
</div>
</div>
<div class="row " style="padding-bottom: 112px;">
<div class="col">
<div id="carouselExampleIndicators" class="carousel slide py-3" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<div class="col-12">
<div class="row">
<h1 class="title-citation">Aenean sed nunc imperdiet.</h1>
</div>
<hr>
<p class="citation">Lorem ipsum dolor sit amet consectetur adipisicing elit. Nisi mollitia illo necessitatibus vero, aspernatur nulla consequatur, dolorum reprehenderit ratione alias amet porro commodi laudantium? Quaerat quisquam tempore qui sapiente perspiciatis.</p>
<p style="color:red; font-weight: bold;">JUSTO TURPIS</p>
<hr>
</div>
</div>
<div class="carousel-item">
<div class="col-12">
<div class="row">
<h1 class="title-citation">Aenean sed nunc imperdiet.</h1>
</div>
<hr>
<p class="citation">Lorem ipsum dolor sit amet consectetur adipisicing elit. Nisi mollitia illo necessitatibus vero, aspernatur nulla consequatur, dolorum reprehenderit ratione alias amet porro commodi laudantium? Quaerat quisquam tempore qui sapiente perspiciatis.</p>
<p style="color:red; font-weight: bold;">JUSTO TURPIS</p>
<hr>
</div>
</div>
<div class="carousel-item">
<div class="col-12">
<div class="row">
<h1 class="title-citation">Aenean sed nunc imperdiet.</h1>
</div>
<hr>
<p class="citation">Lorem ipsum dolor sit amet consectetur adipisicing elit. Nisi mollitia illo necessitatibus vero, aspernatur nulla consequatur, dolorum reprehenderit ratione alias amet porro commodi laudantium? Quaerat quisquam tempore qui sapiente perspiciatis.</p>
<p class="opensans_bold_red_15">JUSTO TURPIS</p>
<hr>
</div>
</div>
</div>
<!-- Flèche précédente -->
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
<i class="fas fa-chevron-left"></i> <!-- Utilisation d'une icône de chevron vers la gauche -->
<span class="visually-hidden">Previous</span>
</button>
<!-- Flèche suivante -->
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
<i class="fas fa-chevron-right"></i> <!-- Utilisation d'une icône de chevron vers la droite -->
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</div>
</div>
</div>
</main>
<script>
$(document).ready(function () {
$('.dropdown-toggle').dropdown();
});
</script>
{% endblock %}