templates/default/planningFormation.html.twig line 1

Open in your IDE?
  1. {# BASE LOAD #}
  2. {% extends 'base.html.twig' %}
  3. {# TITLE TOP PAGE #}
  4. {% block title %}CPI | {% if app.request.locale == 'fr' %}Planning Formation{% else %}Training Schedule{% endif %}{% endblock %}
  5. {# CSS #}
  6. {% block stylesheet %}
  7.         <link rel="stylesheet" href="{{ asset('css/planningFormation.css')}}">
  8.         <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  9. {% endblock %}
  10. {# BODY HOME PAGE #}
  11. {% block body %}
  12.  <main>
  13.  
  14.  <style>
  15.  
  16. .navigation-header .nav-link, .navigation-header .nav-link p{
  17.     color: #000!important;
  18.     font-weight: 300;
  19. }
  20. .side-bar-content .nav-link{
  21.     color: #fff!important;
  22.     font-weight: 300;
  23. }
  24.     .dropdown-toggle, .btn-res{
  25.         display:flex;
  26.         justify-content:space-between;
  27.         align-items:center;
  28.     }
  29.  </style>
  30. {% if app.user %}
  31.    <style>
  32.     .accueil{
  33.         padding-top:300px;
  34.     }
  35.    
  36.    </style>
  37. {% endif %}
  38.         <div class="accueil">
  39.             <div class="container container-head">
  40.                 <div class="row py-5 justify-content-center justify-content-md-start">
  41.                     <div class="col-12">
  42.                     <div class="row">
  43.                             <div class="col-md-8 col-12">
  44.                             <a style="text-decoration:none;" href="{{ path('formations',{'locale':app.request.locale})}}">
  45.                                 <p class="returnBack"><i class="fa-solid fa-arrow-left"></i> {% trans %}retour-catalogue{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':116})}}"><button type="button"  style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}<p>
  46.                             </div>
  47.                             </a>
  48.                         </div>
  49.                         <div class="row">
  50.                             <div class="col-md-8 col-12">
  51.                                 <h1 class="">{% trans %}planning-formation-titre{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':117})}}"><button type="button"  style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</h1>
  52.                                 <div class="traitBlanc"></div>
  53.                             </div>
  54.                         </div>
  55.                          <div class="row py-5">
  56.                             <div class="dropdowns">
  57.                                 <div class="row mb-5">
  58.                                 
  59.                                     {% set sujetSelected = app.request.query.get('sujet') %}
  60.                                     {% set typeSelected = app.request.query.get('type') %}
  61.                                     {% set lieuSelected = app.request.query.get('lieu') %}
  62.                                     {% set refSelected = app.request.query.get('ref') %}
  63.                                     <style>
  64.                                         .btn-dangerr{
  65.                                             background-color:#30278E!important;
  66.                                             font-weight:bold!important;
  67.                                             color:white!important;
  68.                                         }
  69.                                     </style>
  70.                                     <div class="col-xl-2 col-md-4 col-12" style="z-index:4">
  71.                                         <div data-aos="fade-up" data-aos-duration="1000" class="dropdown">
  72.                                             <button class="btn {{ sujetSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" id="dropdownMenuButtonType" data-bs-toggle="dropdown" aria-expanded="false">
  73.                                                 {% if sujetSelected %}
  74.                                                     {% set selectedTitle = '' %}
  75.                                                     {% for res in sujets %}
  76.                                                         {% if res.id == sujetSelected %}
  77.                                                             {% set selectedTitle = app.request.locale == 'fr' ? res.titreFr : res.titreEn %}
  78.                                                         {% endif %}
  79.                                                     {% endfor %}
  80.                                                     {{ selectedTitle|length > 10 ? selectedTitle|slice(0, 11) ~ '...' : selectedTitle }}
  81.                                                 {% else %}
  82.                                                     {% set defaultTitle = app.request.locale == 'fr' ? 'Sujet' : 'Subject' %}
  83.                                                     {{ defaultTitle|length > 10 ? defaultTitle|slice(0, 11) ~ '...' : defaultTitle }}
  84.                                                 {% endif %}
  85.                                             </button>
  86.                                             <ul class="dropdown-menu">
  87.                                                 <li>
  88.                                                     <a style="font-weight:600;" class="dropdown-item text-light" href="{{ path('app_planningFormation', {'sujet': '', 'type': typeSelected, 'lieu': lieuSelected, 'ref': refSelected, 'locale': app.request.locale}) }}#formaList">
  89.                                                         {% if app.request.locale == 'fr' %}Tout les Sujets{% else %}All Subjects{% endif %}
  90.                                                     </a>
  91.                                                 </li>
  92.                                                 {% for res in sujetFormation %}
  93.                                                     <li>
  94.                                                         <a  class="dropdown-item text-light" href="{{ path('app_planningFormation', {'sujet': res.id, 'type': typeSelected, 'lieu': lieuSelected, 'ref': refSelected,  'locale': app.request.locale}) }}#formaList">
  95.                                                             {{ app.request.locale == 'en' ? res.titreEn : res.titreFr }}
  96.                                                         </a>
  97.                                                     </li>
  98.                                                 {% endfor %}
  99.                                             </ul>
  100.                                         </div>
  101.                                     </div>
  102.                                    
  103.                     
  104.                                   
  105.                                     
  106.                                     <div class="col-xl-2 col-md-4 col-12">
  107.                                         <div class="dropdown">
  108.                                             <button class="btn {{ typeSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
  109.                                                 {% if typeSelected == 1 %}
  110.                                                    {% if app.request.locale == 'fr' %}Intra{% else %}Intra{% endif %}
  111.                                                 {% elseif typeSelected == 2 %}
  112.                                                     {% if app.request.locale == 'fr' %}Inter{% else %}Inter{% endif %}
  113.                                                 {% elseif typeSelected == 3 %}
  114.                                                    {% if app.request.locale == 'fr' %}A distance{% else %}Remote{% endif %}
  115.                                                 {% else %}
  116.                                                     Type
  117.                                                 {% endif %}
  118.                                             </button>
  119.                                             <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
  120.                                                 {% set seenTypes = [] %}
  121.                                                 <li>
  122.                                                     <a style="font-weight:600;" class="dropdown-item text-light" href="{{ path('app_planningFormation', {'type': '', 'sujet': sujetSelected,  'lieu': lieuSelected, 'ref': refSelected,'locale': app.request.locale}) }}#formaList">
  123.                                                         {% if app.request.locale == 'fr' %}Tout les Types{% else %}All Types{% endif %}           
  124.                                                     </a>
  125.                                                 </li>
  126.                                                 {% for res in typeFormation %}
  127.                                                      <li>
  128.                                             <a class="dropdown-item text-light" href="{{ path('app_planningFormation', {'type': res.id, 'sujet': sujetSelected,  'lieu': lieuSelected, 'ref': refSelected,'locale': app.request.locale}) }}#formaList">
  129.                                                    {% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}
  130.                                                         </a>
  131.                                                     </li>
  132.                                                 {% endfor %}
  133.                                                 
  134.                                             </ul>
  135.                                         </div>
  136.                                     </div>
  137.                                     <div class="col-xl-2 col-md-4 col-12">
  138.                                         <div class="dropdown">
  139.                                             <button class="btn {{ lieuSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
  140.                                                 {% if lieuSelected %}
  141.                                                     {{ lieuSelected|length > 10 ? lieuSelected|slice(0, 11) ~ '...' : lieuSelected }}
  142.                                                 {% else %}
  143.                                                     {% if app.request.locale == 'fr' %}Lieu{% else %}Location{% endif %}
  144.                                                 {% endif %}
  145.                                             </button>
  146.                                             <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
  147.                                                 {% set seenLieux = [] %}
  148.                                                 <li>
  149.                                                     <a style="font-weight:600;" class="dropdown-item text-light" href="{{ path('app_planningFormation', {'lieu': '', 'type': typeSelected, 'sujet': sujetSelected, 'ref': refSelected, 'locale': app.request.locale}) }}#formaList">
  150.                                                         {% if app.request.locale == 'fr' %}Tout les Lieux{% else %}All Locations{% endif %}        
  151.                                                     </a>
  152.                                                 </li>
  153.                                         {% set processedItems = [] %} {# Initialize an empty array to keep track of processed items #}
  154. {% for res in sessionsformationsAll %}
  155.     {% if res.lieu not in processedItems %} {# Check if the item has not been processed #}
  156.         <li>
  157.             <a class="dropdown-item text-light" href="{{ path('app_planningFormation', {'lieu': res.lieu, 'type': typeSelected, 'sujet': sujetSelected, 'ref': refSelected, 'locale': app.request.locale}) }}#formaList">
  158.                 {% if app.request.locale == 'en' %}
  159.                     {{ res.lieuEn|replace({'A convenir': 'To agree', 'A distance': 'Remote'}) }}
  160.                 {% else %}
  161.                     {{ res.lieu }}
  162.                 {% endif %}
  163.             </a>
  164.         </li>
  165.         {% set processedItems = processedItems|merge([res.lieu]) %} {# Add the item to the list of processed items #}
  166.     {% endif %}
  167. {% endfor %}
  168.                                             </ul>
  169.                                         </div>
  170.                                     </div>
  171.                                     <div class="col-xl-2 col-md-4 col-12">
  172.                                         <div class="dropdown">
  173.                                             <button class="btn {{ refSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
  174.                                                 {% if refSelected %}
  175.                                                     {{ refSelected|length > 10 ? refSelected|slice(0, 11) ~ '...' : refSelected }}
  176.                                                 {% else %}
  177.                                                     {% if app.request.locale == 'fr' %}Formations{% else %}Training{% endif %}
  178.                                                 {% endif %}
  179.                                             </button>
  180.                                             <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
  181.                                                 <li>
  182.                                                     <a style="font-weight:600;" class="dropdown-item text-light" href="{{ path('app_planningFormation', {'ref': '', 'type': typeSelected, 'sujet': sujetSelected,  'lieu': lieuSelected, 'locale': app.request.locale}) }}#formaList">
  183.                                                         {% if app.request.locale == 'fr' %}Toutes les Formations{% else %}All Trainings{% endif %}
  184.                                                     </a>
  185.                                                 </li>
  186.                                                 {% for res in formations %}
  187.                                                     <li><a class="dropdown-item text-light" href="{{ path('app_planningFormation', {'ref': res.titreFr, 'type': typeSelected, 'sujet': sujetSelected,  'lieu': lieuSelected, 'locale': app.request.locale}) }}#formaList">{% if app.request.locale == 'fr' %}{{ res.TitreFr }}{% else %}{{ res.TitreEn }}{% endif %}</a></li>
  188.                                                 {% endfor %}
  189.                                             </ul>
  190.                                         </div>
  191.                                     </div>
  192.                                     
  193.                                      <div class="col-xl-2  col-md-4 col-12 d-flex">
  194.                                          
  195.                                                 <a href="{{path('app_planningFormation',{'locale':app.request.locale})}}" style="text-decoration:none">
  196.                                                     <button  class="btn btn-secondary btn-res" type="button" style="background-color: rgb(28, 1, 114)!important;color: white!important;">
  197.                                                          <i style="color: white!important;margin-top: 3px;background" class="fas fa-arrows-rotate" aria-hidden="true"></i> {% if app.request.locale == 'fr' %}Réinitialiser{% else %}Reset{% endif %}
  198.                                                     </button>
  199.                                                 </a>
  200.                                                
  201.                                             </a>
  202.                                        
  203.                                     </div>
  204.     
  205.                                      
  206.                                     </div>
  207.                                 </div>
  208.                             </div>
  209.                             
  210.                         </div>
  211.                         <div class="row">
  212.                             <div class="logo-slide d-flex justify-content-end d-xl-none">
  213.                                 <img style="width: 50px; padding-bottom: 30px;" src="{{asset('img/formations/swipe.png')}}" alt="logo de scroll">
  214.                             </div>
  215.                         <div class="table-container">
  216.                             <table class="table table-striped table-hover" >
  217.                                 <thead id="thead">
  218.                                     <tr>
  219.                                         <th scope="col" class="d-xl-none d-block " style="border:none;"></th>
  220.                                         <th scope="col">
  221.                                             <div class="titre_traitBleu">
  222.                                                 <div class="titre">
  223.                                                     <img class="img-fluid" src="{{asset('img/Formation-A/toolbox.svg')}}" alt="">
  224.                                                     <p>DATE</p>
  225.                                                 </div>
  226.                                                 <div class="trait-bleu">
  227.                                                     <img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
  228.                                                 </div>
  229.                                             </div>
  230.                                         </th>
  231.                                         <th scope="col">
  232.                                             <div class="titre_traitBleu">
  233.                                                 <div class="titre">
  234.                                                     <img class="img-fluid" src="{{asset('img/Formation-A/toolbox.svg')}}" alt="">
  235.                                                     <p>{% if app.request.locale == 'fr' %}SUJET{% else %}SUBJECT{% endif %}</p>
  236.                                                 </div>
  237.                                                 <div class="trait-bleu">
  238.                                                     <img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
  239.                                                 </div>
  240.                                             </div>
  241.                                         </th>
  242.                                         <th scope="col">
  243.                                             <div class="titre_traitBleu">
  244.                                                 <div class="titre">
  245.                                                     <img class="img-fluid" src="{{asset('img/Formation-A/comment.svg')}}" alt="">
  246.                                                     <p>{% if app.request.locale == 'fr' %}FORMATIONS{% else %}TRAINING{% endif %}</p>
  247.                                                 </div>
  248.                                                 <div class="trait-bleu">
  249.                                                     <img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
  250.                                                 </div>
  251.                                             </div>
  252.                                         </th>
  253.                                       
  254.                                         <th scope="col">
  255.                                             <div class="titre_traitBleu">
  256.                                                 <div class="titre">
  257.                                                     <img class="img-fluid" src="{{asset('img/Formation-A/toolbox.svg')}}" alt="">
  258.                                                     <p>TYPE</p>
  259.                                                 </div>
  260.                                                 <div class="trait-bleu">
  261.                                                     <img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
  262.                                                 </div>
  263.                                             </div>
  264.                                         </th>
  265.                                             <th scope="col">
  266.                                             <div class="titre_traitBleu">
  267.                                                 <div class="titre">
  268.                                                     <img class="img-fluid" src="{{asset('img/Formation-A/comment.svg')}}" alt="">
  269.                                                     <p>{% if app.request.locale == 'fr' %}LANGUE{% else %}LANGUAGE{% endif %}</p>
  270.                                                 </div>
  271.                                                 <div class="trait-bleu">
  272.                                                     <img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
  273.                                                 </div>
  274.                                             </div>
  275.                                         </th>
  276.                                    
  277.                                    
  278.                               
  279.                                         <th scope="col">
  280.                                             <div class="titre_traitBleu">
  281.                                                 <div class="titre">
  282.                                                     <img class="img-fluid" src="{{asset('img/Formation-A/pin.svg')}}" alt="">
  283.                                                     <p>{% if app.request.locale == 'fr' %}LIEU{% else %}LOCATION{% endif %}</p>
  284.                                                 </div>
  285.                                                 <div class="trait-bleu">
  286.                                                     <img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
  287.                                                 </div>
  288.                                             </div>
  289.                                         </th>
  290.                               
  291.                                         <th scope="col">
  292.                                             <div class="titre_traitBleu">
  293.                                                 <div class="titre">
  294.                                                     <img class="img-fluid" src="{{asset('img/Formation-A/euro.svg')}}" alt="">
  295.                                                     <p>{% if app.request.locale == 'fr' %}Prix HT{% else %}RATE excl. taxes{% endif %}<br>
  296.                                                     </p>
  297.                                                 </div>
  298.                                                 <div class="trait-bleu">
  299.                                                     <img class="img-fluid" src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
  300.                                                 </div>
  301.                                             </div>
  302.                                         </th>
  303.                                        
  304.                                     </tr>
  305.                                 </thead>
  306.                                 <tbody>
  307. {% set today = "now"|date('U') %}
  308. {% set futureSessions = [] %}
  309. {% set pastSessions = [] %}
  310. {% set noDateSessions = [] %}
  311. {% for res in sessionsformations %}
  312.     {% if res.date is null %}
  313.         {% set noDateSessions = noDateSessions|merge([res]) %}
  314.     {% elseif res.date|date('U') >= today %}
  315.         {% set futureSessions = futureSessions|merge([res]) %}
  316.     {% else %}
  317.         {% set pastSessions = pastSessions|merge([res]) %}
  318.     {% endif %}
  319. {% endfor %}
  320. {% set sortedFutureSessions = futureSessions|sort((a, b) => a.date|date('U') - b.date|date('U')) %}
  321. {% set sortedPastSessions = pastSessions|sort((a, b) => b.date|date('U') - a.date|date('U')) %}
  322. {% if app.user %}
  323.                     {% for res in sortedPastSessions %}
  324.                      
  325.                    
  326.                     
  327.                         <tr>
  328.                             <td class="d-xl-none d-block ">
  329.                                 <a href="{{ path('detailsFormation', {'ref': res.formations.reference,'locale':app.request.locale}) }}">
  330.                                     <button class="btn btn-secondary btnMore">
  331.                                         +
  332.                                     </button>
  333.                                 </a>
  334.                             </td>
  335.                             
  336.                         
  337.                                 <td scope="row"> {% if res.date is null %}
  338.                                                             {% if app.request.locale == 'fr' %}Nous consulter{% else %}Contact us{% endif %}
  339.                                                         {% else %}
  340.                                                             {{ res.date|date('d/m/Y') }}
  341.                                                         {% endif %}</td> 
  342.                            
  343.                           
  344.                             <td>{% if app.request.locale == 'fr' %}{{ res.formations.sujetsFormations.TitreFr }}{% else %}{{ res.formations.sujetsFormations.TitreEn }}{% endif %}</td>
  345.                             <td>{% if app.request.locale == 'fr' %}{{ res.formations.TitreFr }}{% else %}{{ res.formations.TitreEn }}{% endif %}</td>
  346.                            
  347.                             <td>
  348.                                 {% if app.request.locale == 'en' %}
  349.                                     {{ res.Type|replace({'A distance': 'Remote'}) }}
  350.                                 {% else %}
  351.                                     {{ res.Type }}
  352.                                 {% endif %}
  353.                               
  354.                             </td>
  355.                          
  356.                             <td>{% if app.request.locale == 'fr' %}{{ res.LanguesFr }}{% else %}{{ res.LanguesEn }}{% endif %}</td>
  357.                             {% if app.request.locale == 'fr' %}
  358.                                 <td>{{ res.Lieu }}</td>
  359.                             {% else %}
  360.                                 {% if res.Lieu == "A distance" %}
  361.                                     <td>Remote</td>
  362.                                 {% elseif res.Lieu == "A convenir" %}
  363.                                     <td>To be agreed</td>
  364.                                 {% else %}
  365.                                 
  366.                                     <td>{{ res.Lieu }}</td>
  367.                                 {% endif %}
  368.                             {% endif %}
  369.                             
  370.                             <td><b>{% if app.request.locale == 'en' %}
  371.                                                                 {{ res.tarifs|raw|replace({'par jour / pers.': 'per Day / pers.','par Jour / Pers.': 'per Day / pers.','Nous consulter' : 'Contact us', 'par jour (1-4 pers.)' : 'per day (1-4 pers)', 'par Jour (1-4 pers)' : 'per day (1-4 pers)'}) }}
  372.                                                             {% else %}
  373.                                                                 {{res.tarifs|raw}}
  374.                                                             {% endif %}</b></td>
  375.                             <td class="d-xl-block d-none ">
  376.                                 <a href="{{ path('detailsFormation', {'ref': res.formations.reference,'locale':app.request.locale}) }}">
  377.                                     <button class="btn btn-secondary btnMore">
  378.                                         +
  379.                                     </button>
  380.                                 </a>
  381.                             </td>
  382.                         </tr>
  383.                     {% endfor %}
  384.                     {% endif %}
  385. {% for res in sortedFutureSessions %}
  386.                      
  387.                    
  388.                     
  389.                         <tr>
  390.                             <td class="d-xl-none d-block ">
  391.                                 <a href="{{ path('detailsFormation', {'ref': res.formations.reference,'locale':app.request.locale}) }}">
  392.                                     <button class="btn btn-secondary btnMore">
  393.                                         +
  394.                                     </button>
  395.                                 </a>
  396.                             </td>
  397.                             
  398.                         
  399.                                 <td scope="row"> {% if res.date is null %}
  400.                                                             {% if app.request.locale == 'fr' %}Nous consulter{% else %}Contact us{% endif %}
  401.                                                         {% else %}
  402.                                                             {{ res.date|date('d/m/Y') }}
  403.                                                         {% endif %}</td> 
  404.                            
  405.                           
  406.                             <td>{% if app.request.locale == 'fr' %}{{ res.formations.sujetsFormations.TitreFr }}{% else %}{{ res.formations.sujetsFormations.TitreEn }}{% endif %}</td>
  407.                             <td>{% if app.request.locale == 'fr' %}{{ res.formations.TitreFr }}{% else %}{{ res.formations.TitreEn }}{% endif %}</td>
  408.                            
  409.                             <td>
  410.                                 {% if app.request.locale == 'en' %}
  411.                                     {{ res.Type|replace({'A distance': 'Remote'}) }}
  412.                                 {% else %}
  413.                                     {{ res.Type }}
  414.                                 {% endif %}
  415.                               
  416.                             </td>
  417.                          
  418.                             <td>{% if app.request.locale == 'fr' %}{{ res.LanguesFr }}{% else %}{{ res.LanguesEn }}{% endif %}</td>
  419.                             {% if app.request.locale == 'fr' %}
  420.                                 <td>{{ res.Lieu }}</td>
  421.                             {% else %}
  422.                                 {% if res.Lieu == "A distance" %}
  423.                                     <td>Remote</td>
  424.                                 {% elseif res.Lieu == "A convenir" %}
  425.                                     <td>To be agreed</td>
  426.                                 {% else %}
  427.                                 
  428.                                     <td>{{ res.Lieu }}</td>
  429.                                 {% endif %}
  430.                             {% endif %}
  431.                             
  432.                             <td><b>{% if app.request.locale == 'en' %}
  433.                                                                 {{ res.tarifs|raw|replace({'par jour / pers.': 'per Day / pers.','par Jour / Pers.': 'per Day / pers.','Nous consulter' : 'Contact us', 'par jour (1-4 pers.)' : 'per day (1-4 pers)', 'par Jour (1-4 pers)' : 'per day (1-4 pers)'}) }}
  434.                                                             {% else %}
  435.                                                                 {{res.tarifs|raw}}
  436.                                                             {% endif %}</b></td>
  437.                             <td class="d-xl-block d-none ">
  438.                                 <a href="{{ path('detailsFormation', {'ref': res.formations.reference,'locale':app.request.locale}) }}">
  439.                                     <button class="btn btn-secondary btnMore">
  440.                                         +
  441.                                     </button>
  442.                                 </a>
  443.                             </td>
  444.                         </tr>
  445.                     {% endfor %}
  446. {% for res in noDateSessions %}
  447.                         
  448.                           <tr>
  449.                             <td class="d-xl-none d-block ">
  450.                                 <a href="{{ path('detailsFormation', {'ref': res.formations.reference,'locale':app.request.locale}) }}">
  451.                                     <button class="btn btn-secondary btnMore">
  452.                                         +
  453.                                     </button>
  454.                                 </a>
  455.                             </td>
  456.                             
  457.                         
  458.                                 <td scope="row"> {% if res.date is null %}
  459.                                                             {% if app.request.locale == 'fr' %}Nous consulter{% else %}Contact us{% endif %}
  460.                                                         {% else %}
  461.                                                             {{ res.date|date('d/m/Y') }}
  462.                                                         {% endif %}</td> 
  463.                            
  464.                           
  465.                             <td>{% if app.request.locale == 'fr' %}{{ res.formations.sujetsFormations.TitreFr }}{% else %}{{ res.formations.sujetsFormations.TitreEn }}{% endif %}</td>
  466.                             <td>{% if app.request.locale == 'fr' %}{{ res.formations.TitreFr }}{% else %}{{ res.formations.TitreEn }}{% endif %}</td>
  467.                             <td>{% if app.request.locale == 'en' %}
  468.                                     {{ res.Type|replace({'A distance': 'Remote'}) }}
  469.                                 {% else %}
  470.                                     {{ res.Type }}
  471.                                 {% endif %}</td>
  472.                             <td>{% if app.request.locale == 'fr' %}{{ res.LanguesFr }}{% else %}{{ res.LanguesEn }}{% endif %}</td>
  473.                             {% if app.request.locale == 'fr' %}
  474.                                 <td>{{ res.Lieu }}</td>
  475.                             {% else %}
  476.                                 {% if res.Lieu == "A distance" %}
  477.                                     <td>Remote</td>
  478.                                 {% elseif res.Lieu == "A convenir" %}
  479.                                     <td>To be agreed</td>
  480.                                 {% else %}
  481.                                 
  482.                                     <td>{{ res.Lieu }}</td>
  483.                                 {% endif %}
  484.                             {% endif %}
  485.                             
  486.                             <td><b>{% if app.request.locale == 'en' %}
  487.                                                                 {{ res.tarifs|raw|replace({'par jour / pers.': 'per Day / pers.','par Jour / Pers.': 'per Day / pers.','Nous consulter' : 'Contact us', 'par jour (1-4 pers.)' : 'per day (1-4 pers)', 'par Jour (1-4 pers)' : 'per day (1-4 pers)'}) }}
  488.                                                             {% else %}
  489.                                                                 {{res.tarifs|raw}}
  490.                                                             {% endif %}</b></td>
  491.                             <td class="d-xl-block d-none ">
  492.                                 <a href="{{ path('detailsFormation', {'ref': res.formations.reference,'locale':app.request.locale}) }}">
  493.                                     <button class="btn btn-secondary btnMore">
  494.                                         +
  495.                                     </button>
  496.                                 </a>
  497.                             </td>
  498.                         </tr>
  499.                           
  500. {% endfor %}
  501.                                         <!-- <script>
  502.                                             const btnMore = document.querySelector('.btnMore');
  503.                                            function changeButtonText() {
  504.                                                     // Récupère tous les éléments avec la classe "btnMore"
  505.                                                     const btnMoreElements = document.querySelectorAll('.btnMore');
  506.                                                     // Détermine à quelle taille d'écran vous souhaitez changer le texte du bouton
  507.                                                     const breakpoint = 1200; // Par exemple, à 1200 pixels de largeur
  508.                                                     // Parcourir tous les éléments avec la classe "btnMore"
  509.                                                     btnMoreElements.forEach(btnMore => {
  510.                                                         // Changer le texte du bouton en fonction de la taille de l'écran
  511.                                                         if (window.innerWidth <= breakpoint) {
  512.                                                             btnMore.textContent = '+';
  513.                                                         } else {
  514.                                                             btnMore.textContent = 'En savoir plus';
  515.                                                         }
  516.                                                     });
  517.                                                 }
  518.                                                 // Appeler la fonction lors du chargement initial de la page
  519.                                                 changeButtonText();
  520.                                                 // Écouter les changements de taille d'écran et appeler la fonction en conséquence
  521.                                                 window.addEventListener('resize', changeButtonText);
  522.                                         </script> -->
  523.                                      
  524.                                     <!-- <tr>
  525.                                         <th>
  526.                                             <p class="date">21.05.2023</p>
  527.                                         </th>
  528.                                         <th>
  529.                                             <p>Phasellus viverra</p>
  530.                                         </th>
  531.                                         <th>
  532.                                             <p>vehicula nisi auctor sit amet. Suspendisse in</p>
  533.                                         </th>
  534.                                         <th>
  535.                                             <p>Phasellus viverra</p>
  536.                                         </th>
  537.                                         <th>
  538.                                             <p class="tarif">300 €</p>
  539.                                         </th>
  540.                                     </tr>
  541.                                     <tr>
  542.                                         <th>
  543.                                             <p class="date">21.05.2023</p>
  544.                                         </th>
  545.                                         <th>
  546.                                            <p> Phasellus viverra</p>
  547.                                         </th>
  548.                                         <th>
  549.                                             <p>vehicula nisi auctor sit amet. Suspendisse in</p>
  550.                                         </th>
  551.                                         <th>
  552.                                             <p>Phasellus viverra</p>
  553.                                         </th>
  554.                                         <th>
  555.                                             <p class="tarif">300 €</p>
  556.                                         </th>
  557.                                     </tr>
  558.                                     <tr>
  559.                                         <th>
  560.                                             <p class="date">21.05.2023</p>
  561.                                         </th>
  562.                                         <th>
  563.                                            <p> Phasellus viverra</p>
  564.                                         </th>
  565.                                         <th>
  566.                                             <p>vehicula nisi auctor sit amet. Suspendisse in</p>
  567.                                         </th>
  568.                                         <th>
  569.                                             <p>Phasellus viverra</p>
  570.                                         </th>
  571.                                         <th>
  572.                                             <p class="tarif">300 €</p>
  573.                                         </th>
  574.                                     </tr>
  575.                                     
  576.                                    -->
  577.                                 </tbody>
  578.                             </table>  
  579. </div>
  580.                         </div>
  581.                     </div>
  582.                 </div>
  583.             </div>
  584.         </div>       
  585. </main>
  586. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
  587. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
  588. <script>
  589.     window.onscroll = function() {
  590.     var nav = document.getElementById('thead');
  591.     if ( window.pageYOffset > 350 ) {
  592.         nav.classList.add("sticky");
  593.     } else {
  594.         nav.classList.remove("sticky");
  595.     }
  596. }
  597. </script>
  598. {% endblock %}