<?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_56a2ba25cc70cc000fd09239210f2109587b6160cd63c03dfb3ddb9307109cfd 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>
<div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> ";
// line 61
echo " <div class=\"d-flex align-items-center\"> ";
// line 62
echo " <img class=\"star-space chapter-comment-logo\"
src=\"";
// line 63
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 64
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.', 64, $this->source); })())), "html", null, true);
echo "</div>
</div>
<div class=\"d-flex justify-content-center align-items-center\">";
// line 68
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.', 68, $this->source); })()), "updatedAt", [], "any", false, false, false, 68))) {
// line 69
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 70
(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), "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.', 70, $this->source); })()), "request", [], "any", false, false, false, 70), "locale", [], "any", false, false, false, 70))]);
} else {
// line 73
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 74
(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 74, $this->source); })()), "createdAt", [], "any", false, false, false, 74), "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.', 74, $this->source); })()), "request", [], "any", false, false, false, 74), "locale", [], "any", false, false, false, 74))]);
}
// line 77
echo "</div>
</div>
";
// line 81
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.', 81, $this->source); })()), "description", [], "any", false, false, false, 81))) {
// line 82
echo " <div class=\"description-lesson mt-4\">
<p class=\"text-subcateg description-style\">";
// line 83
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.', 83, $this->source); })()), "description", [], "any", false, false, false, 83), "html", null, true);
echo "</p>
</div>
";
}
// line 86
echo "
<div class=\"mt-4 lesson-content\">";
// line 87
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.', 87, $this->source); })()), "body", [], "any", false, false, false, 87);
echo "</div>
";
// line 89
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 89, $this->source); })()) == "front_channel_chapter_show")) {
// line 90
echo " ";
$this->loadTemplate("Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig", "Front/Scholar/Chapter/show.html.twig", 90)->display(twig_array_merge($context, ["next_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getNextInformationsChapter( // line 91
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 91, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 91, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 91, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 91, $this->source); })())), "previous_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getPreviousInformationsChapter( // line 92
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 92, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 92, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 92, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 92, $this->source); })()))]));
// line 94
echo " ";
}
// line 95
echo "
";
// line 96
if (((isset($context["canSeeMessages"]) || array_key_exists("canSeeMessages", $context) ? $context["canSeeMessages"] : (function () { throw new RuntimeError('Variable "canSeeMessages" does not exist.', 96, $this->source); })()) === true)) {
// line 97
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 100
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.', 100, $this->source); })()))]), "html", null, true);
echo "</div>
";
// line 102
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.', 102, $this->source); })())) == 0)) {
// line 103
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 105
echo "
";
// line 106
$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.', 106, $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 107
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 107) != 0)) {
// line 108
echo " <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
";
}
// line 110
echo "
";
// line 111
$context["messageToAnswer"] = null;
// line 112
echo " ";
$context["children"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageChildren($context["message"]);
// line 113
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.', 113, $this->source); })())) === 0)) {
// line 114
echo " ";
$context["messageToAnswer"] = $context["message"];
// line 115
echo " ";
}
// line 116
echo "
";
// line 117
$this->loadTemplate("Front/Scholar/Chapter/show_forum_message.html.twig", "Front/Scholar/Chapter/show.html.twig", 117)->display(twig_array_merge($context, ["message" => // line 118
$context["message"], "canDelete" => ( // line 119
(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.', 119, $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.', 119, $this->source); })()), "user", [], "any", false, false, false, 119)) && $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.', 119, $this->source); })()), "user", [], "any", false, false, false, 119), $context["message"]))), "messageToAnswer" => // line 120
(isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 120, $this->source); })())]));
// line 122
echo "
";
// line 123
$context["messageToAnswer"] = null;
// line 124
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.', 124, $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 125
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 125) === true)) {
// line 126
echo " ";
$context["messageToAnswer"] = $context["message"];
// line 127
echo " ";
}
// line 128
echo " ";
$this->loadTemplate("Front/Scholar/Chapter/show_forum_message.html.twig", "Front/Scholar/Chapter/show.html.twig", 128)->display(twig_array_merge($context, ["message" => // line 129
$context["child"], "canDelete" => ( // line 130
(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.', 130, $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.', 130, $this->source); })()), "user", [], "any", false, false, false, 130)) && $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.', 130, $this->source); })()), "user", [], "any", false, false, false, 130), $context["child"]))), "messageToAnswer" => // line 131
(isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 131, $this->source); })())]));
// line 133
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 134
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 135
echo "
";
// line 136
if (array_key_exists("form", $context)) {
// line 137
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.', 137, $this->source); })()), "user", [], "any", false, false, false, 137)) {
echo " justify-content-center align-items-center";
}
echo " mt-5\">
";
// line 138
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.', 138, $this->source); })()), "user", [], "any", false, false, false, 138)) {
// line 139
echo " <div class=\"col-1 d-none d-md-block\">
";
// line 140
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.', 140, $this->source); })()), "user", [], "any", false, false, false, 140), "avatarPath", [], "any", false, false, false, 140))) {
// line 141
echo " <span class=\"user-account\">
<i class=\"fas fa-user\"></i>
</span>
";
} else {
// line 145
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.', 145, $this->source); })()), "user", [], "any", false, false, false, 145)), "html", null, true);
echo "\"
alt=\"User avatar\">
";
}
// line 148
echo " </div>
<div class=\"col-md-11 col-12 pr-0 pl-0\">
";
// line 151
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 151, $this->source); })()) === false)) {
// line 152
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.', 152, $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 154
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.', 154, $this->source); })()), "content", [], "any", false, false, false, 154), 'row');
echo "</div>
<div>";
// line 155
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.', 155, $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 164
echo "Envoyer";
echo "</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
</div>
";
// line 168
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.', 168, $this->source); })()), 'form_end');
echo "
";
} else {
// line 170
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 183
echo " </div>
";
} else {
// line 185
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 191
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 192
echo "</div>
<div class=\"col-2\">
<a href=\"";
// line 194
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("nellapp_sdk_connect_nellapp");
echo "\" class=\"btn-nellapp-v2\">";
// line 195
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 196
echo "</a>
</div>
";
}
// line 199
echo " </div>
";
}
// line 201
echo " </div>
";
}
// line 203
echo " </div>
<div class=\"col-3 p-0 d-none d-md-block\">
";
// line 206
$this->loadTemplate("Front/Scholar/Partial/menu_lessons.html.twig", "Front/Scholar/Chapter/show.html.twig", 206)->display(twig_array_merge($context, ["current_chapter" => // line 207
(isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 207, $this->source); })())]));
// line 209
echo " </div>
</div>
</div>
";
// line 213
$this->displayParentBlock("content", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 216
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 217
echo " ";
$this->displayParentBlock("body", $context, $blocks);
echo "
";
// line 219
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.', 219, $this->source); })()), "user", [], "any", false, false, false, 219)) {
// line 220
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 228
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 232
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 242
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.', 242, $this->source); })()), 'form_start');
echo "
";
// line 243
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.', 243, $this->source); })()), "content", [], "any", false, false, false, 243), 'row');
echo "
</div>
<div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
<button type=\"button\" class=\"btn-close-modale\"
data-dismiss=\"modal\">";
// line 248
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 250
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.', 250, $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 253
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.', 253, $this->source); })()), 'form_end');
echo "
</div>
</div>
</div>
";
// line 258
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 258, $this->source); })()) === true)) {
// line 259
echo " ";
$this->loadTemplate("Front/Scholar/Chapter/_chat_bot_modal.html.twig", "Front/Scholar/Chapter/show.html.twig", 259)->display($context);
// line 260
echo " ";
}
// line 261
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 264
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 265
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.', 265, $this->source); })()), "user", [], "any", false, false, false, 265) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 265, $this->source); })()) == "front_channel_chapter_show"))) {
// line 266
echo " <script>
var attendanceUrl = '";
// line 267
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 268
(isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 268, $this->source); })()), "id", [], "any", false, false, false, 268)]), "html", null, true);
// line 269
echo "';
</script>
";
}
// line 272
echo "
";
// line 273
$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 ( 725 => 273, 722 => 272, 717 => 269, 715 => 268, 714 => 267, 711 => 266, 708 => 265, 698 => 264, 687 => 261, 684 => 260, 681 => 259, 679 => 258, 671 => 253, 665 => 250, 660 => 248, 652 => 243, 648 => 242, 635 => 232, 628 => 228, 618 => 220, 616 => 219, 610 => 217, 600 => 216, 588 => 213, 582 => 209, 580 => 207, 579 => 206, 574 => 203, 570 => 201, 566 => 199, 561 => 196, 559 => 195, 556 => 194, 552 => 192, 550 => 191, 543 => 185, 539 => 183, 524 => 170, 519 => 168, 512 => 164, 500 => 155, 496 => 154, 490 => 152, 488 => 151, 483 => 148, 476 => 145, 470 => 141, 468 => 140, 465 => 139, 463 => 138, 456 => 137, 454 => 136, 451 => 135, 437 => 134, 423 => 133, 421 => 131, 420 => 130, 419 => 129, 417 => 128, 414 => 127, 411 => 126, 408 => 125, 390 => 124, 388 => 123, 385 => 122, 383 => 120, 382 => 119, 381 => 118, 380 => 117, 377 => 116, 374 => 115, 371 => 114, 368 => 113, 365 => 112, 363 => 111, 360 => 110, 356 => 108, 353 => 107, 336 => 106, 333 => 105, 327 => 103, 325 => 102, 320 => 100, 315 => 97, 313 => 96, 310 => 95, 307 => 94, 305 => 92, 304 => 91, 302 => 90, 300 => 89, 295 => 87, 292 => 86, 286 => 83, 283 => 82, 281 => 81, 275 => 77, 272 => 74, 271 => 73, 268 => 70, 267 => 69, 265 => 68, 259 => 64, 255 => 63, 252 => 62, 250 => 61, 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>
<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");
}
}