templates/page/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
  3. {% block title %}Ween par Aviséa
  4. {% endblock %}
  5. {% block body %}
  6. {% if is_mobile() %}
  7.     <main role="main" id="main" class="container-fluid py-5 bg_client">
  8. {% else %}
  9.     <main role="main" id="main" class="container-fluid pb-5 bg-client" {% if client.background starts with "background." %} style="background: url('/img/background/client/{{client.id}}/{{client.background}}');" {% else %} style="background-color: {{client.background}};" {% endif %}>
  10. {% endif %}
  11.     <!-- PAGE D'ACCUEIL -->
  12.         <div class="d-block d-sm-none mt-5 container px-2">
  13.             {% if is_granted('ROLE_USER') %}
  14.             {% else %}
  15.                 <div class="border bg-white text-center b-radius-5 mb-3 py-2">
  16.                     <span class="fa-sharp fa-solid fa-lock text-notice d-block avisea-homepage-lock-icon opacity-50"></span>
  17.                     <h2 class="h4 work-sans-bold l-text text-graphite my-3">Bienvenue
  18.                         <span class="fa-sharp fa-regular fa-hand-wave"></span>
  19.                     </h2>
  20.                     <p class="work-sans-medium text-carbone fs-6 px-2">Connectez-vous pour accéder au contenu !</p>
  21.                     <div class="d-flex flex-column align-items-center">
  22.                     {% if client is defined %}
  23.                         {% if client.isSecure is same as true %}
  24.                             <a href="{{path('app_login', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
  25.                         {% else %}
  26.                             <a href="{{path('app_login_unsecure', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
  27.                         {% endif %}
  28.                             <a href="{{path('app_register', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="text-graphite mt-2 ns-text work-sans-semi-bold">S'inscrire</a>
  29.                         {% else %}
  30.                         {{ render(controller('App\\Controller\\PageController::renderLoginRegisterBtn')) }}
  31.                     {% endif %}
  32.                         </div>
  33.                 </div>
  34.             {% endif %}
  35.         </div>
  36.         <div class="container px-2 pt-4 mb-2">
  37.         {% if is_mobile() %}
  38.             <div class="">
  39.                 <div class="card card-img-top-hp">
  40.                     <img src="{{asset('img/alt-logo/client/' ~ client.id ~ '/' ~ client.altLogo)}}" class="card-img-top" alt="">
  41.                     <div class="card-body">
  42.                         <h1 class="card-title text-graphite work-sans-bold mb-4 l-text">Informations</h1>
  43.                         <span class="fa-sharp fa-solid fa-link text-{{client.slug}} mb-2"></span>
  44.                         <a href="/document/guide-plateforme-ween.pdf" target="_blank" class="text-graphite work-sans-bold ns-text">Télécharger le guide</a>
  45.                         <p class="card-text work-sans-medium text-carbone m-text">{{client.description|raw}}</p>
  46.                     </div>
  47.                 </div>
  48.                 <div>
  49.                     <!-- Login / Regsiter card -->
  50.                     <div class="d-none d-sm-block">
  51.                         {% if is_granted('ROLE_USER') %}
  52.                             <div class="bg-white ms-4 b-radius-5 mb-3">
  53.                                 <div class="bg_secondary_client py-5 text-end b-radius-5">
  54.                                     <a href="{{path('app_my_profile')}}" class="editEncart text-graphite me-4 work-sans-medium">
  55.                                         <span class="fa-sharp fa-solid fa-pen me-1"></span>Éditer</a>
  56.                                 </div>
  57.                                 <div class="text-center pb-4">
  58.                                     <div class="bg-white mx-auto mb-4 my-account-logo-background-homepage">
  59.                                         {% if app.user.avatar != null %}
  60.                                             {{app.user.avatar.code|raw}}
  61.                                         {% else %}
  62.                                             <span class="fa-duotone fa-user-robot"></span>
  63.                                         {% endif %}
  64.                                     </div>
  65.                                     <h3 class="work-sans-bold mb-0">{{app.user.firstName}}
  66.                                         <span class="text-uppercase">{{app.user.lastName}}</span>
  67.                                     </h3>
  68.                                     <p class="mb-0 work-sans-medium">{{app.user.jobTitle}}</p>
  69.                                     {% if app.user.location != null %}
  70.                                         <p class="work-sans-medium-italic mb-0">{{app.user.location.name}}</p>
  71.                                     {% endif %}
  72.                                     <p class="work-sans-bold text-uppercase mt-1">{{app.user.client.name}}</p>
  73.                                 </div>
  74.                             </div>
  75.                         {% else %}
  76.                             <div class="bg-white ms-4 p-4 text-center b-radius-5 mb-3">
  77.                                 <span class="fa-sharp fa-solid fa-lock text-notice d-block avisea-homepage-lock-icon opacity-50"></span>
  78.                                 <h2 class="h4 work-sans-bold l-text text-graphite my-3">Bienvenue
  79.                                     <span class="fa-sharp fa-regular fa-hand-wave"></span>
  80.                                 </h2>
  81.                                 <p class="work-sans-medium m-text text-carbone">Connectez-vous pour accéder au contenu !</p>
  82.                                 <div class="d-flex flex-column align-items-center">
  83.                                     <a href="{{path('app_login', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
  84.                                     <a href="{{path('app_register', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="text-graphite mt-2 ns-text work-sans-semi-bold">S'inscrire</a>
  85.                                 </div>
  86.                             </div>
  87.                         {% endif %}
  88.                     </div>
  89.                     {% for clientProduct in client.clientProducts %}
  90.                         {% if clientProduct.product.name == 'Defi-inclusion' and app.user != null and userProduct != null and clientProduct.isActive == 1 and clientProduct.hasLocationLadder  == 1 %}
  91.                             {% if locationsArray is defined and locationsArray is not empty %}
  92.                                 <div class="bg-white mt-4 px-4 py-4 b-radius-5">
  93.                                     <div class="d-flex align-items-center mb-3">
  94.                                         <span class="fa-sharp fa-solid fa-crown text-{{client.slug}}"></span>
  95.                                         <h5 class="work-sans-bold ms-2 mb-0">Classement du défi de l'inclusion</h3>
  96.                                     </div>
  97.                                     <div style="max-height: 385px;" class="overflow-auto">
  98.                                         <table class="table table-striped">
  99.                                             <tbody>
  100.                                                 {% for location, score in locationsArray %}
  101.                                                     <tr>
  102.                                                         <td class="ps-4">
  103.                                                             {% if loop.index <= 3 %}
  104.                                                                 <span class="fa-sharp fa-solid fa-trophy text-{{client.slug}} me-2"></span>
  105.                                                             {% else %}
  106.                                                                 <span class="fa-sharp fa-solid fa-medal text-{{client.slug}} me-2"></span>
  107.                                                             {% endif %}
  108.                                                             {{loop.index}}
  109.                                                         </td>
  110.                                                         <td class="text-uppercase">Team {{location}}</td>
  111.                                                         <td class="ps-4">{{score}}</td>
  112.                                                     </tr>
  113.                                                 {% endfor %}
  114.                                             </tbody>
  115.                                         </table>
  116.                                     </div>
  117.                                 </div>
  118.                             {% endif %}
  119.                         {% elseif clientProduct.product.slug == 'autodiagnostic-handicap' and userProduct == null and clientProduct.isActive == 1 and clientProduct.startAt|date("Y-m-d") >= "now"|date("Y-m-d") %}
  120.                             <div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-5">
  121.                                 <span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
  122.                                 <div class="ms-3">
  123.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic Handicap</h2>
  124.                                     <p class="work-sans-medium text-carbone ns-text pe-2">En moins de deux minutes et 8 questions, il vous permet de faire le point sur votre situation et d'identifier les acteurs pour vous accompagner.</p>
  125.                                     <div class="row">
  126.                                         <small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">8 questions (2min)</small>
  127.                                         {% for question in clientProduct.product.diagQuestions %}
  128.                                             {% if question.position == 1 %}
  129.                                                 <div class="col-12 position-relative">
  130.                                                 <a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
  131.                                                 <span class="text-white work-sans-medium ml-text">Faire le test</span> 
  132.                                                 <span class="fa-sharp fa-solid fa-arrow-right"></span>
  133.                                                 </a>
  134.                                                 </div>
  135.                                             {% endif %}
  136.                                         {% endfor %}
  137.                                     </div>
  138.                                 </div>
  139.                             </div>
  140.                         {% elseif clientProduct.product.slug == 'autodiagnostic-handicap-2' and userProduct == null and clientProduct.isActive == 1 and clientProduct.startAt|date("Y-m-d") >= "now"|date("Y-m-d") %}
  141.                             <div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-5">
  142.                                 <span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
  143.                                 <div class="ms-3">
  144.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic : faites le point sur votre situation de santé au travail</h2>
  145.                                     <p class="work-sans-medium text-carbone ns-text pe-2">En moins de 5 minutes et 15 questions, il vous permet de réfléchir à l’impact éventuel de votre état de santé sur votre activité professionnelle et d’identifier des ressources adaptées à vos besoins. Ce test est anonyme et confidentiel : aucune donnée ne sera collectée ou communiquée à votre employeur. </p>
  146.                                     <div class="row">
  147.                                         <small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">15 questions (5min)</small>
  148.                                         {% for question in clientProduct.product.diagQuestions %}
  149.                                             {% if question.position == 1 %}
  150.                                                 <div class="col-12 position-relative">
  151.                                                 <a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
  152.                                                 <span class="text-white work-sans-medium ml-text">Faire le test</span> 
  153.                                                 <span class="fa-sharp fa-solid fa-arrow-right"></span>
  154.                                                 </a>
  155.                                                 </div>
  156.                                             {% endif %}
  157.                                         {% endfor %}
  158.                                     </div>
  159.                                 </div>
  160.                             </div>
  161.                         {% elseif clientProduct.product.slug == 'test-auditif' and userProduct == null and clientProduct.isActive == 1 and clientProduct.startAt|date("Y-m-d") <= 'now' | date('Y-m-d') %}
  162.                             <!-- Test Auditif -->
  163.                             <div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-2">
  164.                                 <span class="fa-sharp fa-regular fa-ear-listen text-{{client.slug}} avisea-homepage-hear-icon"></span>
  165.                                 <div class="ms-3">
  166.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Test auditif</h2>
  167.                                     <p class="work-sans-medium text-carbone ns-textt pe-2">Vous vous posez des questions quant à votre niveau d'audition ? Réalisez notre test auditif et faisons le point ensemble !</p>
  168.                                     <div class="row">
  169.                                         <small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">6 questions (5min)</small>
  170.                                         <div class="col-12 position-relative">
  171.                                         <a href="{{path('app_audition_test_age', {'clientSlug': client.slug, 'id': clientProduct.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
  172.                                         <span class="text-white work-sans-medium ml-text">Faire le test</span>
  173.                                             <span class="fa-sharp fa-solid fa-arrow-right"></span>
  174.                                         </a>
  175.                                     </div>
  176.                                     </div>
  177.                                 </div>
  178.                             </div>
  179.                         {% endif %}
  180.                     {% endfor %}
  181.                 </div>
  182.             </div>
  183.         {% else %}
  184.             <div class="d-flex justify-content-center">
  185.                 <div class="col-md-7 card card-img-top-hp">
  186.                     <img src="{{asset('img/alt-logo/client/' ~ client.id ~ '/' ~ client.altLogo)}}" class="card-img-top" alt="">
  187.                     <div class="card-body">
  188.                         <h1 class="card-title text-graphite work-sans-bold mb-4 l-text">Informations</h1>
  189.                         <span class="fa-sharp fa-solid fa-link text-{{client.slug}} mb-4"></span>
  190.                         <a href="/document/guide-plateforme-ween.pdf" target="_blank" class="ms-2 text-graphite work-sans-bold ns-text">Télécharger le guide de la plateforme</a>
  191.                         <p class="card-text work-sans-medium text-carbone m-text">{{client.description|raw}}</p>
  192.                     </div>
  193.                 </div>
  194.                 <div class="col-md-5">
  195.                     <!-- Login / Regsiter card -->
  196.                     <div class="d-none d-sm-block">
  197.                         {% if is_granted('ROLE_USER') %}
  198.                             <div class="bg-white ms-4 b-radius-5 mb-3">
  199.                                 <div class="bg_secondary_client py-5 text-end b-radius-5">
  200.                                     <a href="{{path('app_my_profile')}}" class="editEncart text-graphite me-4 work-sans-medium">
  201.                                         <span class="fa-sharp fa-solid fa-pen me-1"></span>Éditer</a>
  202.                                 </div>
  203.                                 <div class="text-center pb-4">
  204.                                     <div class="bg-white mx-auto mb-4 my-account-logo-background-homepage">
  205.                                         {% if app.user.avatar != null %}
  206.                                             {{app.user.avatar.code|raw}}
  207.                                         {% else %}
  208.                                             <span class="fa-duotone fa-user-robot"></span>
  209.                                         {% endif %}
  210.                                     </div>
  211.                                     <h3 class="work-sans-bold mb-0">{{app.user.firstName}}
  212.                                         <span class="text-uppercase">{{app.user.lastName}}</span>
  213.                                     </h3>
  214.                                     <p class="mb-0 work-sans-medium">{{app.user.jobTitle}}</p>
  215.                                     {% if app.user.location != null %}
  216.                                         <p class="work-sans-medium-italic mb-0">{{app.user.location.name}}</p>
  217.                                     {% endif %}
  218.                                     <p class="work-sans-bold text-uppercase mt-1">{{app.user.client.name}}</p>
  219.                                 </div>
  220.                             </div>
  221.                         {% else %}
  222.                             <div class="bg-white ms-4 p-4 text-center b-radius-5 mb-3">
  223.                                 <span class="fa-sharp fa-solid fa-lock text-notice d-block avisea-homepage-lock-icon opacity-50"></span>
  224.                                 <h2 class="h4 work-sans-bold l-text text-graphite my-3">Bienvenue
  225.                                     <span class="fa-sharp fa-regular fa-hand-wave"></span>
  226.                                 </h2>
  227.                                 <p class="work-sans-medium m-text text-carbone">Connectez-vous pour accéder au contenu !</p>
  228.                                 <div class="d-flex flex-column align-items-center">
  229.                                     {% if client is defined %}
  230.                                         {% if client.isSecure is same as true %}
  231.                                             <a href="{{path('app_login', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
  232.                                         {% else %}
  233.                                             <a href="{{path('app_login_unsecure', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="btn-notice text-decoration-none work-sans-medium ns-text">Se connecter</a>
  234.                                         {% endif %}
  235.                                     <a href="{{path('app_register', {'clientSlug': client.slug, 'clientSalt': client.salt})}}" class="text-graphite mt-2 ns-text work-sans-semi-bold">S'inscrire</a>
  236.                                     {% else %}
  237.                                         {{ render(controller('App\\Controller\\PageController::renderLoginRegisterBtn')) }}
  238.                                     {% endif %}
  239.                                 </div>
  240.                             </div>
  241.                         {% endif %}
  242.                     </div>
  243.                     {% for clientProduct in client.clientProducts %}
  244.                         {% if clientProduct.product.name == 'Defi-inclusion' and app.user != null and userProduct != null and clientProduct.isActive == 1 and clientProduct.hasLocationLadder  == 1 %}
  245.                             {% if locationsArray is defined and locationsArray is not empty %}
  246.                                 <div class="bg-white ms-4 px-4 py-4 b-radius-5">
  247.                                     <div class="d-flex align-items-center mb-3">
  248.                                         <span class="fa-sharp fa-solid fa-crown text-{{client.slug}}"></span>
  249.                                         <h5 class="work-sans-bold ms-2 mb-0">Classement du défi de l'inclusion</h3>
  250.                                     </div>
  251.                                     <div style="max-height: 385px;" class="overflow-auto">
  252.                                         <table class="table table-striped">
  253.                                             <tbody>
  254.                                                 {% for location, score in locationsArray %}
  255.                                                     <tr>
  256.                                                         <td class="ps-4">
  257.                                                             {% if loop.index <= 3 %}
  258.                                                                 <span class="fa-sharp fa-solid fa-trophy text-{{client.slug}} me-2"></span>
  259.                                                             {% else %}
  260.                                                                 <span class="fa-sharp fa-solid fa-medal text-{{client.slug}} me-2"></span>
  261.                                                             {% endif %}
  262.                                                             {{loop.index}}
  263.                                                         </td>
  264.                                                         <td class="text-uppercase">Team {{location}}</td>
  265.                                                         <td class="ps-4">{{score}}</td>
  266.                                                     </tr>
  267.                                                 {% endfor %}
  268.                                             </tbody>
  269.                                         </table>
  270.                                     </div>
  271.                                 </div>
  272.                             {% endif %}
  273.                         {% endif %}
  274.                         
  275.                         {% if clientProduct.product.slug == 'autodiagnostic-handicap' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d") %}
  276.                             <div class="bg-white p-4 b-radius-5 d-flex align-items-start ms-4 position-relative mt-3">
  277.                                 <span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
  278.                                 <div class="ms-3">
  279.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic Handicap</h2>
  280.                                     <p class="work-sans-medium text-carbone ns-text">En moins de deux minutes et 8 questions, il vous permet de faire le point sur votre situation et d'identifier les acteurs pour vous accompagner.</p>
  281.                                     <div class="d-flex align-items-center mt-5 mb-3">
  282.                                         <small class="text-smoke work-sans-medium ns-text">8 questions (2min)</small>
  283.                                         {% for question in clientProduct.product.diagQuestions %}
  284.                                             {% if question.position == 1 %}
  285.                                                 <a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
  286.                                             {% endif %}
  287.                                         {% endfor %}
  288.                                         <span class="text-white work-sans-medium ml-text">Faire le test</span> 
  289.                                             <span class="fa-sharp fa-solid fa-arrow-right"></span>
  290.                                         </a>
  291.                                     </div>
  292.                                 </div>
  293.                             </div>
  294.                         {% endif %}
  295.                         {% if clientProduct.product.slug == 'autodiagnostic-handicap-2' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d") %}
  296.                             <div class="bg-white pt-4 px-2 pb-5 b-radius-5 d-flex align-items-start position-relative mb-5 mt-5 ms-4">
  297.                                 <span class="ps-2 fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
  298.                                 <div class="ms-3">
  299.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic : faites le point sur votre</h2>
  300.                                     <h2 class="h4 work-sans-bold text-graphite m-text">situation de santé au travail</h2>
  301.                                     <p class="work-sans-medium text-carbone ns-text pe-3">En moins de 5 minutes et 15 questions, il vous permet de réfléchir à l’impact éventuel de votre état de santé sur votre activité professionnelle et d’identifier des ressources adaptées à vos besoins. Ce test est anonyme et confidentiel : aucune donnée ne sera collectée ou communiquée à votre employeur. </p>
  302.                                     <div class="row">
  303.                                         <small class="col-12 text-smoke work-sans-medium ns-text mb-4 mt-3">15 questions (5min)</small>
  304.                                         {% for question in clientProduct.product.diagQuestions %}
  305.                                             {% if question.position == 1 %}
  306.                                                 <div class="col-12 position-relative">
  307.                                                 <a href="{{path('app_auto_diagnostic_quizz', {'clientSlug': client.slug, 'id': question.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
  308.                                                 <span class="text-white work-sans-medium ml-text">Faire le test</span> 
  309.                                                 <span class="fa-sharp fa-solid fa-arrow-right"></span>
  310.                                                 </a>
  311.                                                 </div>
  312.                                             {% endif %}
  313.                                         {% endfor %}
  314.                                     </div>
  315.                                 </div>
  316.                             </div>
  317.                         {% endif %}
  318.                         {% if clientProduct.product.slug == 'test-auditif' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d")  %}
  319.                             <!-- Test Auditif -->
  320.                             <div class="bg-white p-4 b-radius-5 d-flex align-items-start ms-4 position-relative mt-3">
  321.                                 <span class="fa-sharp fa-regular fa-ear-listen text-{{client.slug}} avisea-homepage-hear-icon"></span>
  322.                                 <div class="ms-3">
  323.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Test auditif</h2>
  324.                                     <p class="work-sans-medium text-carbone ns-text">Vous vous posez des questions quant à votre niveau d'audition ? Réalisez notre test auditif et faisons le point ensemble !</p>
  325.                                     <div class="d-flex align-items-center mt-5 mb-3">
  326.                                         <small class="text-smoke work-sans-medium ns-text">6 questions (5min)</small>
  327.                                         <a href="{{path('app_audition_test_age', {'clientSlug': client.slug, 'id': clientProduct.id})}}" target="_blank" class="btn-notice text-decoration-none arrow-link">
  328.                                         <span class="text-white work-sans-medium ml-text">Faire le test</span>
  329.                                             <span class="fa-sharp fa-solid fa-arrow-right"></span>
  330.                                         </a>
  331.                                     </div>
  332.                                 </div>
  333.                             </div>
  334.                         {% endif %}
  335.                     {% endfor %}
  336.                 </div>
  337.             </div>
  338.         {% endif %}
  339.             <!-- Carousel Flash Workshops à venir -->
  340.             {% if flashWorkshops != null %}
  341.                     {% if is_mobile() %}    
  342.                     <div class="d-flex justify-content-between mt-4 mb-3">
  343.                         
  344.                         <div class="d-flex">
  345.                             <div class="p-2 col">
  346.                                 <h2 class="fs-6 work-sans-bold"><span lang="en">Event & Flash Learning</span> à venir</h2>
  347.                             </div>
  348.                             <div class="p-2 col">
  349.                                 <div class="slick-container text-end">
  350.                                     <div class="custom-controls">
  351.                                         <button type="button" class="btn-notice carousel-prev text-decoration-none p-2 me-1">
  352.                                             <span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-left text-center"></span>
  353.                                             <span class="visually-hidden">Défiler à gauche</span>
  354.                                         </button>
  355.                                         <button type="button" class="btn-notice carousel-next text-decoration-none p-2">
  356.                                             <span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-right text-center"></span>
  357.                                             <span class="visually-hidden">Défiler à droite</span>
  358.                                         </button>
  359.                                     </div>
  360.                                 </div>
  361.                             </div>
  362.                         </div>
  363.                     </div>
  364.                     {% else %}
  365.                     <div id="incoming_flashworkshops" class="container bg-white b-radius-5 pb-3 mt-4">
  366.                         <div class="p-3">
  367.                             <div class="d-flex justify-content-between mt-2 mb-3">
  368.                                 <h2 class="h4 work-sans-bold"><span lang="en">Event & Flash Learning</span> à venir</h2>
  369.                                 <div class="slick-container me-3">
  370.                                     <div class="custom-controls">
  371.                                         <button type="button" class="btn-notice carousel-prev text-decoration-none me-1 p-2">
  372.                                             <span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-left text-center"></span>
  373.                                             <span class="visually-hidden">Défiler à gauche</span>
  374.                                         </button>
  375.                                         <button type="button" class="btn-notice carousel-next text-decoration-none ms-1 p-2">
  376.                                             <span aria-hidden="true" class="fa-sharp fa-solid fa-arrow-right text-center"></span>
  377.                                             <span class="visually-hidden">Défiler à droite</span>
  378.                                         </button>
  379.                                     </div>
  380.                                 </div>
  381.                             </div>
  382.                         </div>
  383.                     {% endif %}
  384.                         <div class="homepage-flashworkshops">
  385.                             {% set i = 0 %}
  386.                             {% set j = 0 %}
  387.                             {% for flashWorkshop in flashWorkshops %}
  388.                                 {% set i = i + 1 %}
  389.                                 {% if flashWorkshop.flashWorkshopEntity.isOutdated != true %}
  390.                                 <div class="align-content-center card ms-3 mb-5" style="width: 18.5rem;">
  391.                                     <div class="align-self-end card h-100 border-0" >
  392.                                         <div class="position-relative">
  393.                                             {% if flashWorkshop.flashWorkshopEntity.logoProfile is defined and flashWorkshop.flashWorkshopEntity.logoProfile is not null %}
  394.                                                 <div class="badge-triangle-slider">
  395.                                                 {% if 'src' in flashWorkshop.flashWorkshopEntity.logoProfile %}
  396.                                                     <div class="froalaLogoProfile">
  397.                                                     {{flashWorkshop.flashWorkshopEntity.logoProfile|raw}}
  398.                                                     </div>
  399.                                                 {% else %}
  400.                                                     <img alt="" class="rounded" src="{{asset("img/logo/flash-workshop/logo-profile/" ~ flashWorkshop.flashWorkshopEntity.id ~ "/" ~ flashWorkshop.flashWorkshopEntity.logoProfile)}}" style="width:75px!important;">
  401.                                                 {% endif %}
  402.                                                 </div>
  403.                                             {% endif %}
  404.                                             <div class="card-img-top-mobile">{{flashWorkshop.flashWorkshopEntity.imgProfile|raw}}</div>
  405.                                             <small class="flash-workshop-card-category text-white bg-carbone b-radius-5 px-2 py-1">{{flashWorkshop.flashWorkshopEntity.flashWorkshopType.name}}</small>
  406.                                         </div>
  407.                                         <div class="card-body">
  408.                                             <h3 class="h5 card-title text-graphite work-sans-bold ns-text">{{ flashWorkshop.flashWorkshopEntity.title|length > 23 ? flashWorkshop.flashWorkshopEntity.title|slice(0, 23) ~ '…' : flashWorkshop.flashWorkshopEntity.title  }}</h3>
  409.                                             {% if flashWorkshop.flashWorkshopEntity.description is not null %}
  410.                                                 <p class="card-text work-sans-medium text-carbone ns-l">
  411.                                             {% if flashWorkshop.flashWorkshopEntity.description|striptags|length|raw > 160 %}
  412.                                                 {{flashWorkshop.flashWorkshopEntity.description|striptags|slice(0, 160)|raw}} ...
  413.                                             {% else %} 
  414.                                             {{flashWorkshop.flashWorkshopEntity.description|raw}}    
  415.                                             {% endif %}                                        
  416.                                                 </p>
  417.                                             {% endif %}
  418.                                             <ul>
  419.                                                 <li class="text-smoke d-flex align-items-center mb-3">
  420.                                                     <span class="fa-sharp fa-solid fa-microphone text-smoke"></span>
  421.                                                     <small class="text-smoke ms-2 work-sans-medium sm-text">{{flashWorkshop.flashWorkshopEntity.speaker}}</small>
  422.                                                 </li>
  423.                                                 <li class="text-smoke d-flex align-items-center mb-3">
  424.                                                     <span class="fa-sharp fa-solid fa-location-dot text-smoke"></span>
  425.                                                     {% if flashWorkshop.flashWorkshopEntity.onSite == true %}
  426.                                                         <small class="text-smoke ms-2 work-sans-medium sm-text">Dans votre agence ({{flashWorkshop.flashWorkshopEntity.duration}})</small>
  427.                                                     {% else %}
  428.                                                         <small class="text-smoke ms-2 work-sans-medium sm-text">En ligne ({{flashWorkshop.flashWorkshopEntity.duration}})</small>
  429.                                                     {% endif %}
  430.                                                 </li>
  431.                                                 <li class="text-smoke d-flex align-items-center">
  432.                                                     {% if flashWorkshop.flashWorkshopEntity.timeslotDate is not null %}
  433.                                                             <span class="fa-sharp fa-solid fa-calendar-days text-smoke"></span>
  434.                                                             <small class="text-smoke ms-2 work-sans-medium sm-text"> {{flashWorkshop.flashWorkshopEntity.timeslotDate|raw}}
  435.                                                             </small>
  436.                                                     {% endif %}
  437.                                                 </li>
  438.                                             </ul>
  439.                                         </div>
  440.                                     </div>
  441.                                     <div class="card-footer">
  442.                                             {% if is_granted('ROLE_USER') %}
  443.                                                 {% if flashWorkshop.flashWorkshopEntity in flashWorkshopsReservedForUser %}
  444.                                                     {% for flashUserWorkshop in flashWorkshop.flashWorkshopEntity.flashUserWorkshops %}
  445.                                                         {% if flashUserWorkshop.user == app.user %}
  446.                                                             <form method="post" action="{{ path('app_flash_user_workshop_delete', {'userSalt': app.user.salt, 'id': flashUserWorkshop.id}) }}" onsubmit="return confirm('Etes-vous certain de vouloir supprimer cet élément ?');">
  447.                                                                 <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ flashUserWorkshop.id) }}">
  448.                                                                 <button class="btn-notice-outline mt-auto w-100">
  449.                                                                     {% if flashWorkshop.flashWorkshopEntity.isFull == true and flashUserWorkshop.inQueue == true %}
  450.                                                                         Retirer de la liste d'attente
  451.                                                                     {% else %}
  452.                                                                         Retirer de mon agenda
  453.                                                                         <span class="fa-sharp fa-solid fa-calendar-circle-minus text-notice ms-2"></span>
  454.                                                                     {% endif %}
  455.                                                                 </button>
  456.                                                             </form>
  457.                                                         {% endif %}
  458.                                                     {% endfor %}
  459.                                                 {% else %}
  460.                                                     {% if flashWorkshop.flashWorkshopEntity.isEmpty == true or flashWorkshop.flashWorkshopEntity.flashTimeslots|length == 0 %}
  461.                                                     {% elseif flashWorkshop.flashWorkshopEntity.isOutdated == true %}
  462.                                                         <a class="d-block btn-error text-center text-decoration-none mt-auto w-100">Plus de disponibilité</a>
  463.                                                     {% elseif flashWorkshop.flashWorkshopEntity.isFull == true %}
  464.                                                         <a href="{{path('app_flash_user_workshop_new_in_queue', {'flashWorkshopId': flashWorkshop.flashWorkshopEntity.id})}}" class="d-block btn-notice text-center text-decoration-none mt-auto w-100">Ajouter sur liste d'attente</a>
  465.                                                     {% else %}
  466.                                                             <button type="button" class="btn-notice mt-auto w-100" data-bs-toggle="modal" data-bs-target="#modal-choose-timeslot-{{i}}"> <span>Choisir mon créneau</span>
  467.                                                             <span class="fa-sharp fa-solid fa-calendar-clock ms-2"></span>
  468.                                                         </button>
  469.                                                     {% endif %}
  470.                                                 {% endif %}
  471.                                             {% endif %}
  472.                                         </div>
  473.                                     </div>
  474.                                 {% endif %}
  475.                             {% endfor %}
  476.                         </div>
  477.                         {% set k = 0 %}
  478.                         {% set l = 0 %}
  479.                         {% if is_granted('ROLE_USER') %}
  480.                             {% for flashWorkshop in flashWorkshops %}
  481.                                 {% set k = k + 1 %}
  482.                                 <!-- Modal Desktop -->
  483.                                 <div class="modal fade border-none" id="modal-choose-timeslot-{{k}}" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel{{k}}" aria-hidden="true">
  484.                                     <div class="modal-dialog modal-lg b-radius-5">
  485.                                         <div class="modal-content bg-white b-radius-5 px-3 timeslot-modal">
  486.                                             <div class="d-flex justify-content-between align-items-center">
  487.                                                 <div class="mt-3">
  488.                                                     <h1 class="h4 modal-title work-sans-bold" id="staticBackdropLabel{{k}}">Choisissez votre créneau</h1>
  489.                                                     <p class="text-graphite">Sélectionnez une date et une heure pour ajouter la session à votre agenda.</p>
  490.                                                 </div>
  491.                                                 <button type="button" class="btn" data-bs-dismiss="modal" aria-label="Fermer">
  492.                                                     <span class="fa-sharp fa-solid fa-circle-xmark modal-mark"></span>
  493.                                                     <span class="sr-only">Fermer la modale</span>
  494.                                                 </button>
  495.                                             </div>
  496.                                             <form method="post" action="{{path('app_flash_user_workshop_new')}}">
  497.                                                 <div class="">
  498.                                                     {% for date, timeslot in flashWorkshop.timeslots %}
  499.                                                         {% set m = 0 %}
  500.                                                         {% for t in timeslot %}
  501.                                                             {% if t.isFull == true %}
  502.                                                                 {% set m = m + 1 %}
  503.                                                             {% endif %}
  504.                                                         {% endfor %}
  505.                                                         {% if date|date('Y-m-d') >= "now"|date('Y-m-d') and m != timeslot|length %}
  506.                                                             <h6 class="text-smoke text-capitalize">{{date|format_datetime(locale='fr', pattern="EEEE dd MMMM YYYY")}}</h6>
  507.                                                         {% endif %}
  508.                                                         {% for t in timeslot %}
  509.                                                             {% set l = l + 1 %}
  510.                                                             {% if t.isFull != true and t.isOutdated != true %}
  511.                                                                 <div class="timeslot-radio-btn">
  512.                                                                     <input data-label="{{t.startHour|replace({':': 'h'})}} - {{t.endHour|replace({':': 'h'})}}" type="radio" id="{{t.id}}_{{l}}" name="{{flashWorkshop.flashWorkshopEntity.id}}" value="{{t.id}}">
  513.                                                                 </div>
  514.                                                             {% endif %}
  515.                                                         {% endfor %}
  516.                                                     {% endfor %}
  517.                                                 </div>
  518.                                                 <div class="text-center">
  519.                                                     <button type="submit" class="d-inline-block modal-center-btn text-decoration-none mb-3">Ajouter à mon agenda</button>
  520.                                                 </div>
  521.                                             </form>
  522.                                         </div>
  523.                                     </div>
  524.                                 </div>
  525.                             {% endfor %}
  526.                         {% endif %}
  527.                 </div>
  528.             {% endif %}
  529.             <div class="d-flex justify-content-between mt-4">
  530.                 {% for clientProduct in client.clientProducts %}
  531.                     {% if clientProduct.product.name == 'Defi-inclusion' and app.user != null and userProduct != null %}
  532.                     {% elseif clientProduct.product.name == 'Autodiagnostic-handicap' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d")%}
  533.                             <!-- Auto Diagnostic Handicap -->
  534.                             <div class="bg-white p-4 b-radius-5 d-flex align-items-start position-relative wp-50-mx">
  535.                                 <span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
  536.                                 <div class="ms-3">
  537.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic Handicap</h2>
  538.                                     <p class="work-sans-medium text-carbone ns-text">En moins de deux minutes et 8 questions, il vous permet de faire le point sur votre situation et d'identifier les acteurs pour vous accompagner.</p>
  539.                                     <div class="d-flex align-items-center mt-5 mb-3">
  540.                                         <small class="text-smoke work-sans-medium ns-text">8 questions (2min)</small>
  541.                                         <a href="https://auto-diagnostic-handicap.avisea.fr" target="_blank" class="btn-notice text-decoration-none arrow-link">
  542.                                         <span class="text-white work-sans-medium ml-text">Faire le test</span> 
  543.                                             <span class="fa-sharp fa-solid fa-arrow-right"></span>
  544.                                         </a>
  545.                                     </div>
  546.                                 </div>
  547.                             </div>
  548.                     {% elseif clientProduct.product.name == 'autodiagnostic-handicap-2' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d")%}
  549.                             <!-- Auto Diagnostic Handicap -->
  550.                             <div class="bg-white p-4 b-radius-5 d-flex align-items-start position-relative wp-50-mx">
  551.                                 <span class="fa-sharp fa-solid fa-stethoscope text-{{client.slug}} avisea-homepage-stetoscop-icon"></span>
  552.                                 <div class="ms-3">
  553.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Autodiagnostic : faites le point sur votre</h2>
  554.                                     <h2 class="h4 work-sans-bold text-graphite m-text">situation de santé au travail</h2>
  555.                                     <p class="work-sans-medium text-carbone ns-text">En moins de 5 minutes et 15 questions, il vous permet de réfléchir à l’impact éventuel de votre état de santé sur votre activité professionnelle et d’identifier des ressources adaptées à vos besoins. Ce test est anonyme et confidentiel : aucune donnée ne sera collectée ou communiquée à votre employeur. </p>
  556.                                     <div class="d-flex align-items-center mt-5 mb-3">
  557.                                         <small class="text-smoke work-sans-medium ns-text">15 questions (5min)</small>
  558.                                         <a href="https://auto-diagnostic-handicap.avisea.fr" target="_blank" class="btn-notice text-decoration-none arrow-link">
  559.                                         <span class="text-white work-sans-medium ml-text">Faire le test</span> 
  560.                                             <span class="fa-sharp fa-solid fa-arrow-right"></span>
  561.                                         </a>
  562.                                     </div>
  563.                                 </div>
  564.                             </div>
  565.                     {% elseif clientProduct.product.name == 'Test-auditif' and userProduct == null and clientProduct.isActive is same as true and clientProduct.startAt|date("Y-m-d") <= "now"|date("Y-m-d") %}
  566.                             <!-- Test Auditif -->
  567.                             <div class="bg-white p-4 b-radius-5 d-flex align-items-start position-relative wp-50-mx">
  568.                                 <span class="fa-sharp fa-regular fa-ear-listen text-{{client.slug}} avisea-homepage-hear-icon"></span>
  569.                                 <div class="ms-3">
  570.                                     <h2 class="h4 work-sans-bold text-graphite m-text">Test auditif</h2>
  571.                                     <p class="work-sans-medium text-carbone ns-text">Vous vous posez des questions quant à votre niveau d'audition ? Réalisez notre test auditif et faisons le point ensemble !</p>
  572.                                     <div class="d-flex align-items-center mt-5 mb-3">
  573.                                         <small class="text-smoke work-sans-medium ns-text">6 questions (5min)</small>
  574.                                         <a href="https://plateforme-auditive.avisea.fr" target="_blank" class="btn-notice text-decoration-none arrow-link">
  575.                                         <span class="text-white work-sans-medium ml-text">Faire le test</span>
  576.                                             <span class="fa-sharp fa-solid fa-arrow-right"></span>
  577.                                         </a>
  578.                                     </div>
  579.                                 </div>
  580.                             </div>
  581.                     {% endif %}
  582.                 {% endfor %}
  583.             </div>
  584.         </div>
  585.     </main>
  586.     <!---->
  587. {% endblock %}
  588. {% block javascripts %}
  589.     <script>
  590.         $(document).ready(function () {
  591.             $('.homepage-flashworkshops').slick({
  592.                 infinite: true,
  593.                 variableWidth: true,
  594.                 nextArrow: '.carousel-next',
  595.                 prevArrow: '.carousel-prev',
  596.                 slidesToShow: 4,
  597.                 slidesToScroll: 4,
  598.                 responsive: [
  599.                     {
  600.                         breakpoint: 768,
  601.                         settings: {
  602.                             arrows: false,
  603.                             centerMode: true,
  604.                             centerPadding: '40px',
  605.                             slidesToShow: 3,
  606.                             slidesToScroll: 3,
  607.                         }
  608.                     },
  609.                     {
  610.                         breakpoint: 480,
  611.                         settings: {
  612.                             arrows: false,
  613.                             centerMode: true,
  614.                             centerPadding: '40px',
  615.                             slidesToShow: 1,
  616.                             slidesToScroll: 1,
  617.                         }
  618.                     }
  619.                 ]
  620.                 });
  621.             });
  622.     </script>
  623. {% endblock %}