<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Front/Scholar/Chapter/show.html.twig */
class __TwigTemplate_072ecbd63cf36668dd27605608708ff5129d88a4d52bd24f91347f57a608fe4c extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'before_navbar' => [$this, 'block_before_navbar'],
'body_markup' => [$this, 'block_body_markup'],
'content' => [$this, 'block_content'],
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
// line 2
if ( !array_key_exists("canSeeMessages", $context)) {
// line 3
$context["canSeeMessages"] = true;
}
// line 8
$context["currentRoute"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 8, $this->source); })()), "request", [], "any", false, false, false, 8), "attributes", [], "any", false, false, false, 8), "get", [0 => "_route"], "method", false, false, false, 8);
// line 9
$context["enableChatBot"] = ($this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->isChatBotEnabled((isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 9, $this->source); })())) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 9, $this->source); })()) == "front_channel_chapter_show"));
// line 1
$this->parent = $this->loadTemplate("base.html.twig", "Front/Scholar/Chapter/show.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 6
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 6, $this->source); })()), "lesson", [], "any", false, false, false, 6), "name", [], "any", false, false, false, 6), "html", null, true);
echo " - ";
$this->displayParentBlock("title", $context, $blocks);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 11
public function block_before_navbar($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "before_navbar"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "before_navbar"));
// line 12
echo " ";
$this->loadTemplate("Front/Scholar/Partial/_preview_manager_heager.html.twig", "Front/Scholar/Chapter/show.html.twig", 12)->display(twig_array_merge($context, ["channel" => // line 13
(isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 13, $this->source); })()), "currentRoute" => // line 14
(isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 14, $this->source); })())]));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 18
public function block_body_markup($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body_markup"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body_markup"));
// line 19
echo "<body class=\"progression chapter-view ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) {
echo "logged-in";
}
echo "\"
style=\"font-family: 'Poppins';\"
id=\"page-training-lesson\"
";
// line 22
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 22, $this->source); })()) == "front_channel_chapter_show")) {
// line 23
echo " data-training_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 23, $this->source); })()), "id", [], "any", false, false, false, 23), "html", null, true);
echo "
data-module_id=";
// line 24
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 24, $this->source); })()), "id", [], "any", false, false, false, 24), "html", null, true);
echo "
data-lesson_id=";
// line 25
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 25, $this->source); })()), "id", [], "any", false, false, false, 25), "html", null, true);
echo "
data-chapter_id=\"";
// line 26
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 26, $this->source); })()), "id", [], "any", false, false, false, 26), "html", null, true);
echo "\"
";
}
// line 28
echo ">
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 31
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 32
echo " ";
if (twig_in_filter((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 32, $this->source); })()), [0 => "front_channel_chapter_show", 1 => "manager_channel_module_chapter_show", 2 => "manager_channel_training_module_chapter_show"])) {
// line 33
echo " ";
$context["trainingModuleLessons"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarModuleRuntime')->getLessons((isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 33, $this->source); })()));
// line 34
echo " ";
} elseif (twig_in_filter((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 34, $this->source); })()), [0 => "manager_channel_chapter_show_message", 1 => "manager_channel_chapter_show"])) {
// line 35
echo " ";
$context["trainingModuleLessons"] = [0 => (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 35, $this->source); })())];
// line 36
echo " ";
}
// line 37
echo "
";
// line 38
$this->loadTemplate("Front/Scholar/Partial/_menu_lessons_mobile.html.twig", "Front/Scholar/Chapter/show.html.twig", 38)->display(twig_array_merge($context, ["current_chapter" => // line 39
(isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 39, $this->source); })())]));
// line 41
echo "
<div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
<div class=\"row\">
<div class=\"col-md-9 col-12\">
<div>
";
// line 46
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 46, $this->source); })()), "flashes", [], "method", false, false, false, 46));
foreach ($context['_seq'] as $context["key"] => $context["messageType"]) {
// line 47
echo " <div>
";
// line 48
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["messageType"]);
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 49
echo " <div class=\"alert alert-";
echo twig_escape_filter($this->env, twig_replace_filter($context["key"], ["error" => "danger"]), "html", null, true);
echo "\">
";
// line 50
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["message"]), "html", null, true);
echo "
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 53
echo " </div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['messageType'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 55
echo " </div>
<h2 class=\"font-weight-bold font-size-16px\">";
// line 57
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.title.label", ["%name%" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 57, $this->source); })()), "lesson", [], "any", false, false, false, 57), "name", [], "any", false, false, false, 57)]), "html", null, true);
echo "</h2>
<h1 class=\"v2-title-big\">";
// line 58
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 58, $this->source); })()), "name", [], "any", false, false, false, 58), "html", null, true);
echo "</h1>
";
// line 60
$this->loadTemplate("Front/Scholar/Partial/_content_alert.html.twig", "Front/Scholar/Chapter/show.html.twig", 60)->display($context);
// line 61
echo "
<div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> ";
// line 63
echo " <div class=\"d-flex align-items-center\"> ";
// line 64
echo " <img class=\"star-space chapter-comment-logo\"
src=\"";
// line 65
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/common/icon-chat.svg", "common"), "html", null, true);
echo "\" alt=\"Count comments\"/>
<div class=\"marks d-flex justify-content-center align-items-center\">";
// line 66
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageCount((isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 66, $this->source); })())), "html", null, true);
echo "</div>
</div>
<div class=\"d-flex justify-content-center align-items-center\">";
// line 70
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 70, $this->source); })()), "updatedAt", [], "any", false, false, false, 70))) {
// line 71
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, // line 72
(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 72, $this->source); })()), "updatedAt", [], "any", false, false, false, 72), "long", "", null, "gregorian", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 72, $this->source); })()), "request", [], "any", false, false, false, 72), "locale", [], "any", false, false, false, 72))]);
} else {
// line 75
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, // line 76
(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 76, $this->source); })()), "createdAt", [], "any", false, false, false, 76), "long", "", null, "gregorian", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 76, $this->source); })()), "request", [], "any", false, false, false, 76), "locale", [], "any", false, false, false, 76))]);
}
// line 79
echo "</div>
</div>
";
// line 83
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 83, $this->source); })()), "description", [], "any", false, false, false, 83))) {
// line 84
echo " <div class=\"description-lesson mt-4\">
<p class=\"text-subcateg description-style\">";
// line 85
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 85, $this->source); })()), "description", [], "any", false, false, false, 85), "html", null, true);
echo "</p>
</div>
";
}
// line 88
echo "
<div class=\"mt-4 lesson-content\">";
// line 89
echo twig_get_attribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 89, $this->source); })()), "body", [], "any", false, false, false, 89);
echo "</div>
";
// line 91
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 91, $this->source); })()) == "front_channel_chapter_show")) {
// line 92
echo " ";
$this->loadTemplate("Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig", "Front/Scholar/Chapter/show.html.twig", 92)->display(twig_array_merge($context, ["next_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getNextInformationsChapter( // line 93
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 93, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 93, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 93, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 93, $this->source); })())), "previous_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getPreviousInformationsChapter( // line 94
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 94, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 94, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 94, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 94, $this->source); })()))]));
// line 96
echo " ";
}
// line 97
echo "
";
// line 98
if (((isset($context["canSeeMessages"]) || array_key_exists("canSeeMessages", $context) ? $context["canSeeMessages"] : (function () { throw new RuntimeError('Variable "canSeeMessages" does not exist.', 98, $this->source); })()) === true)) {
// line 99
echo " <div class=\"mt-5 chapter-questions-separator\"></div>
<div class=\"mt-5\" id=\"forum-messages\">
<div class=\"font-weight-bold font-size-16px mb-4\">";
// line 102
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.title.label", ["%count%" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageCount((isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 102, $this->source); })()))]), "html", null, true);
echo "</div>
";
// line 104
if ((twig_length_filter($this->env, (isset($context["messages"]) || array_key_exists("messages", $context) ? $context["messages"] : (function () { throw new RuntimeError('Variable "messages" does not exist.', 104, $this->source); })())) == 0)) {
// line 105
echo " <div>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.no_message.label"), "html", null, true);
echo "</div>
";
}
// line 107
echo "
";
// line 108
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["messages"]) || array_key_exists("messages", $context) ? $context["messages"] : (function () { throw new RuntimeError('Variable "messages" does not exist.', 108, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 109
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 109) != 0)) {
// line 110
echo " <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
";
}
// line 112
echo "
";
// line 113
$context["messageToAnswer"] = null;
// line 114
echo " ";
$context["children"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageChildren($context["message"]);
// line 115
echo " ";
if ((twig_length_filter($this->env, (isset($context["children"]) || array_key_exists("children", $context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.', 115, $this->source); })())) === 0)) {
// line 116
echo " ";
$context["messageToAnswer"] = $context["message"];
// line 117
echo " ";
}
// line 118
echo "
";
// line 119
$this->loadTemplate("Front/Scholar/Chapter/show_forum_message.html.twig", "Front/Scholar/Chapter/show.html.twig", 119)->display(twig_array_merge($context, ["message" => // line 120
$context["message"], "canDelete" => ( // line 121
(isset($context["is_granted_comment"]) || array_key_exists("is_granted_comment", $context) ? $context["is_granted_comment"] : (function () { throw new RuntimeError('Variable "is_granted_comment" does not exist.', 121, $this->source); })()) || ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 121, $this->source); })()), "user", [], "any", false, false, false, 121)) && $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Permission\Twig\Runtime\Info\UserOwnerRuntime')->isOwner(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 121, $this->source); })()), "user", [], "any", false, false, false, 121), $context["message"]))), "messageToAnswer" => // line 122
(isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 122, $this->source); })())]));
// line 124
echo "
";
// line 125
$context["messageToAnswer"] = null;
// line 126
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["children"]) || array_key_exists("children", $context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.', 126, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
// line 127
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 127) === true)) {
// line 128
echo " ";
$context["messageToAnswer"] = $context["message"];
// line 129
echo " ";
}
// line 130
echo " ";
$this->loadTemplate("Front/Scholar/Chapter/show_forum_message.html.twig", "Front/Scholar/Chapter/show.html.twig", 130)->display(twig_array_merge($context, ["message" => // line 131
$context["child"], "canDelete" => ( // line 132
(isset($context["is_granted_comment"]) || array_key_exists("is_granted_comment", $context) ? $context["is_granted_comment"] : (function () { throw new RuntimeError('Variable "is_granted_comment" does not exist.', 132, $this->source); })()) || ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 132, $this->source); })()), "user", [], "any", false, false, false, 132)) && $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Permission\Twig\Runtime\Info\UserOwnerRuntime')->isOwner(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 132, $this->source); })()), "user", [], "any", false, false, false, 132), $context["child"]))), "messageToAnswer" => // line 133
(isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 133, $this->source); })())]));
// line 135
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 136
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 137
echo "
";
// line 138
if (array_key_exists("form", $context)) {
// line 139
echo " <div id=\"form-message-anchor\" class=\"row";
if ( !twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 139, $this->source); })()), "user", [], "any", false, false, false, 139)) {
echo " justify-content-center align-items-center";
}
echo " mt-5\">
";
// line 140
if (twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 140, $this->source); })()), "user", [], "any", false, false, false, 140)) {
// line 141
echo " <div class=\"col-1 d-none d-md-block\">
";
// line 142
if ((null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 142, $this->source); })()), "user", [], "any", false, false, false, 142), "avatarPath", [], "any", false, false, false, 142))) {
// line 143
echo " <span class=\"user-account\">
<i class=\"fas fa-user\"></i>
</span>
";
} else {
// line 147
echo " <img class=\"user-account\" src=\"";
echo twig_escape_filter($this->env, $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Twig\Runtime\ImageRunTime')->getUserAvatarThumbnail(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 147, $this->source); })()), "user", [], "any", false, false, false, 147)), "html", null, true);
echo "\"
alt=\"User avatar\">
";
}
// line 150
echo " </div>
<div class=\"col-md-11 col-12 pr-0 pl-0\">
";
// line 153
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 153, $this->source); })()) === false)) {
// line 154
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 154, $this->source); })()), 'form_start', ["attr" => ["class" => "m-0 d-flex flex-column flex-md-row"]]);
echo "
<div class=\"col-md-10 col-12\">
<div>";
// line 156
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 156, $this->source); })()), "content", [], "any", false, false, false, 156), 'row');
echo "</div>
<div>";
// line 157
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 157, $this->source); })()), 'errors');
echo "</div>
</div>
<div class=\"col-md-2 col-12 mt-send-mobile\">
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"submit\"
>
<span>";
// line 166
echo "Envoyer";
echo "</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
</div>
";
// line 170
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 170, $this->source); })()), 'form_end');
echo "
";
} else {
// line 172
echo " <button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"button\"
data-toggle=\"modal\"
data-target=\"#chat-bot-modal\"
id=\"chat-bot-modal-label\"
>
<span>Posez votre question</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
";
}
// line 185
echo " </div>
";
} else {
// line 187
echo " <div class=\"col-1\">
<span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
<i class=\"fas fa-user\"></i>
</span>
</div>
<div class=\"col-9\">";
// line 193
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.please_connect.label"), "html", null, true);
// line 194
echo "</div>
<div class=\"col-2\">
<a href=\"";
// line 196
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("nellapp_sdk_connect_nellapp");
echo "\" class=\"btn-nellapp-v2\">";
// line 197
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.login.label"), "html", null, true);
// line 198
echo "</a>
</div>
";
}
// line 201
echo " </div>
";
}
// line 203
echo " </div>
";
}
// line 205
echo " </div>
<div class=\"col-3 p-0 d-none d-md-block\">
";
// line 208
$this->loadTemplate("Front/Scholar/Partial/menu_lessons.html.twig", "Front/Scholar/Chapter/show.html.twig", 208)->display(twig_array_merge($context, ["current_chapter" => // line 209
(isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 209, $this->source); })())]));
// line 211
echo " </div>
</div>
</div>
";
// line 215
$this->displayParentBlock("content", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 218
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 219
echo " ";
$this->displayParentBlock("body", $context, $blocks);
echo "
";
// line 221
if (twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 221, $this->source); })()), "user", [], "any", false, false, false, 221)) {
// line 222
echo " <!-- Modal -->
<div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
style=\"font-family: 'Poppins'\">
<div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
<div class=\"modal-content border-8\">
<div class=\"modal-header\">
<h5 class=\"modal-title title-main-modal-message question-title\"
style=\"font-size: 0.875rem;font-weight: bold;\">
";
// line 230
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.title.label"), "html", null, true);
echo "
</h5>
<h5 class=\"modal-title title-main-modal-message response-title\"
style=\"display:none; font-size: 0.875rem; font-weight: bold\">
";
// line 234
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.title_response.label"), "html", null, true);
echo "
<span class=\"span-response-title\"></span>
</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
<div id=\"modal-response-message\"></div>
";
// line 244
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formAnswer"]) || array_key_exists("formAnswer", $context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.', 244, $this->source); })()), 'form_start');
echo "
";
// line 245
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["formAnswer"]) || array_key_exists("formAnswer", $context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.', 245, $this->source); })()), "content", [], "any", false, false, false, 245), 'row');
echo "
</div>
<div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
<button type=\"button\" class=\"btn-close-modale\"
data-dismiss=\"modal\">";
// line 250
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.close.label"), "html", null, true);
echo "</button>
<button type=\"submit\"
class=\"btn-valid-modale\">";
// line 252
echo twig_escape_filter($this->env, ((array_key_exists("button_label", $context)) ? (_twig_default_filter((isset($context["button_label"]) || array_key_exists("button_label", $context) ? $context["button_label"] : (function () { throw new RuntimeError('Variable "button_label" does not exist.', 252, $this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("message.entity.save.label"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("message.entity.save.label"))), "html", null, true);
echo "</button>
</div>
";
// line 255
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formAnswer"]) || array_key_exists("formAnswer", $context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.', 255, $this->source); })()), 'form_end');
echo "
</div>
</div>
</div>
";
// line 260
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 260, $this->source); })()) === true)) {
// line 261
echo " ";
$this->loadTemplate("Front/Scholar/Chapter/_chat_bot_modal.html.twig", "Front/Scholar/Chapter/show.html.twig", 261)->display($context);
// line 262
echo " ";
}
// line 263
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 266
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 267
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 267, $this->source); })()), "user", [], "any", false, false, false, 267) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 267, $this->source); })()) == "front_channel_chapter_show"))) {
// line 268
echo " <script>
var attendanceUrl = '";
// line 269
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("async_channel_scholar_attendance_chapter", ["channelId" => twig_get_attribute($this->env, $this->source, // line 270
(isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 270, $this->source); })()), "id", [], "any", false, false, false, 270)]), "html", null, true);
// line 271
echo "';
</script>
";
}
// line 274
echo "
";
// line 275
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Front/Scholar/Chapter/show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 730 => 275, 727 => 274, 722 => 271, 720 => 270, 719 => 269, 716 => 268, 713 => 267, 703 => 266, 692 => 263, 689 => 262, 686 => 261, 684 => 260, 676 => 255, 670 => 252, 665 => 250, 657 => 245, 653 => 244, 640 => 234, 633 => 230, 623 => 222, 621 => 221, 615 => 219, 605 => 218, 593 => 215, 587 => 211, 585 => 209, 584 => 208, 579 => 205, 575 => 203, 571 => 201, 566 => 198, 564 => 197, 561 => 196, 557 => 194, 555 => 193, 548 => 187, 544 => 185, 529 => 172, 524 => 170, 517 => 166, 505 => 157, 501 => 156, 495 => 154, 493 => 153, 488 => 150, 481 => 147, 475 => 143, 473 => 142, 470 => 141, 468 => 140, 461 => 139, 459 => 138, 456 => 137, 442 => 136, 428 => 135, 426 => 133, 425 => 132, 424 => 131, 422 => 130, 419 => 129, 416 => 128, 413 => 127, 395 => 126, 393 => 125, 390 => 124, 388 => 122, 387 => 121, 386 => 120, 385 => 119, 382 => 118, 379 => 117, 376 => 116, 373 => 115, 370 => 114, 368 => 113, 365 => 112, 361 => 110, 358 => 109, 341 => 108, 338 => 107, 332 => 105, 330 => 104, 325 => 102, 320 => 99, 318 => 98, 315 => 97, 312 => 96, 310 => 94, 309 => 93, 307 => 92, 305 => 91, 300 => 89, 297 => 88, 291 => 85, 288 => 84, 286 => 83, 280 => 79, 277 => 76, 276 => 75, 273 => 72, 272 => 71, 270 => 70, 264 => 66, 260 => 65, 257 => 64, 255 => 63, 252 => 61, 250 => 60, 245 => 58, 241 => 57, 237 => 55, 230 => 53, 221 => 50, 216 => 49, 212 => 48, 209 => 47, 205 => 46, 198 => 41, 196 => 39, 195 => 38, 192 => 37, 189 => 36, 186 => 35, 183 => 34, 180 => 33, 177 => 32, 167 => 31, 156 => 28, 151 => 26, 147 => 25, 143 => 24, 138 => 23, 136 => 22, 127 => 19, 117 => 18, 107 => 14, 106 => 13, 104 => 12, 94 => 11, 73 => 6, 62 => 1, 60 => 9, 58 => 8, 55 => 3, 53 => 2, 40 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% if canSeeMessages is not defined %}
{% set canSeeMessages = true %}
{% endif %}
{% block title %}{{ chapter.lesson.name }} - {{ parent() }}{% endblock %}
{% set currentRoute = app.request.attributes.get('_route') %}
{% set enableChatBot = chapter is chat_bot_enabled and currentRoute == 'front_channel_chapter_show' %}
{% block before_navbar %}
{% include 'Front/Scholar/Partial/_preview_manager_heager.html.twig' with {
'channel': channel,
'currentRoute': currentRoute,
} %}
{% endblock before_navbar %}
{% block body_markup %}
<body class=\"progression chapter-view {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}logged-in{% endif %}\"
style=\"font-family: 'Poppins';\"
id=\"page-training-lesson\"
{% if currentRoute == 'front_channel_chapter_show' %}
data-training_id={{ training.id }}
data-module_id={{ module.id }}
data-lesson_id={{ lesson.id }}
data-chapter_id=\"{{ chapter.id }}\"
{% endif %}
>
{% endblock body_markup %}
{% block content %}
{% if currentRoute in ['front_channel_chapter_show', 'manager_channel_module_chapter_show', 'manager_channel_training_module_chapter_show'] %}
{% set trainingModuleLessons = module | get_lessons %}
{% elseif currentRoute in ['manager_channel_chapter_show_message', 'manager_channel_chapter_show'] %}
{% set trainingModuleLessons = [lesson] %}
{% endif %}
{% include 'Front/Scholar/Partial/_menu_lessons_mobile.html.twig' with {
'current_chapter': chapter
} %}
<div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
<div class=\"row\">
<div class=\"col-md-9 col-12\">
<div>
{% for key, messageType in app.flashes() %}
<div>
{% for message in messageType %}
<div class=\"alert alert-{{ key|replace({'error': 'danger'}) }}\">
{{ message | trans }}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
<h2 class=\"font-weight-bold font-size-16px\">{{- 'front.scholar.lesson.show.title.label'|trans({'%name%': chapter.lesson.name}) -}}</h2>
<h1 class=\"v2-title-big\">{{- chapter.name -}}</h1>
{% include 'Front/Scholar/Partial/_content_alert.html.twig' %}
<div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> {# align-items-baseline #}
<div class=\"d-flex align-items-center\"> {# align-items-baseline #}
<img class=\"star-space chapter-comment-logo\"
src=\"{{- asset('build/common/icon-chat.svg', 'common') -}}\" alt=\"Count comments\"/>
<div class=\"marks d-flex justify-content-center align-items-center\">{{ chapter | getMessageCount }}</div>
</div>
<div class=\"d-flex justify-content-center align-items-center\">
{%- if lesson.updatedAt is not null -%}
{{- 'front.scholar.training.show.createdAt.label'|trans({
'%date%': lesson.updatedAt|format_date('long', locale=app.request.locale),
})|raw -}}
{%- else -%}
{{- 'front.scholar.training.show.createdAt.label'|trans({
'%date%': lesson.createdAt|format_date('long', locale=app.request.locale),
})|raw -}}
{%- endif -%}
</div>
</div>
{% if chapter.description is not null %}
<div class=\"description-lesson mt-4\">
<p class=\"text-subcateg description-style\">{{- chapter.description -}}</p>
</div>
{% endif %}
<div class=\"mt-4 lesson-content\">{{- chapter.body|raw -}}</div>
{% if currentRoute == 'front_channel_chapter_show' %}
{% include 'Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig' with {
next_informations: get_next_informations_chapter(training, module, lesson, chapter),
previous_informations: get_previous_informations_chapter(training, module, lesson, chapter),
} %}
{% endif %}
{% if canSeeMessages is same as true %}
<div class=\"mt-5 chapter-questions-separator\"></div>
<div class=\"mt-5\" id=\"forum-messages\">
<div class=\"font-weight-bold font-size-16px mb-4\">{{- 'front.scholar.lesson.show.message.title.label'|trans({'%count%': chapter|getMessageCount}) -}}</div>
{% if messages|length == 0 %}
<div>{{- 'front.scholar.lesson.show.message.no_message.label'|trans -}}</div>
{% endif %}
{% for message in messages %}
{% if loop.index0 != 0 %}
<div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
{% endif %}
{% set messageToAnswer = null %}
{% set children = message|getMessageChildren %}
{% if children|length is same as 0 %}
{% set messageToAnswer = message %}
{% endif %}
{% include 'Front/Scholar/Chapter/show_forum_message.html.twig' with {
'message': message,
'canDelete': is_granted_comment or app.user is not null and app.user is owner_of(message),
'messageToAnswer': messageToAnswer
} %}
{% set messageToAnswer = null %}
{% for child in children %}
{% if loop.last is same as true %}
{% set messageToAnswer = message %}
{% endif %}
{% include 'Front/Scholar/Chapter/show_forum_message.html.twig' with {
'message': child,
'canDelete': is_granted_comment or app.user is not null and app.user is owner_of(child),
'messageToAnswer': messageToAnswer
} %}
{% endfor %}
{% endfor %}
{% if form is defined %}
<div id=\"form-message-anchor\" class=\"row{% if not app.user %} justify-content-center align-items-center{% endif %} mt-5\">
{% if app.user %}
<div class=\"col-1 d-none d-md-block\">
{% if app.user.avatarPath is null %}
<span class=\"user-account\">
<i class=\"fas fa-user\"></i>
</span>
{% else %}
<img class=\"user-account\" src=\"{{ get_user_avatar_thumbnail(app.user) }}\"
alt=\"User avatar\">
{% endif %}
</div>
<div class=\"col-md-11 col-12 pr-0 pl-0\">
{% if enableChatBot is same as false %}
{{ form_start(form, {'attr': {'class': 'm-0 d-flex flex-column flex-md-row'}}) }}
<div class=\"col-md-10 col-12\">
<div>{{ form_row(form.content) }}</div>
<div>{{ form_errors(form) }}</div>
</div>
<div class=\"col-md-2 col-12 mt-send-mobile\">
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"submit\"
>
<span>{{ \"Envoyer\" }}</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
</div>
{{ form_end(form) }}
{% else %}
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"button\"
data-toggle=\"modal\"
data-target=\"#chat-bot-modal\"
id=\"chat-bot-modal-label\"
>
<span>Posez votre question</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
{% endif %}
</div>
{% else %}
<div class=\"col-1\">
<span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
<i class=\"fas fa-user\"></i>
</span>
</div>
<div class=\"col-9\">
{{- 'front.scholar.lesson.show.message.modal.please_connect.label'|trans -}}
</div>
<div class=\"col-2\">
<a href=\"{{ path('nellapp_sdk_connect_nellapp') }}\" class=\"btn-nellapp-v2\">
{{- 'front.scholar.lesson.show.message.modal.login.label'|trans -}}
</a>
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
<div class=\"col-3 p-0 d-none d-md-block\">
{% include 'Front/Scholar/Partial/menu_lessons.html.twig' with {
'current_chapter': chapter
} %}
</div>
</div>
</div>
{{ parent() }}
{% endblock content %}
{% block body %}
{{ parent() }}
{% if app.user %}
<!-- Modal -->
<div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
style=\"font-family: 'Poppins'\">
<div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
<div class=\"modal-content border-8\">
<div class=\"modal-header\">
<h5 class=\"modal-title title-main-modal-message question-title\"
style=\"font-size: 0.875rem;font-weight: bold;\">
{{ 'front.scholar.lesson.show.message.modal.title.label'|trans }}
</h5>
<h5 class=\"modal-title title-main-modal-message response-title\"
style=\"display:none; font-size: 0.875rem; font-weight: bold\">
{{ 'front.scholar.lesson.show.message.modal.title_response.label'|trans }}
<span class=\"span-response-title\"></span>
</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
<div id=\"modal-response-message\"></div>
{{ form_start(formAnswer) }}
{{ form_row(formAnswer.content) }}
</div>
<div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
<button type=\"button\" class=\"btn-close-modale\"
data-dismiss=\"modal\">{{ 'front.scholar.lesson.show.message.modal.close.label'|trans }}</button>
<button type=\"submit\"
class=\"btn-valid-modale\">{{ button_label|default('message.entity.save.label'|trans) }}</button>
</div>
{{ form_end(formAnswer) }}
</div>
</div>
</div>
{% if enableChatBot is same as true %}
{% include 'Front/Scholar/Chapter/_chat_bot_modal.html.twig' %}
{% endif %}
{% endif %}
{% endblock %}
{% block javascripts %}
{% if app.user and currentRoute == 'front_channel_chapter_show' %}
<script>
var attendanceUrl = '{{ url('async_channel_scholar_attendance_chapter', {
'channelId': channel.id
}) }}';
</script>
{% endif %}
{{ parent() }}
{% endblock %}
", "Front/Scholar/Chapter/show.html.twig", "/var/www/html/templates/Front/Scholar/Chapter/show.html.twig");
}
}