<?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_a48e03f7d290d42adce9ea69ce8e951f4845455e0379bc26976c54063f6b41a0 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'stylesheets' => [$this, 'block_stylesheets'],
'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_stylesheets($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", "stylesheets"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 12
echo " ";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
";
// line 13
echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("styles", "core", "core");
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 16
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 17
echo " ";
$this->loadTemplate("Front/Scholar/Partial/_preview_manager_heager.html.twig", "Front/Scholar/Chapter/show.html.twig", 17)->display(twig_array_merge($context, ["channel" => // line 18
(isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 18, $this->source); })()), "currentRoute" => // line 19
(isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 19, $this->source); })())]));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 23
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 24
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 27
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 27, $this->source); })()) == "front_channel_chapter_show")) {
// line 28
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.', 28, $this->source); })()), "id", [], "any", false, false, false, 28), "html", null, true);
echo "
data-module_id=";
// line 29
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.', 29, $this->source); })()), "id", [], "any", false, false, false, 29), "html", null, true);
echo "
data-lesson_id=";
// line 30
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.', 30, $this->source); })()), "id", [], "any", false, false, false, 30), "html", null, true);
echo "
data-chapter_id=\"";
// line 31
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.', 31, $this->source); })()), "id", [], "any", false, false, false, 31), "html", null, true);
echo "\"
";
}
// line 33
echo ">
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 36
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 37
echo " ";
if (twig_in_filter((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 37, $this->source); })()), [0 => "front_channel_chapter_show", 1 => "manager_channel_module_chapter_show", 2 => "manager_channel_training_module_chapter_show"])) {
// line 38
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.', 38, $this->source); })()));
// line 39
echo " ";
} elseif (twig_in_filter((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 39, $this->source); })()), [0 => "manager_channel_chapter_show_message", 1 => "manager_channel_chapter_show"])) {
// line 40
echo " ";
$context["trainingModuleLessons"] = [0 => (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 40, $this->source); })())];
// line 41
echo " ";
}
// line 42
echo "
";
// line 43
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.', 43, $this->source); })()), "user", [], "any", false, false, false, 43)) {
// line 44
echo " ";
$props = $this->extensions["Symfony\\UX\\TwigComponent\\Twig\\ComponentExtension"]->embeddedContext("ChannelUserData:CursusLockout", twig_to_array(["cursus" => (($context["cursus"]) ?? (null))]), $context);
$this->loadTemplate("Front/Scholar/Chapter/show.html.twig", "Front/Scholar/Chapter/show.html.twig", 44, "1335818022")->display($props);
// line 45
echo " ";
}
// line 46
echo "
";
// line 47
$this->loadTemplate("Front/Scholar/Partial/_menu_lessons_mobile.html.twig", "Front/Scholar/Chapter/show.html.twig", 47)->display(twig_array_merge($context, ["current_chapter" => // line 48
(isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 48, $this->source); })())]));
// line 50
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 55
$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.', 55, $this->source); })()), "flashes", [], "method", false, false, false, 55));
foreach ($context['_seq'] as $context["key"] => $context["messageType"]) {
// line 56
echo " <div>
";
// line 57
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["messageType"]);
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 58
echo " <div class=\"alert alert-";
echo twig_escape_filter($this->env, twig_replace_filter($context["key"], ["error" => "danger"]), "html", null, true);
echo "\">
";
// line 59
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 62
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 64
echo " </div>
<h2 class=\"font-weight-bold font-size-16px\">";
// line 66
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.', 66, $this->source); })()), "lesson", [], "any", false, false, false, 66), "name", [], "any", false, false, false, 66)]), "html", null, true);
echo "</h2>
<h1 class=\"v2-title-big\">";
// line 67
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.', 67, $this->source); })()), "name", [], "any", false, false, false, 67), "html", null, true);
echo "</h1>
";
// line 69
$this->loadTemplate("Front/Scholar/Partial/_content_alert.html.twig", "Front/Scholar/Chapter/show.html.twig", 69)->display($context);
// line 70
echo "
<div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> ";
// line 72
echo " <div class=\"d-flex align-items-center\"> ";
// line 73
echo " <img class=\"star-space chapter-comment-logo\"
src=\"";
// line 74
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 75
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.', 75, $this->source); })())), "html", null, true);
echo "</div>
</div>
<div class=\"d-flex justify-content-center align-items-center\">";
// line 79
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.', 79, $this->source); })()), "updatedAt", [], "any", false, false, false, 79))) {
// line 80
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 81
(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 81, $this->source); })()), "updatedAt", [], "any", false, false, false, 81), "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.', 81, $this->source); })()), "request", [], "any", false, false, false, 81), "locale", [], "any", false, false, false, 81))]);
} else {
// line 84
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 85
(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 85, $this->source); })()), "createdAt", [], "any", false, false, false, 85), "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.', 85, $this->source); })()), "request", [], "any", false, false, false, 85), "locale", [], "any", false, false, false, 85))]);
}
// line 88
echo "</div>
</div>
";
// line 92
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.', 92, $this->source); })()), "description", [], "any", false, false, false, 92))) {
// line 93
echo " <div class=\"description-lesson mt-4\">
<p class=\"text-subcateg description-style\">";
// line 94
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.', 94, $this->source); })()), "description", [], "any", false, false, false, 94), "html", null, true);
echo "</p>
</div>
";
}
// line 97
echo "
<div class=\"mt-4 lesson-content\">";
// line 98
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.', 98, $this->source); })()), "body", [], "any", false, false, false, 98);
echo "</div>
";
// line 100
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 100, $this->source); })()) == "front_channel_chapter_show")) {
// line 101
echo " ";
$this->loadTemplate("Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig", "Front/Scholar/Chapter/show.html.twig", 101)->display(twig_array_merge($context, ["next_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getNextInformationsChapter( // line 102
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 102, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 102, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 102, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 102, $this->source); })())), "previous_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getPreviousInformationsChapter( // line 103
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 103, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 103, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 103, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 103, $this->source); })()))]));
// line 105
echo " ";
}
// line 106
echo "
";
// line 107
if (((isset($context["canSeeMessages"]) || array_key_exists("canSeeMessages", $context) ? $context["canSeeMessages"] : (function () { throw new RuntimeError('Variable "canSeeMessages" does not exist.', 107, $this->source); })()) === true)) {
// line 108
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 111
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.', 111, $this->source); })()))]), "html", null, true);
echo "</div>
";
// line 113
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.', 113, $this->source); })())) == 0)) {
// line 114
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 116
echo "
";
// line 117
$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.', 117, $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 118
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 118) != 0)) {
// line 119
echo " <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
";
}
// line 121
echo "
";
// line 122
$context["messageToAnswer"] = null;
// line 123
echo " ";
$context["children"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageChildren($context["message"]);
// line 124
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.', 124, $this->source); })())) === 0)) {
// line 125
echo " ";
$context["messageToAnswer"] = $context["message"];
// line 126
echo " ";
}
// line 127
echo "
";
// line 128
$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["message"], "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["message"]))), "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 "
";
// line 134
$context["messageToAnswer"] = null;
// line 135
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.', 135, $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 136
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 136) === true)) {
// line 137
echo " ";
$context["messageToAnswer"] = $context["message"];
// line 138
echo " ";
}
// line 139
echo " ";
$this->loadTemplate("Front/Scholar/Chapter/show_forum_message.html.twig", "Front/Scholar/Chapter/show.html.twig", 139)->display(twig_array_merge($context, ["message" => // line 140
$context["child"], "canDelete" => ( // line 141
(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.', 141, $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.', 141, $this->source); })()), "user", [], "any", false, false, false, 141)) && $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.', 141, $this->source); })()), "user", [], "any", false, false, false, 141), $context["child"]))), "messageToAnswer" => // line 142
(isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 142, $this->source); })())]));
// line 144
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 145
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 146
echo "
";
// line 147
if (array_key_exists("form", $context)) {
// line 148
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.', 148, $this->source); })()), "user", [], "any", false, false, false, 148)) {
echo " justify-content-center align-items-center";
}
echo " mt-5\">
";
// line 149
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.', 149, $this->source); })()), "user", [], "any", false, false, false, 149)) {
// line 150
echo " <div class=\"col-1 d-none d-md-block\">
";
// line 151
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.', 151, $this->source); })()), "user", [], "any", false, false, false, 151), "avatarPath", [], "any", false, false, false, 151))) {
// line 152
echo " <span class=\"user-account\">
<i class=\"fas fa-user\"></i>
</span>
";
} else {
// line 156
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.', 156, $this->source); })()), "user", [], "any", false, false, false, 156)), "html", null, true);
echo "\"
alt=\"User avatar\">
";
}
// line 159
echo " </div>
<div class=\"col-md-11 col-12 pr-0 pl-0\">
";
// line 162
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 162, $this->source); })()) === false)) {
// line 163
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.', 163, $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 165
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.', 165, $this->source); })()), "content", [], "any", false, false, false, 165), 'row');
echo "</div>
<div>";
// line 166
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.', 166, $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 175
echo "Envoyer";
echo "</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
</div>
";
// line 179
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.', 179, $this->source); })()), 'form_end');
echo "
";
} else {
// line 181
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 194
echo " </div>
";
} else {
// line 196
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 202
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 203
echo "</div>
<div class=\"col-2\">
<a href=\"";
// line 205
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("nellapp_sdk_connect_nellapp");
echo "\" class=\"btn-nellapp-v2\">";
// line 206
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 207
echo "</a>
</div>
";
}
// line 210
echo " </div>
";
}
// line 212
echo " </div>
";
}
// line 214
echo " </div>
<div class=\"col-3 p-0 d-none d-md-block\">
";
// line 217
$this->loadTemplate("Front/Scholar/Partial/menu_lessons.html.twig", "Front/Scholar/Chapter/show.html.twig", 217)->display(twig_array_merge($context, ["current_chapter" => // line 218
(isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 218, $this->source); })())]));
// line 220
echo " </div>
</div>
</div>
";
// line 224
$this->displayParentBlock("content", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 227
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 228
echo " ";
$this->displayParentBlock("body", $context, $blocks);
echo "
";
// line 230
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.', 230, $this->source); })()), "user", [], "any", false, false, false, 230)) {
// line 231
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 239
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 243
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 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_start');
echo "
";
// line 254
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.', 254, $this->source); })()), "content", [], "any", false, false, false, 254), 'row');
echo "
</div>
<div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
<button type=\"button\" class=\"btn-close-modale\"
data-dismiss=\"modal\">";
// line 259
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 261
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.', 261, $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 264
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.', 264, $this->source); })()), 'form_end');
echo "
</div>
</div>
</div>
";
// line 269
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 269, $this->source); })()) === true)) {
// line 270
echo " ";
$this->loadTemplate("Front/Scholar/Chapter/_chat_bot_modal.html.twig", "Front/Scholar/Chapter/show.html.twig", 270)->display($context);
// line 271
echo " ";
}
// line 272
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 275
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 276
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.', 276, $this->source); })()), "user", [], "any", false, false, false, 276) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 276, $this->source); })()) == "front_channel_chapter_show"))) {
// line 277
echo " <script>
var attendanceUrl = '";
// line 278
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 279
(isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 279, $this->source); })()), "id", [], "any", false, false, false, 279)]), "html", null, true);
// line 280
echo "';
</script>
";
}
// line 283
echo "
";
// line 284
$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 ( 770 => 284, 767 => 283, 762 => 280, 760 => 279, 759 => 278, 756 => 277, 753 => 276, 743 => 275, 732 => 272, 729 => 271, 726 => 270, 724 => 269, 716 => 264, 710 => 261, 705 => 259, 697 => 254, 693 => 253, 680 => 243, 673 => 239, 663 => 231, 661 => 230, 655 => 228, 645 => 227, 633 => 224, 627 => 220, 625 => 218, 624 => 217, 619 => 214, 615 => 212, 611 => 210, 606 => 207, 604 => 206, 601 => 205, 597 => 203, 595 => 202, 588 => 196, 584 => 194, 569 => 181, 564 => 179, 557 => 175, 545 => 166, 541 => 165, 535 => 163, 533 => 162, 528 => 159, 521 => 156, 515 => 152, 513 => 151, 510 => 150, 508 => 149, 501 => 148, 499 => 147, 496 => 146, 482 => 145, 468 => 144, 466 => 142, 465 => 141, 464 => 140, 462 => 139, 459 => 138, 456 => 137, 453 => 136, 435 => 135, 433 => 134, 430 => 133, 428 => 131, 427 => 130, 426 => 129, 425 => 128, 422 => 127, 419 => 126, 416 => 125, 413 => 124, 410 => 123, 408 => 122, 405 => 121, 401 => 119, 398 => 118, 381 => 117, 378 => 116, 372 => 114, 370 => 113, 365 => 111, 360 => 108, 358 => 107, 355 => 106, 352 => 105, 350 => 103, 349 => 102, 347 => 101, 345 => 100, 340 => 98, 337 => 97, 331 => 94, 328 => 93, 326 => 92, 320 => 88, 317 => 85, 316 => 84, 313 => 81, 312 => 80, 310 => 79, 304 => 75, 300 => 74, 297 => 73, 295 => 72, 292 => 70, 290 => 69, 285 => 67, 281 => 66, 277 => 64, 270 => 62, 261 => 59, 256 => 58, 252 => 57, 249 => 56, 245 => 55, 238 => 50, 236 => 48, 235 => 47, 232 => 46, 229 => 45, 225 => 44, 223 => 43, 220 => 42, 217 => 41, 214 => 40, 211 => 39, 208 => 38, 205 => 37, 195 => 36, 184 => 33, 179 => 31, 175 => 30, 171 => 29, 166 => 28, 164 => 27, 155 => 24, 145 => 23, 135 => 19, 134 => 18, 132 => 17, 122 => 16, 110 => 13, 105 => 12, 95 => 11, 74 => 6, 63 => 1, 61 => 9, 59 => 8, 56 => 3, 54 => 2, 41 => 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 stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('styles', 'core', 'core') }}
{% endblock %}
{% 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 %}
{% if app.user %}
{% component 'ChannelUserData:CursusLockout' with { cursus: cursus ?? null } %}{% endcomponent %}
{% 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");
}
}
/* Front/Scholar/Chapter/show.html.twig */
class __TwigTemplate_a48e03f7d290d42adce9ea69ce8e951f4845455e0379bc26976c54063f6b41a0___1335818022 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
];
}
protected function doGetParent(array $context)
{
// line 44
return "@NellappSDK/Components/channelUserData/cursus_lockout.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"));
$this->parent = $this->loadTemplate("@NellappSDK/Components/channelUserData/cursus_lockout.html.twig", "Front/Scholar/Chapter/show.html.twig", 44);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Front/Scholar/Chapter/show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1107 => 44, 770 => 284, 767 => 283, 762 => 280, 760 => 279, 759 => 278, 756 => 277, 753 => 276, 743 => 275, 732 => 272, 729 => 271, 726 => 270, 724 => 269, 716 => 264, 710 => 261, 705 => 259, 697 => 254, 693 => 253, 680 => 243, 673 => 239, 663 => 231, 661 => 230, 655 => 228, 645 => 227, 633 => 224, 627 => 220, 625 => 218, 624 => 217, 619 => 214, 615 => 212, 611 => 210, 606 => 207, 604 => 206, 601 => 205, 597 => 203, 595 => 202, 588 => 196, 584 => 194, 569 => 181, 564 => 179, 557 => 175, 545 => 166, 541 => 165, 535 => 163, 533 => 162, 528 => 159, 521 => 156, 515 => 152, 513 => 151, 510 => 150, 508 => 149, 501 => 148, 499 => 147, 496 => 146, 482 => 145, 468 => 144, 466 => 142, 465 => 141, 464 => 140, 462 => 139, 459 => 138, 456 => 137, 453 => 136, 435 => 135, 433 => 134, 430 => 133, 428 => 131, 427 => 130, 426 => 129, 425 => 128, 422 => 127, 419 => 126, 416 => 125, 413 => 124, 410 => 123, 408 => 122, 405 => 121, 401 => 119, 398 => 118, 381 => 117, 378 => 116, 372 => 114, 370 => 113, 365 => 111, 360 => 108, 358 => 107, 355 => 106, 352 => 105, 350 => 103, 349 => 102, 347 => 101, 345 => 100, 340 => 98, 337 => 97, 331 => 94, 328 => 93, 326 => 92, 320 => 88, 317 => 85, 316 => 84, 313 => 81, 312 => 80, 310 => 79, 304 => 75, 300 => 74, 297 => 73, 295 => 72, 292 => 70, 290 => 69, 285 => 67, 281 => 66, 277 => 64, 270 => 62, 261 => 59, 256 => 58, 252 => 57, 249 => 56, 245 => 55, 238 => 50, 236 => 48, 235 => 47, 232 => 46, 229 => 45, 225 => 44, 223 => 43, 220 => 42, 217 => 41, 214 => 40, 211 => 39, 208 => 38, 205 => 37, 195 => 36, 184 => 33, 179 => 31, 175 => 30, 171 => 29, 166 => 28, 164 => 27, 155 => 24, 145 => 23, 135 => 19, 134 => 18, 132 => 17, 122 => 16, 110 => 13, 105 => 12, 95 => 11, 74 => 6, 63 => 1, 61 => 9, 59 => 8, 56 => 3, 54 => 2, 41 => 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 stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('styles', 'core', 'core') }}
{% endblock %}
{% 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 %}
{% if app.user %}
{% component 'ChannelUserData:CursusLockout' with { cursus: cursus ?? null } %}{% endcomponent %}
{% 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");
}
}