{% extends "base.html.twig" %}
{# extension.excerpt #}
{% block style %}
{{ parent() }}
{% include "css/shepherd.html.twig" %}
{% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'gt_css'} %}
{% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'loader_css'} %}
{% for i, jalon in content.jalons %}
{% include "articles/styles/base-css-logic.html.twig" with {content : jalon} %}
{% endfor %}
{% endblock %}
{% block content %}
{% set name = app.request.attributes.get('structure').structure.name %}
{% set values = ['Ressources','Groupe de travail'] %}
{% set jalons = content.jalons %}
{% include "articles-blocks/breadcrumb.html.twig" with {titles : values} %}
<section class="single-article-container prelative ingt-intro">
<article>
<div class="mlr-1em introGtHeader">
{% include "articles-blocks/header.html.twig" %}
{% set categories = extension.excerpt.categories %}
{% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
<div class="fw500 fs20 lh28 text cgrey mt-40px">
{{ content.chapo|raw }}
</div>
</div>
<div class="introGtInfos plr-1em">
<div class="gt-infos-container dflex fwwrap jcsb aic introGtInfos">
<div class="gt-infos">
{% if content.referent_pqna is defined and content.referent_pqna is not null %}
<div class="dflex fw600 fs18 fwwrap">
<div class="icon-cont">
<img src="/resources/img/user-offre-icon.svg" alt="" class="mr-8px" width="17" height="19">
</div>
Référent PQN-A :
<span class="fw400 ml-4px">
{{ content.referent_pqna.fullName }}
</span>
</div>
{% endif %}
<div class="dflex fw600 fs18 mt-1em fwwrap"{% if app.user is not empty and app.user.contact in content.participants %}id="show-participants" title="Afficher les participants"{% endif %}>
<div class="icon-cont">
<img src="/resources/img/user-offre-icon.svg" alt="" class="mr-8px" width="17" height="19">
</div>
Nombre de participants :
<span class="fw400 ml-4px">
{{ content.participants|length }}
</span>
</div>
{% if content.limit_date is defined and content.limit_date is not null %}
<div class="dflex fw600 fs18 mt-1em fwwrap">
<div class="icon-cont">
<img src="/resources/img/calendar-icon.svg" alt="" class="mr-8px" width="21" height="20">
</div>
Dates limites d'inscription :
<span class="ml-4px fw400">
{{ content.limit_date }}
</span>
</div>
{% endif %}
</div>
{% if app.user is empty or app.user.contact not in content.participants %}
{% include "articles-blocks/gt-inscription-button.html.twig" with {text: "Je souhaite participer", class: "gt-inscription"} %}
{% else %}
{% include "articles-blocks/gt-forum.html.twig" %}
{% endif %}
</div>
{% if content.group_title is defined and content.group_title is not null %}
<h2 class="mt-40px">
{{ content.group_title }}
</h2>
{% endif %}
{% if content.group_desc is defined and content.group_desc is not null %}
<div class="dflex mt-1em">
{{ content.group_desc|raw }}
</div>
{% endif %}
</div>
{% set etapeClass = "etape cwhite dflex jcc aic bgturquoise prelative" %}
{% set etapeTitleClass = "etape-title pabsolute cblue not-visible-mobile" %}
{% set actualMobileTitle = '' %}
<div class="etape-container dflex jcsb aic w100 bgblue">
<div
class="etape-holder dflex jcsa aic w100 introGtStep plr-1em">
{# logique pour capter le jalon le plus tardif parmis ceux qui ont été mis "en cours" #}
{% set actualStep = 0 %}
{% for i, jalon in jalons %}
{% if jalon.jalon_title is defined and jalon.jalon_title is not empty and jalon.main_content|length > 0 %}
{% if jalon.jalon_main %}
{% set actualStep = i + 1 %}
{% endif %}
{% endif %}
{% endfor %}
{% for i, jalon in jalons %}
{% if jalon.jalon_title is defined and jalon.jalon_title is not empty and jalon.main_content|length > 0 %}
{% if i + 1 == actualStep %}
{% set actualMobileTitle = jalon.jalon_title %}
{% endif %}
<button class="{{ etapeClass }}{% if i + 1 == actualStep %} pending{% endif %}" data-jalon={{ i + 1 }}>
<span class="pabsolute fw600{% if i + 1 == actualStep %} fs30{% else %} fs22{% endif %}">
{{i + 1}}
</span>
{% if jalon.jalon_title is defined and jalon.jalon_title is not empty %}
<span class="{{ etapeTitleClass }}{% if i + 1 == actualStep %} fw600{% endif %}">
{{ jalon.jalon_title }}
</span>
{% endif %}
</button>
{% endif %}
{% endfor %}
</div>
</div>
{% if actualMobileTitle != '' %}
<div class="center visible-mobile plr-16px">{{ actualMobileTitle }}</div>
{% endif %}
{# ce code est pour éviter d'avoir le bouton d'inscription à un GT quand vu depuis la preview depuis le BO #}
{% if "sulu_preview" in app.request.pathInfo %}
{% include "articles-blocks/gt-content.html.twig" %}
{% else %}
{% if app.user is empty or app.user.contact not in content.participants %}
<section class="prelative gt-preview-section plr-1em">
<div class="pabsolute dflex aic jcc zi1 w100 h100">
{% include "articles-blocks/gt-inscription-button.html.twig" with {text: "Demandez l'accès pour consulter les ressources et participez au groupe de travail", class: "gt-preview-link"} %}
</div>
<div class="blurred ptb-80px plr-1em">
<h2 class="mt-40px fw400 lh40 fs36">Veuillez vous connecter pour accéder à ce groupe de travail.</h2>
<div class="fs18 fw600 lh28 mt-24px">En vous inscrivant, vous aurez la possibilité d'intéragir avec les autres personnes inscrites.</div>
</div>
<div class="blurred ptb-80px plr-1em">
<h2 class="mt-40px fw400 lh40 fs36">Veuillez vous connecter pour accéder à ce groupe de travail.</h2>
<div class="fs18 fw600 lh28 mt-24px">En vous inscrivant, vous aurez la possibilité de consulter les fichiers mis en ligne par le groupe de travail.</div>
</div>
</section>
{% else %}
{% include "articles-blocks/gt-content.html.twig" %}
{% include "articles-blocks/gt-fichiers.html.twig" %}
<div class="dflex fdc aic jcc w100 h100 participant-popin" id="participant-popin">
<div class="participant-container w100 h100 dflex jcc aic fdc">
<div class="participant-list" id="participant-list">
<button class="gt-participants-popin-close" id="gt-participants-popin-close">
<img src="/resources/img/exit-icon.svg" alt="Cliquez ici pour fermer la popin" width="15" height="15">
</button>
{% for participant in content.participants %}
<a href="/user/{{participant.id}}" class="cblue nodeco">
<div class="participant dflex aic">
<div class="img-cont">
{% if participant.avatar.id is defined and participant.avatar.id is not null %}
{% set avatar = sulu_resolve_media(participant.avatar.id, 'fr') %}
<img src="{{ avatar.formats['sulu-260x.webp'] }}" class="referent-avatar" width="40px" height="40px">
{% endif %}
</div>
<div>
{{ participant.fullName }}
</div>
</div>
</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% endif %}
</article>
</section>
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('gt_js') }}
{% if app.user %}
{{ encore_entry_script_tags('onboard_tour') }}
{% endif %}
{% for i, jalon in content.jalons %}
{% include "articles/javascripts/base-article-js.html.twig" with {content : jalon} %}
{% endfor %}
{{ parent() }}
{% endblock %}