{% extends 'base.html.twig' %}{% set currentRoute = app.request.attributes.get('_route') %}{% set has_front_access = is_granted('FRONT_ACCESS', {'training': sub,}) %}{% block stylesheets %}{{ parent() }}{{ encore_entry_link_tags('styles', 'core', 'core') }}{% endblock %}{% block before_navbar %}{% if currentRoute == 'manager_channel_training_show' %}<div style="background-color: #E9F8F8;" class="p-2 justify-content-center align-items-center d-flex flex-column flex-md-row text-center">{% set headerReturnLink = null %}{% if currentRoute == 'manager_channel_training_show' %}{% set headerReturnLink = path('manager_channel_trainings', {'channelId': channel.id}) %}{% endif %}<div style="font-weight: bold; color: #212B7A" class="mx-1">Vous êtes en mode visualisation de l'interface pour les administrateurs.</div><div style="font-weight: bold"><a href="{{- headerReturnLink -}}" style="text-decoration: underline">Revenir à la page d'administration</a></div></div>{% endif %}{% endblock before_navbar %}{% block title %}{{ sub.name }} - {{ parent() }}{% endblock %}{% block content %}{% set advice_avg = sub|advice_avg_by_training %}{% if app.user %}<twig:ChannelUserData:CursusLockout:cursus="cursus ?? null"></twig:ChannelUserData:CursusLockout>{% endif %}<div class="jumbotron-v2 mb-4"><div class="container"><h2 class="v2-title-big">{{- 'front.scholar.training.show.title.label'|trans({'%name%': sub.name,}) -}}</h2><div class="md-none"><div class="info-content mt-4 {% if advice_avg is same as null %} info-without-advice {% endif %}"><div><i class="fas fa-users"></i><p>{{ sub|countCursusForTraining }}</p></div>{% if advice_avg is not same as null %}<div><i class="fas fa-star"></i><p>{{ advice_avg }} ({{ sub|get_count_advice_training }})</p></div>{% endif %}<div class="dot-div"></div><div>{% if sub.updatedAt is not null %}{{- 'front.scholar.training.show.createdAt.label'|trans({'%date%': sub.updatedAt|format_datetime('long', locale=app.request.locale),})|raw -}}{% else %}{{- 'front.scholar.training.show.createdAt.label'|trans({'%date%': sub.createdAt|format_datetime('long', locale=app.request.locale),})|raw -}}{% endif %}</div></div></div><div class="md-set"><div class="info-content mt-4"><div><div><i class="fas fa-users"></i><p>{{ sub|countCursusForTraining }}</p></div>{% if advice_avg is not same as null %}<div class="info-content-stars"><i class="fas fa-star"></i><p>{{ advice_avg }} ({{ sub|get_count_advice_training }})</p></div>{% endif %}</div><div class="mt-2"><div class="dot-div"><i class="fas fa-circle"></i></div><div>{% if sub.updatedAt is not null %}{{- 'front.scholar.training.show.createdAt.label'|trans({'%date%': sub.updatedAt|format_datetime('long', locale=app.request.locale),})|raw -}}{% else %}{{- 'front.scholar.training.show.createdAt.label'|trans({'%date%': sub.createdAt|format_datetime('long', locale=app.request.locale),})|raw -}}{% endif %}</div></div></div></div><div class="description mt-4"><p>{{ sub.description }}</p></div></div></div>{{ parent() }}{% endblock content %}{% block inner_content %}<div class="row"><div class="col-lg-9 col-md-8 mb-3"><h2 class="v2-title-small mt-5">{{ 'front.scholar.training.show.sub_title.programm.label'|trans }}</h2><div id="accordion" class="accordion-nellapp mt-5">{% for module in firstModules %}{% include 'Front/Scholar/Training/Partial/accordion-item.html.twig' with {'module' : module, 'loop': loop, 'training' : sub} %}{% endfor %}{% if lastModules|length %}<div class="more-module" style="display: none">{% for module in lastModules %}{% include 'Front/Scholar/Training/Partial/accordion-item.html.twig' with {'module' : module, 'loop': loop, 'training': sub} %}{% endfor %}</div><div class="w100-flex-center-x mt-3 div-btn-see-more"><button class="btn-see-more-v2"data-btn-more-module="true">{{ 'front.scholar.training.list.button.see_more.label'|trans }}5/{{ 5 + lastModules|length }}</button></div><div class="w100-flex-center-x mt-3 div-btn-see-less" style="display: none"><button class="btn-see-more-v2"data-btn-less-module="true">{{ 'front.scholar.training.list.button.see_less.label'|trans }}</button></div>{% endif %}</div></div><div class="col-lg-3 col-md-4 order-first order-md-last"><div class="card-elevation-training"><div class="card-img-top"><img class="img-top-card img-responsive" src="{{ sub|get_training_img_url }}" alt="{{ sub.name }}"></div><div class="card-body"><div class="channel-name d-flex"><div><div class="img-logo-rounded">{% include 'Front/Channel/Image/_image_main_avatar.html.twig' with {'channel': sub.ownerChannel} %}</div></div><div class="channel-description"><a href="{{ path('front_channel_show', {'channelId' : sub.ownerChannel.id }) }}"class="font-weight-bold">{{ sub.ownerChannel.name }}</a>{% if sub.ownerChannel.slogan is not empty %}<p class="small">{{ sub.ownerChannel.slogan }}</p>{% endif %}</div></div><div class="training-stats mt-4">{% if sub.trainingType is not null %}<div class="row mt-3"><div class="col-12 content-stat"><div><i class="fas fa-book-open"></i></div><p>{{ sub | get_training_type_key | trans }}</p></div></div>{% endif %}{% if sub.totalHourDescription is not null %}<div class="row mt-3"><div class="col-12 content-stat"><div><i class="fas fa-stopwatch"></i></div><p>{{ sub.totalHourDescription }} {{ 'front.scholar.training.show.card.total_hour.label'|trans }}</p></div></div>{% endif %}{% if sub.videoDescription is not null %}<div class="row mt-3"><div class="col-12 content-stat"><div><i class="fas fa-file-video"></i></div><p>{{ sub.videoDescription }} {{ 'front.scholar.training.show.card.video_time.label'|trans }}</p></div></div>{% endif %}{% set count_exercises = sub|count_exercises_by_training %}{% if count_exercises != 0 %}<div class="row mt-3"><div class="col-12 content-stat"><div><i class="far fa-list-alt"></i></div><p>{{ count_exercises }} {{ 'front.scholar.training.show.card.use_case.label'|trans }}</p></div></div>{% endif %}{% if sub.diplomaDescription is not null %}<div class="row mt-3"><div class="col-12 content-stat"><div><i class="fas fa-graduation-cap"></i></div><p>{{ sub.diplomaDescription }}</p></div></div>{% endif %}</div>{% if sub.trainingProduct is not null and not has_front_access %}<div class="mt-4 w100-flex-center-x">{% set value = sub.trainingProduct.price * 1 %}<p class="price-card-training">{{ 'front.scholar.training.show.card.price.label'|trans({'%price%' : value}) }}*</p></div><div class="mt-2 w100-flex-center-x"><p class="price-note-card-training">{{ 'front.scholar.training.show.card.price.note'|trans({'%funding_contact_path%' : path('front_channel_training_payment_funding_contact', {'training_id': sub.id})}) | raw }}</p></div>{% endif %}{% if not sub.public and currentRoute == 'front_channel_training_show' %}<div class="text-center mt-4 div-btn-card-show-training d-flex flex-column">{% if has_front_access %}<div class="w100-flex-center-x"><div class="progress-circle"><div class="c100 p{{ trainingProgression.progression }} blue light-green-fill medium"><div class="slice"><div class="bar"></div><div class="fill"></div></div></div></div></div><div class="mb-2 training-progress-percent">{{ trainingProgression.progression }} %</div>{% if nellapp_url_exist('core', 'app_account_show_cursus') and cursus is defined and cursus is not null %}<a href="{{ nellapp_url('core', 'app_account_show_cursus', {'cursusId': cursus.id}) }}"class="see-training-progress-link">{{ 'front.scholar.training.show.card.progression.link.label' | trans }}</a>{% endif %}{% set lastChapterAchieved = getLastAchievedChapter(sub) %}{% if lastChapterAchieved is not null %}<a href="{{ path('front_channel_chapter_show', {'trainingId': lastChapterAchieved['trainingId'],'moduleId': lastChapterAchieved['moduleId'],'lessonId': lastChapterAchieved['lessonId'],'chapterId': lastChapterAchieved['chapterId'],}) }}"class="btn-nellapp-v2 mt-3 d-inline-block">{{ 'front.scholar.training.show.card.continue_btn.label' | trans }}</a>{% endif %}{% else %}<a href="{{ path('front_channel_training_payment_funding_contact', {'training_id': sub.id}) }}"class="btn btn-nellapp-v2">{{ 'front.scholar.training.show.actions.follow.label'|trans }}</a>{% endif %}</div>{% endif %}</div></div>{% include 'Front/Scholar/Partial/_back_to_dashboard.html.twig' with {'wrapper_class': 'mt-3 d-flex justify-content-center','button_class': 'nellapp-outline-btn text-decoration-none',} %}</div></div>{% if training_descriptions|length > 0 %}<div class="row"><div class="col-12"><h2 class="v2-title-small mt-5 mb-2">{{ 'front.scholar.training.show.sub_title.plus.label'|trans }}</h2></div><div class="col-lg-9 col-md-8"><div class="row">{% for description in training_descriptions %}<div class="col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6 mt-4">{% include 'Front/Scholar/Card/training-description.html.twig' with {'description' : description} %}</div>{% endfor %}</div></div></div>{% endif %}<div class="row mt-3"><div class="col-12"><h2 class="v2-title-small mt-5 mb-2">{{ 'front.scholar.training.show.sub_title.channel.label'|trans }}</h2></div><div class="col-lg-9 col-md-8"><div class="row"><div class="col-12"><div class="mt-3">{% include 'Front/Scholar/Card/channel.html.twig' with {'channel' : sub.ownerChannel} %}</div></div></div></div></div>{% if teacher_entities|length > 0 %}<div class="row mt-3"><div class="col-12"><h2 class="v2-title-small mt-5 mb-2">{{ 'front.scholar.training.show.sub_title.teacher.label'|trans }}({{ teacher_entities|length }})</h2></div></div>{% for teacher in teacher_entities %}<div class="col-lg-9 col-md-8"><div class="row"><div class="col-12"><div class="mt-3">{% include 'Front/Scholar/Card/teacher.html.twig' with {'teacher' : teacher} %}</div></div></div></div>{% endfor %}{% endif %}{% if training_advices is defined and training_advices|length > 0 %}<div class="row mt-3 mb-5"><div class="col-lg-9 col-md-8"><div class="row"><div class="col-12"><div class="div-title-between mt-5 mb-2"><h2 class="v2-title-small">{{ 'front.scholar.training.show.sub_title.advice.label'|trans }}({{ training_advices|length }})</h2><p class=""><i class="far fa-star"></i> {{ advice_avg }}</p></div></div><div class="col-12"><div class="mt-3">{% set adviceCount = 1 %}{% set break = false %}{% for advice in training_advices %}{% if not break %}{% include 'Front/Scholar/Card/advice.html.twig' with {'advice' : advice} %}{% set adviceCount = adviceCount + 1 %}{% if adviceCount == 6 %}{% set break = true %}{% endif %}{% endif %}{% endfor %}{% set adviceCount = 1 %}{% if training_advices|length > 5 %}<div class="div-more-advice">{% for advice in training_advices %}{% set adviceCount = adviceCount + 1 %}{% if adviceCount > 6 %}{% include 'Front/Scholar/Card/advice.html.twig' with {'advice' : advice} %}{% endif %}{% endfor %}</div>{% endif %}</div></div></div></div></div>{% endif %}{% if form is defined and app.user %}<div class="row"><div class="col-lg-9 col-md-8"><p class="small-description">{{ 'front.scholar.training.show.sub_title.advice.sentence.enter_key.label'|trans }}</p></div></div><div class="row" {% if advice_user is defined and advice_user is not null %} {% if advice_user.note is not null %}data-advice-current-note="{{ advice_user.note }}"{% endif %}{% endif %}><div class="col-lg-9 col-md-8 mt-1"><div class="form-advice-content"><div class="avatar-rounded">{{ app.user|user_avatar }}</div><div class="form-advice-bg-gray">{{ form_start(form) }}<div style="display: none">{{ form_widget(form.note) }}</div>{{ form_widget(form.comment) }}{{ form_errors(form.comment) }}{{ form_end(form) }}<div class="stars-rating"><i class="far fa-star" data-rating="1"></i><i class="far fa-star" data-rating="2"></i><i class="far fa-star" data-rating="3"></i><i class="far fa-star" data-rating="4"></i><i class="far fa-star" data-rating="5"></i></div><div class="center-y ml-2"><span id="span-nb-note-advice">0</span></div></div></div></div></div>{% if advice_user is not null %}{% if advice_user.id is not null %}<div class="row"><div class="col-lg-9 col-md-8 mt-1"><div class="w100-flex-end-x"><a class="delete-btn-advice"href="{{ path('front_training_advice_delete', {'id' : advice_user.id}) }}">{{ 'front.scholar.training.show.sub_title.advice.action.delete.label'|trans }}</a></div></div></div>{% endif %}{% endif %}{% endif %}{% if training_advices is defined and training_advices|length > 5 %}<div class="row"><div class="col-lg-9 col-md-8 mt-5"><div class="w100-flex-center-x"><button class="see-more-btn"id="training-advice-see-more">{{ 'front.scholar.training.advice.see_more.label'|trans({'%count%': training_advices|length}) }}</button></div></div></div>{% endif %}<div class="empty-div-bottom"></div>{% endblock inner_content %}{% block body %}{{ parent() }}{% if is_granted('CHANNEL_USER_PERM_TRAINING_SHOW', sub) %}<div class="modal fade" id="delete-modal" tabindex="-1" role="dialog"aria-labelledby="delete-modal-label" aria-hidden="true"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="delete-modal-label">{{ 'front.scholar.training.show.actions.delete.modal.title.label'|trans({'%name%': sub.name,})|raw }}</h5></div><div class="modal-body">{{ 'front.scholar.training.show.actions.delete.modal.body.label'|trans({'%name%': sub.name,})|raw }}</div><div class="modal-footer"><button type="button" class="btn btn-link" data-dismiss="modal">{{ 'front.scholar.training.show.actions.delete.modal.cancel.label'|trans }}</button><a href="{{ path('front_channel_training_delete', {'id': sub.id, 'channelId': channel.id}) }}"class="btn btn-danger btn-raised">{{ 'front.scholar.training.show.actions.delete.modal.delete.label'|trans }}</a></div></div></div></div>{% endif %}{% endblock body %}