var/cache/dev/twig/6c/6c925a1c8c597c382e0bac65023782ac4c9256c52b0f0395e4650271425deb3c.php line 63

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Front/Scholar/Chapter/show.html.twig */
  14. class __TwigTemplate_072ecbd63cf36668dd27605608708ff5129d88a4d52bd24f91347f57a608fe4c extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'before_navbar' => [$this'block_before_navbar'],
  25.             'body_markup' => [$this'block_body_markup'],
  26.             'content' => [$this'block_content'],
  27.             'body' => [$this'block_body'],
  28.             'javascripts' => [$this'block_javascripts'],
  29.         ];
  30.     }
  31.     protected function doGetParent(array $context)
  32.     {
  33.         // line 1
  34.         return "base.html.twig";
  35.     }
  36.     protected function doDisplay(array $context, array $blocks = [])
  37.     {
  38.         $macros $this->macros;
  39.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Front/Scholar/Chapter/show.html.twig"));
  41.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Front/Scholar/Chapter/show.html.twig"));
  43.         // line 2
  44.         if ( !array_key_exists("canSeeMessages"$context)) {
  45.             // line 3
  46.             $context["canSeeMessages"] = true;
  47.         }
  48.         // line 8
  49.         $context["currentRoute"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse8), "attributes", [], "any"falsefalsefalse8), "get", [=> "_route"], "method"falsefalsefalse8);
  50.         // line 9
  51.         $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"));
  52.         // line 1
  53.         $this->parent $this->loadTemplate("base.html.twig""Front/Scholar/Chapter/show.html.twig"1);
  54.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  55.         
  56.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  57.         
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  59.     }
  60.     // line 6
  61.     public function block_title($context, array $blocks = [])
  62.     {
  63.         $macros $this->macros;
  64.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  65.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  66.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  67.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  68.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse6), "name", [], "any"falsefalsefalse6), "html"nulltrue);
  69.         echo " - ";
  70.         $this->displayParentBlock("title"$context$blocks);
  71.         
  72.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  73.         
  74.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  75.     }
  76.     // line 11
  77.     public function block_before_navbar($context, array $blocks = [])
  78.     {
  79.         $macros $this->macros;
  80.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  81.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""before_navbar"));
  82.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  83.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""before_navbar"));
  84.         // line 12
  85.         echo "    ";
  86.         $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
  87. (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
  88. (isset($context["currentRoute"]) || array_key_exists("currentRoute"$context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.'14$this->source); })())]));
  89.         
  90.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  91.         
  92.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  93.     }
  94.     // line 18
  95.     public function block_body_markup($context, array $blocks = [])
  96.     {
  97.         $macros $this->macros;
  98.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  99.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body_markup"));
  100.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  101.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body_markup"));
  102.         // line 19
  103.         echo "<body class=\"progression chapter-view ";
  104.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) {
  105.             echo "logged-in";
  106.         }
  107.         echo "\"
  108.       style=\"font-family: 'Poppins';\"
  109.       id=\"page-training-lesson\"
  110.         ";
  111.         // line 22
  112.         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")) {
  113.             // line 23
  114.             echo "            data-training_id=";
  115.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse23), "html"nulltrue);
  116.             echo "
  117.             data-module_id=";
  118.             // line 24
  119.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse24), "html"nulltrue);
  120.             echo "
  121.             data-lesson_id=";
  122.             // line 25
  123.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse25), "html"nulltrue);
  124.             echo "
  125.             data-chapter_id=\"";
  126.             // line 26
  127.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse26), "html"nulltrue);
  128.             echo "\"
  129.         ";
  130.         }
  131.         // line 28
  132.         echo ">
  133. ";
  134.         
  135.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  136.         
  137.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  138.     }
  139.     // line 31
  140.     public function block_content($context, array $blocks = [])
  141.     {
  142.         $macros $this->macros;
  143.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  144.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  145.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  146.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  147.         // line 32
  148.         echo "    ";
  149.         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); })()), [=> "front_channel_chapter_show"=> "manager_channel_module_chapter_show"=> "manager_channel_training_module_chapter_show"])) {
  150.             // line 33
  151.             echo "        ";
  152.             $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); })()));
  153.             // line 34
  154.             echo "    ";
  155.         } 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); })()), [=> "manager_channel_chapter_show_message"=> "manager_channel_chapter_show"])) {
  156.             // line 35
  157.             echo "        ";
  158.             $context["trainingModuleLessons"] = [=> (isset($context["lesson"]) || array_key_exists("lesson"$context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.'35$this->source); })())];
  159.             // line 36
  160.             echo "    ";
  161.         }
  162.         // line 37
  163.         echo "
  164.     ";
  165.         // line 38
  166.         $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
  167. (isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'39$this->source); })())]));
  168.         // line 41
  169.         echo "
  170.     <div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
  171.         <div class=\"row\">
  172.             <div class=\"col-md-9 col-12\">
  173.                 <div>
  174.                     ";
  175.         // line 46
  176.         $context['_parent'] = $context;
  177.         $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"falsefalsefalse46));
  178.         foreach ($context['_seq'] as $context["key"] => $context["messageType"]) {
  179.             // line 47
  180.             echo "                        <div>
  181.                             ";
  182.             // line 48
  183.             $context['_parent'] = $context;
  184.             $context['_seq'] = twig_ensure_traversable($context["messageType"]);
  185.             foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  186.                 // line 49
  187.                 echo "                                <div class=\"alert alert-";
  188.                 echo twig_escape_filter($this->envtwig_replace_filter($context["key"], ["error" => "danger"]), "html"nulltrue);
  189.                 echo "\">
  190.                                     ";
  191.                 // line 50
  192.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["message"]), "html"nulltrue);
  193.                 echo "
  194.                                 </div>
  195.                             ";
  196.             }
  197.             $_parent $context['_parent'];
  198.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
  199.             $context array_intersect_key($context$_parent) + $_parent;
  200.             // line 53
  201.             echo "                        </div>
  202.                     ";
  203.         }
  204.         $_parent $context['_parent'];
  205.         unset($context['_seq'], $context['_iterated'], $context['key'], $context['messageType'], $context['_parent'], $context['loop']);
  206.         $context array_intersect_key($context$_parent) + $_parent;
  207.         // line 55
  208.         echo "                </div>
  209.                 <h2 class=\"font-weight-bold font-size-16px\">";
  210.         // line 57
  211.         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->sourcetwig_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"falsefalsefalse57), "name", [], "any"falsefalsefalse57)]), "html"nulltrue);
  212.         echo "</h2>
  213.                 <h1 class=\"v2-title-big\">";
  214.         // line 58
  215.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse58), "html"nulltrue);
  216.         echo "</h1>
  217.                 ";
  218.         // line 60
  219.         $this->loadTemplate("Front/Scholar/Partial/_content_alert.html.twig""Front/Scholar/Chapter/show.html.twig"60)->display($context);
  220.         // line 61
  221.         echo "
  222.                 <div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> ";
  223.         // line 63
  224.         echo "                    <div class=\"d-flex align-items-center\"> ";
  225.         // line 64
  226.         echo "                        <img class=\"star-space chapter-comment-logo\"
  227.                              src=\"";
  228.         // line 65
  229.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/common/icon-chat.svg""common"), "html"nulltrue);
  230.         echo "\" alt=\"Count comments\"/>
  231.                         <div class=\"marks d-flex justify-content-center align-items-center\">";
  232.         // line 66
  233.         echo twig_escape_filter($this->env$this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageCount((isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'66$this->source); })())), "html"nulltrue);
  234.         echo "</div>
  235.                     </div>
  236.                     <div class=\"d-flex justify-content-center align-items-center\">";
  237.         // line 70
  238.         if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["lesson"]) || array_key_exists("lesson"$context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.'70$this->source); })()), "updatedAt", [], "any"falsefalsefalse70))) {
  239.             // line 71
  240.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source,             // line 72
  241. (isset($context["lesson"]) || array_key_exists("lesson"$context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.'72$this->source); })()), "updatedAt", [], "any"falsefalsefalse72), "long"""null"gregorian"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'72$this->source); })()), "request", [], "any"falsefalsefalse72), "locale", [], "any"falsefalsefalse72))]);
  242.         } else {
  243.             // line 75
  244.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source,             // line 76
  245. (isset($context["lesson"]) || array_key_exists("lesson"$context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.'76$this->source); })()), "createdAt", [], "any"falsefalsefalse76), "long"""null"gregorian"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'76$this->source); })()), "request", [], "any"falsefalsefalse76), "locale", [], "any"falsefalsefalse76))]);
  246.         }
  247.         // line 79
  248.         echo "</div>
  249.                 </div>
  250.                 ";
  251.         // line 83
  252.         if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'83$this->source); })()), "description", [], "any"falsefalsefalse83))) {
  253.             // line 84
  254.             echo "                    <div class=\"description-lesson mt-4\">
  255.                         <p class=\"text-subcateg description-style\">";
  256.             // line 85
  257.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'85$this->source); })()), "description", [], "any"falsefalsefalse85), "html"nulltrue);
  258.             echo "</p>
  259.                     </div>
  260.                 ";
  261.         }
  262.         // line 88
  263.         echo "
  264.                 <div class=\"mt-4 lesson-content\">";
  265.         // line 89
  266.         echo twig_get_attribute($this->env$this->source, (isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'89$this->source); })()), "body", [], "any"falsefalsefalse89);
  267.         echo "</div>
  268.                 ";
  269.         // line 91
  270.         if (((isset($context["currentRoute"]) || array_key_exists("currentRoute"$context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.'91$this->source); })()) == "front_channel_chapter_show")) {
  271.             // line 92
  272.             echo "                    ";
  273.             $this->loadTemplate("Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig""Front/Scholar/Chapter/show.html.twig"92)->display(twig_array_merge($context, ["next_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getNextInformationsChapter(            // line 93
  274. (isset($context["training"]) || array_key_exists("training"$context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.'93$this->source); })()), (isset($context["module"]) || array_key_exists("module"$context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.'93$this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson"$context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.'93$this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'93$this->source); })())), "previous_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getPreviousInformationsChapter(            // line 94
  275. (isset($context["training"]) || array_key_exists("training"$context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.'94$this->source); })()), (isset($context["module"]) || array_key_exists("module"$context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.'94$this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson"$context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.'94$this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'94$this->source); })()))]));
  276.             // line 96
  277.             echo "                ";
  278.         }
  279.         // line 97
  280.         echo "
  281.                 ";
  282.         // line 98
  283.         if (((isset($context["canSeeMessages"]) || array_key_exists("canSeeMessages"$context) ? $context["canSeeMessages"] : (function () { throw new RuntimeError('Variable "canSeeMessages" does not exist.'98$this->source); })()) === true)) {
  284.             // line 99
  285.             echo "                    <div class=\"mt-5 chapter-questions-separator\"></div>
  286.                     <div class=\"mt-5\" id=\"forum-messages\">
  287.                         <div class=\"font-weight-bold font-size-16px mb-4\">";
  288.             // line 102
  289.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.title.label", ["%count%" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageCount((isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'102$this->source); })()))]), "html"nulltrue);
  290.             echo "</div>
  291.                         ";
  292.             // line 104
  293.             if ((twig_length_filter($this->env, (isset($context["messages"]) || array_key_exists("messages"$context) ? $context["messages"] : (function () { throw new RuntimeError('Variable "messages" does not exist.'104$this->source); })())) == 0)) {
  294.                 // line 105
  295.                 echo "                            <div>";
  296.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.no_message.label"), "html"nulltrue);
  297.                 echo "</div>
  298.                         ";
  299.             }
  300.             // line 107
  301.             echo "
  302.                         ";
  303.             // line 108
  304.             $context['_parent'] = $context;
  305.             $context['_seq'] = twig_ensure_traversable((isset($context["messages"]) || array_key_exists("messages"$context) ? $context["messages"] : (function () { throw new RuntimeError('Variable "messages" does not exist.'108$this->source); })()));
  306.             $context['loop'] = [
  307.               'parent' => $context['_parent'],
  308.               'index0' => 0,
  309.               'index'  => 1,
  310.               'first'  => true,
  311.             ];
  312.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  313.                 $length count($context['_seq']);
  314.                 $context['loop']['revindex0'] = $length 1;
  315.                 $context['loop']['revindex'] = $length;
  316.                 $context['loop']['length'] = $length;
  317.                 $context['loop']['last'] = === $length;
  318.             }
  319.             foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  320.                 // line 109
  321.                 echo "                            ";
  322.                 if ((twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse109) != 0)) {
  323.                     // line 110
  324.                     echo "                                <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
  325.                             ";
  326.                 }
  327.                 // line 112
  328.                 echo "
  329.                             ";
  330.                 // line 113
  331.                 $context["messageToAnswer"] = null;
  332.                 // line 114
  333.                 echo "                            ";
  334.                 $context["children"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageChildren($context["message"]);
  335.                 // line 115
  336.                 echo "                            ";
  337.                 if ((twig_length_filter($this->env, (isset($context["children"]) || array_key_exists("children"$context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.'115$this->source); })())) === 0)) {
  338.                     // line 116
  339.                     echo "                                ";
  340.                     $context["messageToAnswer"] = $context["message"];
  341.                     // line 117
  342.                     echo "                            ";
  343.                 }
  344.                 // line 118
  345.                 echo "
  346.                             ";
  347.                 // line 119
  348.                 $this->loadTemplate("Front/Scholar/Chapter/show_forum_message.html.twig""Front/Scholar/Chapter/show.html.twig"119)->display(twig_array_merge($context, ["message" =>                 // line 120
  349. $context["message"], "canDelete" => (                // line 121
  350. (isset($context["is_granted_comment"]) || array_key_exists("is_granted_comment"$context) ? $context["is_granted_comment"] : (function () { throw new RuntimeError('Variable "is_granted_comment" does not exist.'121$this->source); })()) || ( !(null === twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'121$this->source); })()), "user", [], "any"falsefalsefalse121)) && $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Permission\Twig\Runtime\Info\UserOwnerRuntime')->isOwner(twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'121$this->source); })()), "user", [], "any"falsefalsefalse121), $context["message"]))), "messageToAnswer" =>                 // line 122
  351. (isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer"$context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.'122$this->source); })())]));
  352.                 // line 124
  353.                 echo "
  354.                             ";
  355.                 // line 125
  356.                 $context["messageToAnswer"] = null;
  357.                 // line 126
  358.                 echo "                            ";
  359.                 $context['_parent'] = $context;
  360.                 $context['_seq'] = twig_ensure_traversable((isset($context["children"]) || array_key_exists("children"$context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.'126$this->source); })()));
  361.                 $context['loop'] = [
  362.                   'parent' => $context['_parent'],
  363.                   'index0' => 0,
  364.                   'index'  => 1,
  365.                   'first'  => true,
  366.                 ];
  367.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  368.                     $length count($context['_seq']);
  369.                     $context['loop']['revindex0'] = $length 1;
  370.                     $context['loop']['revindex'] = $length;
  371.                     $context['loop']['length'] = $length;
  372.                     $context['loop']['last'] = === $length;
  373.                 }
  374.                 foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  375.                     // line 127
  376.                     echo "                                ";
  377.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse127) === true)) {
  378.                         // line 128
  379.                         echo "                                    ";
  380.                         $context["messageToAnswer"] = $context["message"];
  381.                         // line 129
  382.                         echo "                                ";
  383.                     }
  384.                     // line 130
  385.                     echo "                                ";
  386.                     $this->loadTemplate("Front/Scholar/Chapter/show_forum_message.html.twig""Front/Scholar/Chapter/show.html.twig"130)->display(twig_array_merge($context, ["message" =>                     // line 131
  387. $context["child"], "canDelete" => (                    // line 132
  388. (isset($context["is_granted_comment"]) || array_key_exists("is_granted_comment"$context) ? $context["is_granted_comment"] : (function () { throw new RuntimeError('Variable "is_granted_comment" does not exist.'132$this->source); })()) || ( !(null === twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'132$this->source); })()), "user", [], "any"falsefalsefalse132)) && $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Permission\Twig\Runtime\Info\UserOwnerRuntime')->isOwner(twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'132$this->source); })()), "user", [], "any"falsefalsefalse132), $context["child"]))), "messageToAnswer" =>                     // line 133
  389. (isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer"$context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.'133$this->source); })())]));
  390.                     // line 135
  391.                     echo "                            ";
  392.                     ++$context['loop']['index0'];
  393.                     ++$context['loop']['index'];
  394.                     $context['loop']['first'] = false;
  395.                     if (isset($context['loop']['length'])) {
  396.                         --$context['loop']['revindex0'];
  397.                         --$context['loop']['revindex'];
  398.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  399.                     }
  400.                 }
  401.                 $_parent $context['_parent'];
  402.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  403.                 $context array_intersect_key($context$_parent) + $_parent;
  404.                 // line 136
  405.                 echo "                        ";
  406.                 ++$context['loop']['index0'];
  407.                 ++$context['loop']['index'];
  408.                 $context['loop']['first'] = false;
  409.                 if (isset($context['loop']['length'])) {
  410.                     --$context['loop']['revindex0'];
  411.                     --$context['loop']['revindex'];
  412.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  413.                 }
  414.             }
  415.             $_parent $context['_parent'];
  416.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
  417.             $context array_intersect_key($context$_parent) + $_parent;
  418.             // line 137
  419.             echo "
  420.                         ";
  421.             // line 138
  422.             if (array_key_exists("form"$context)) {
  423.                 // line 139
  424.                 echo "                            <div id=\"form-message-anchor\" class=\"row";
  425.                 if ( !twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'139$this->source); })()), "user", [], "any"falsefalsefalse139)) {
  426.                     echo " justify-content-center align-items-center";
  427.                 }
  428.                 echo " mt-5\">
  429.                                 ";
  430.                 // line 140
  431.                 if (twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'140$this->source); })()), "user", [], "any"falsefalsefalse140)) {
  432.                     // line 141
  433.                     echo "                                    <div class=\"col-1 d-none d-md-block\">
  434.                                         ";
  435.                     // line 142
  436.                     if ((null === twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'142$this->source); })()), "user", [], "any"falsefalsefalse142), "avatarPath", [], "any"falsefalsefalse142))) {
  437.                         // line 143
  438.                         echo "                                            <span class=\"user-account\">
  439.                                             <i class=\"fas fa-user\"></i>
  440.                                         </span>
  441.                                         ";
  442.                     } else {
  443.                         // line 147
  444.                         echo "                                            <img class=\"user-account\" src=\"";
  445.                         echo twig_escape_filter($this->env$this->env->getRuntime('Nellapp\Bundle\SDKBundle\Twig\Runtime\ImageRunTime')->getUserAvatarThumbnail(twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'147$this->source); })()), "user", [], "any"falsefalsefalse147)), "html"nulltrue);
  446.                         echo "\"
  447.                                                  alt=\"User avatar\">
  448.                                         ";
  449.                     }
  450.                     // line 150
  451.                     echo "                                    </div>
  452.                                     <div class=\"col-md-11 col-12 pr-0 pl-0\">
  453.                                         ";
  454.                     // line 153
  455.                     if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot"$context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.'153$this->source); })()) === false)) {
  456.                         // line 154
  457.                         echo "                                            ";
  458.                         echo                         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'154$this->source); })()), 'form_start', ["attr" => ["class" => "m-0 d-flex flex-column flex-md-row"]]);
  459.                         echo "
  460.                                             <div class=\"col-md-10 col-12\">
  461.                                                 <div>";
  462.                         // line 156
  463.                         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'156$this->source); })()), "content", [], "any"falsefalsefalse156), 'row');
  464.                         echo "</div>
  465.                                                 <div>";
  466.                         // line 157
  467.                         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'157$this->source); })()), 'errors');
  468.                         echo "</div>
  469.                                             </div>
  470.                                             <div class=\"col-md-2 col-12 mt-send-mobile\">
  471.                                                 <button
  472.                                                         class=\"btn-nellapp-v2\"
  473.                                                         style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  474.                                                         type=\"submit\"
  475.                                                 >
  476.                                                     <span>";
  477.                         // line 166
  478.                         echo "Envoyer";
  479.                         echo "</span>
  480.                                                     <i class=\"ml-2 fas fa-paper-plane\"></i>
  481.                                                 </button>
  482.                                             </div>
  483.                                             ";
  484.                         // line 170
  485.                         echo                         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'170$this->source); })()), 'form_end');
  486.                         echo "
  487.                                         ";
  488.                     } else {
  489.                         // line 172
  490.                         echo "                                            <button
  491.                                                     class=\"btn-nellapp-v2\"
  492.                                                     style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  493.                                                     type=\"button\"
  494.                                                     data-toggle=\"modal\"
  495.                                                     data-target=\"#chat-bot-modal\"
  496.                                                     id=\"chat-bot-modal-label\"
  497.                                             >
  498.                                                 <span>Posez votre question</span>
  499.                                                 <i class=\"ml-2 fas fa-paper-plane\"></i>
  500.                                             </button>
  501.                                         ";
  502.                     }
  503.                     // line 185
  504.                     echo "                                    </div>
  505.                                 ";
  506.                 } else {
  507.                     // line 187
  508.                     echo "                                    <div class=\"col-1\">
  509.                                     <span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
  510.                                         <i class=\"fas fa-user\"></i>
  511.                                     </span>
  512.                                     </div>
  513.                                     <div class=\"col-9\">";
  514.                     // line 193
  515.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.please_connect.label"), "html"nulltrue);
  516.                     // line 194
  517.                     echo "</div>
  518.                                     <div class=\"col-2\">
  519.                                         <a href=\"";
  520.                     // line 196
  521.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("nellapp_sdk_connect_nellapp");
  522.                     echo "\" class=\"btn-nellapp-v2\">";
  523.                     // line 197
  524.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.login.label"), "html"nulltrue);
  525.                     // line 198
  526.                     echo "</a>
  527.                                     </div>
  528.                                 ";
  529.                 }
  530.                 // line 201
  531.                 echo "                            </div>
  532.                         ";
  533.             }
  534.             // line 203
  535.             echo "                    </div>
  536.                 ";
  537.         }
  538.         // line 205
  539.         echo "            </div>
  540.             <div class=\"col-3 p-0 d-none d-md-block\">
  541.                 ";
  542.         // line 208
  543.         $this->loadTemplate("Front/Scholar/Partial/menu_lessons.html.twig""Front/Scholar/Chapter/show.html.twig"208)->display(twig_array_merge($context, ["current_chapter" =>         // line 209
  544. (isset($context["chapter"]) || array_key_exists("chapter"$context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.'209$this->source); })())]));
  545.         // line 211
  546.         echo "            </div>
  547.         </div>
  548.     </div>
  549.     ";
  550.         // line 215
  551.         $this->displayParentBlock("content"$context$blocks);
  552.         echo "
  553. ";
  554.         
  555.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  556.         
  557.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  558.     }
  559.     // line 218
  560.     public function block_body($context, array $blocks = [])
  561.     {
  562.         $macros $this->macros;
  563.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  564.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  565.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  566.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  567.         // line 219
  568.         echo "    ";
  569.         $this->displayParentBlock("body"$context$blocks);
  570.         echo "
  571.     ";
  572.         // line 221
  573.         if (twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'221$this->source); })()), "user", [], "any"falsefalsefalse221)) {
  574.             // line 222
  575.             echo "        <!-- Modal -->
  576.         <div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
  577.              style=\"font-family: 'Poppins'\">
  578.             <div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
  579.                 <div class=\"modal-content border-8\">
  580.                     <div class=\"modal-header\">
  581.                         <h5 class=\"modal-title title-main-modal-message question-title\"
  582.                             style=\"font-size: 0.875rem;font-weight: bold;\">
  583.                             ";
  584.             // line 230
  585.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.title.label"), "html"nulltrue);
  586.             echo "
  587.                         </h5>
  588.                         <h5 class=\"modal-title title-main-modal-message response-title\"
  589.                             style=\"display:none; font-size: 0.875rem; font-weight: bold\">
  590.                             ";
  591.             // line 234
  592.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.title_response.label"), "html"nulltrue);
  593.             echo "
  594.                             <span class=\"span-response-title\"></span>
  595.                         </h5>
  596.                         <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  597.                             <span aria-hidden=\"true\">&times;</span>
  598.                         </button>
  599.                     </div>
  600.                     <div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
  601.                         <div id=\"modal-response-message\"></div>
  602.                         ";
  603.             // line 244
  604.             echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formAnswer"]) || array_key_exists("formAnswer"$context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.'244$this->source); })()), 'form_start');
  605.             echo "
  606.                         ";
  607.             // line 245
  608.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["formAnswer"]) || array_key_exists("formAnswer"$context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.'245$this->source); })()), "content", [], "any"falsefalsefalse245), 'row');
  609.             echo "
  610.                     </div>
  611.                     <div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
  612.                         <button type=\"button\" class=\"btn-close-modale\"
  613.                                 data-dismiss=\"modal\">";
  614.             // line 250
  615.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.close.label"), "html"nulltrue);
  616.             echo "</button>
  617.                         <button type=\"submit\"
  618.                                 class=\"btn-valid-modale\">";
  619.             // line 252
  620.             echo twig_escape_filter($this->env, ((array_key_exists("button_label"$context)) ? (_twig_default_filter((isset($context["button_label"]) || array_key_exists("button_label"$context) ? $context["button_label"] : (function () { throw new RuntimeError('Variable "button_label" does not exist.'252$this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("message.entity.save.label"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("message.entity.save.label"))), "html"nulltrue);
  621.             echo "</button>
  622.                     </div>
  623.                     ";
  624.             // line 255
  625.             echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formAnswer"]) || array_key_exists("formAnswer"$context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.'255$this->source); })()), 'form_end');
  626.             echo "
  627.                 </div>
  628.             </div>
  629.         </div>
  630.         ";
  631.             // line 260
  632.             if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot"$context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.'260$this->source); })()) === true)) {
  633.                 // line 261
  634.                 echo "            ";
  635.                 $this->loadTemplate("Front/Scholar/Chapter/_chat_bot_modal.html.twig""Front/Scholar/Chapter/show.html.twig"261)->display($context);
  636.                 // line 262
  637.                 echo "        ";
  638.             }
  639.             // line 263
  640.             echo "    ";
  641.         }
  642.         
  643.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  644.         
  645.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  646.     }
  647.     // line 266
  648.     public function block_javascripts($context, array $blocks = [])
  649.     {
  650.         $macros $this->macros;
  651.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  652.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  653.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  654.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  655.         // line 267
  656.         echo "    ";
  657.         if ((twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'267$this->source); })()), "user", [], "any"falsefalsefalse267) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute"$context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.'267$this->source); })()) == "front_channel_chapter_show"))) {
  658.             // line 268
  659.             echo "        <script>
  660.             var attendanceUrl = '";
  661.             // line 269
  662.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("async_channel_scholar_attendance_chapter", ["channelId" => twig_get_attribute($this->env$this->source,             // line 270
  663. (isset($context["channel"]) || array_key_exists("channel"$context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.'270$this->source); })()), "id", [], "any"falsefalsefalse270)]), "html"nulltrue);
  664.             // line 271
  665.             echo "';
  666.         </script>
  667.     ";
  668.         }
  669.         // line 274
  670.         echo "
  671.     ";
  672.         // line 275
  673.         $this->displayParentBlock("javascripts"$context$blocks);
  674.         echo "
  675. ";
  676.         
  677.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  678.         
  679.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  680.     }
  681.     public function getTemplateName()
  682.     {
  683.         return "Front/Scholar/Chapter/show.html.twig";
  684.     }
  685.     public function isTraitable()
  686.     {
  687.         return false;
  688.     }
  689.     public function getDebugInfo()
  690.     {
  691.         return array (  730 => 275,  727 => 274,  722 => 271,  720 => 270,  719 => 269,  716 => 268,  713 => 267,  703 => 266,  692 => 263,  689 => 262,  686 => 261,  684 => 260,  676 => 255,  670 => 252,  665 => 250,  657 => 245,  653 => 244,  640 => 234,  633 => 230,  623 => 222,  621 => 221,  615 => 219,  605 => 218,  593 => 215,  587 => 211,  585 => 209,  584 => 208,  579 => 205,  575 => 203,  571 => 201,  566 => 198,  564 => 197,  561 => 196,  557 => 194,  555 => 193,  548 => 187,  544 => 185,  529 => 172,  524 => 170,  517 => 166,  505 => 157,  501 => 156,  495 => 154,  493 => 153,  488 => 150,  481 => 147,  475 => 143,  473 => 142,  470 => 141,  468 => 140,  461 => 139,  459 => 138,  456 => 137,  442 => 136,  428 => 135,  426 => 133,  425 => 132,  424 => 131,  422 => 130,  419 => 129,  416 => 128,  413 => 127,  395 => 126,  393 => 125,  390 => 124,  388 => 122,  387 => 121,  386 => 120,  385 => 119,  382 => 118,  379 => 117,  376 => 116,  373 => 115,  370 => 114,  368 => 113,  365 => 112,  361 => 110,  358 => 109,  341 => 108,  338 => 107,  332 => 105,  330 => 104,  325 => 102,  320 => 99,  318 => 98,  315 => 97,  312 => 96,  310 => 94,  309 => 93,  307 => 92,  305 => 91,  300 => 89,  297 => 88,  291 => 85,  288 => 84,  286 => 83,  280 => 79,  277 => 76,  276 => 75,  273 => 72,  272 => 71,  270 => 70,  264 => 66,  260 => 65,  257 => 64,  255 => 63,  252 => 61,  250 => 60,  245 => 58,  241 => 57,  237 => 55,  230 => 53,  221 => 50,  216 => 49,  212 => 48,  209 => 47,  205 => 46,  198 => 41,  196 => 39,  195 => 38,  192 => 37,  189 => 36,  186 => 35,  183 => 34,  180 => 33,  177 => 32,  167 => 31,  156 => 28,  151 => 26,  147 => 25,  143 => 24,  138 => 23,  136 => 22,  127 => 19,  117 => 18,  107 => 14,  106 => 13,  104 => 12,  94 => 11,  73 => 6,  62 => 1,  60 => 9,  58 => 8,  55 => 3,  53 => 2,  40 => 1,);
  692.     }
  693.     public function getSourceContext()
  694.     {
  695.         return new Source("{% extends 'base.html.twig' %}
  696. {% if canSeeMessages is not defined %}
  697.     {% set canSeeMessages = true %}
  698. {% endif %}
  699. {% block title %}{{ chapter.lesson.name }} - {{ parent() }}{% endblock %}
  700. {% set currentRoute = app.request.attributes.get('_route') %}
  701. {% set enableChatBot = chapter is chat_bot_enabled and currentRoute == 'front_channel_chapter_show' %}
  702. {% block before_navbar %}
  703.     {% include 'Front/Scholar/Partial/_preview_manager_heager.html.twig' with {
  704.         'channel': channel,
  705.         'currentRoute': currentRoute,
  706.     } %}
  707. {% endblock before_navbar %}
  708. {% block body_markup %}
  709. <body class=\"progression chapter-view {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}logged-in{% endif %}\"
  710.       style=\"font-family: 'Poppins';\"
  711.       id=\"page-training-lesson\"
  712.         {% if currentRoute == 'front_channel_chapter_show' %}
  713.             data-training_id={{ training.id }}
  714.             data-module_id={{ module.id }}
  715.             data-lesson_id={{ lesson.id }}
  716.             data-chapter_id=\"{{ chapter.id }}\"
  717.         {% endif %}
  718. >
  719. {% endblock body_markup %}
  720. {% block content %}
  721.     {% if currentRoute in ['front_channel_chapter_show', 'manager_channel_module_chapter_show', 'manager_channel_training_module_chapter_show'] %}
  722.         {% set trainingModuleLessons = module | get_lessons %}
  723.     {% elseif currentRoute in ['manager_channel_chapter_show_message', 'manager_channel_chapter_show'] %}
  724.         {% set trainingModuleLessons = [lesson] %}
  725.     {% endif %}
  726.     {% include 'Front/Scholar/Partial/_menu_lessons_mobile.html.twig' with {
  727.         'current_chapter': chapter
  728.     } %}
  729.     <div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
  730.         <div class=\"row\">
  731.             <div class=\"col-md-9 col-12\">
  732.                 <div>
  733.                     {% for key, messageType in app.flashes() %}
  734.                         <div>
  735.                             {% for message in messageType %}
  736.                                 <div class=\"alert alert-{{ key|replace({'error': 'danger'}) }}\">
  737.                                     {{ message | trans }}
  738.                                 </div>
  739.                             {% endfor %}
  740.                         </div>
  741.                     {% endfor %}
  742.                 </div>
  743.                 <h2 class=\"font-weight-bold font-size-16px\">{{- 'front.scholar.lesson.show.title.label'|trans({'%name%': chapter.lesson.name}) -}}</h2>
  744.                 <h1 class=\"v2-title-big\">{{- chapter.name -}}</h1>
  745.                 {% include 'Front/Scholar/Partial/_content_alert.html.twig' %}
  746.                 <div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> {# align-items-baseline #}
  747.                     <div class=\"d-flex align-items-center\"> {# align-items-baseline #}
  748.                         <img class=\"star-space chapter-comment-logo\"
  749.                              src=\"{{- asset('build/common/icon-chat.svg', 'common') -}}\" alt=\"Count comments\"/>
  750.                         <div class=\"marks d-flex justify-content-center align-items-center\">{{ chapter | getMessageCount }}</div>
  751.                     </div>
  752.                     <div class=\"d-flex justify-content-center align-items-center\">
  753.                         {%- if lesson.updatedAt is not null -%}
  754.                             {{- 'front.scholar.training.show.createdAt.label'|trans({
  755.                                 '%date%': lesson.updatedAt|format_date('long', locale=app.request.locale),
  756.                             })|raw -}}
  757.                         {%- else -%}
  758.                             {{- 'front.scholar.training.show.createdAt.label'|trans({
  759.                                 '%date%': lesson.createdAt|format_date('long', locale=app.request.locale),
  760.                             })|raw -}}
  761.                         {%- endif -%}
  762.                     </div>
  763.                 </div>
  764.                 {% if chapter.description is not null %}
  765.                     <div class=\"description-lesson mt-4\">
  766.                         <p class=\"text-subcateg description-style\">{{- chapter.description -}}</p>
  767.                     </div>
  768.                 {% endif %}
  769.                 <div class=\"mt-4 lesson-content\">{{- chapter.body|raw -}}</div>
  770.                 {% if currentRoute == 'front_channel_chapter_show' %}
  771.                     {% include 'Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig' with {
  772.                         next_informations: get_next_informations_chapter(training, module, lesson, chapter),
  773.                         previous_informations: get_previous_informations_chapter(training, module, lesson, chapter),
  774.                     } %}
  775.                 {% endif %}
  776.                 {% if canSeeMessages is same as true %}
  777.                     <div class=\"mt-5 chapter-questions-separator\"></div>
  778.                     <div class=\"mt-5\" id=\"forum-messages\">
  779.                         <div class=\"font-weight-bold font-size-16px mb-4\">{{- 'front.scholar.lesson.show.message.title.label'|trans({'%count%': chapter|getMessageCount}) -}}</div>
  780.                         {% if messages|length == 0 %}
  781.                             <div>{{- 'front.scholar.lesson.show.message.no_message.label'|trans -}}</div>
  782.                         {% endif %}
  783.                         {% for message in messages %}
  784.                             {% if loop.index0 != 0 %}
  785.                                 <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
  786.                             {% endif %}
  787.                             {% set messageToAnswer = null %}
  788.                             {% set children = message|getMessageChildren %}
  789.                             {% if  children|length is same as 0 %}
  790.                                 {% set messageToAnswer = message %}
  791.                             {% endif %}
  792.                             {% include 'Front/Scholar/Chapter/show_forum_message.html.twig' with {
  793.                                 'message': message,
  794.                                 'canDelete': is_granted_comment or app.user is not null and app.user is owner_of(message),
  795.                                 'messageToAnswer': messageToAnswer
  796.                             } %}
  797.                             {% set messageToAnswer = null %}
  798.                             {% for child in children %}
  799.                                 {% if loop.last is same as true %}
  800.                                     {% set messageToAnswer = message %}
  801.                                 {% endif %}
  802.                                 {% include 'Front/Scholar/Chapter/show_forum_message.html.twig' with {
  803.                                     'message': child,
  804.                                     'canDelete': is_granted_comment or app.user is not null and app.user is owner_of(child),
  805.                                     'messageToAnswer': messageToAnswer
  806.                                 } %}
  807.                             {% endfor %}
  808.                         {% endfor %}
  809.                         {% if form is defined %}
  810.                             <div id=\"form-message-anchor\" class=\"row{% if not app.user %} justify-content-center align-items-center{% endif %} mt-5\">
  811.                                 {% if app.user %}
  812.                                     <div class=\"col-1 d-none d-md-block\">
  813.                                         {% if app.user.avatarPath is null %}
  814.                                             <span class=\"user-account\">
  815.                                             <i class=\"fas fa-user\"></i>
  816.                                         </span>
  817.                                         {% else %}
  818.                                             <img class=\"user-account\" src=\"{{ get_user_avatar_thumbnail(app.user) }}\"
  819.                                                  alt=\"User avatar\">
  820.                                         {% endif %}
  821.                                     </div>
  822.                                     <div class=\"col-md-11 col-12 pr-0 pl-0\">
  823.                                         {% if enableChatBot is same as false %}
  824.                                             {{ form_start(form, {'attr': {'class': 'm-0 d-flex flex-column flex-md-row'}}) }}
  825.                                             <div class=\"col-md-10 col-12\">
  826.                                                 <div>{{ form_row(form.content) }}</div>
  827.                                                 <div>{{ form_errors(form) }}</div>
  828.                                             </div>
  829.                                             <div class=\"col-md-2 col-12 mt-send-mobile\">
  830.                                                 <button
  831.                                                         class=\"btn-nellapp-v2\"
  832.                                                         style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  833.                                                         type=\"submit\"
  834.                                                 >
  835.                                                     <span>{{ \"Envoyer\" }}</span>
  836.                                                     <i class=\"ml-2 fas fa-paper-plane\"></i>
  837.                                                 </button>
  838.                                             </div>
  839.                                             {{ form_end(form) }}
  840.                                         {% else %}
  841.                                             <button
  842.                                                     class=\"btn-nellapp-v2\"
  843.                                                     style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  844.                                                     type=\"button\"
  845.                                                     data-toggle=\"modal\"
  846.                                                     data-target=\"#chat-bot-modal\"
  847.                                                     id=\"chat-bot-modal-label\"
  848.                                             >
  849.                                                 <span>Posez votre question</span>
  850.                                                 <i class=\"ml-2 fas fa-paper-plane\"></i>
  851.                                             </button>
  852.                                         {% endif %}
  853.                                     </div>
  854.                                 {% else %}
  855.                                     <div class=\"col-1\">
  856.                                     <span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
  857.                                         <i class=\"fas fa-user\"></i>
  858.                                     </span>
  859.                                     </div>
  860.                                     <div class=\"col-9\">
  861.                                         {{- 'front.scholar.lesson.show.message.modal.please_connect.label'|trans -}}
  862.                                     </div>
  863.                                     <div class=\"col-2\">
  864.                                         <a href=\"{{ path('nellapp_sdk_connect_nellapp') }}\" class=\"btn-nellapp-v2\">
  865.                                             {{- 'front.scholar.lesson.show.message.modal.login.label'|trans -}}
  866.                                         </a>
  867.                                     </div>
  868.                                 {% endif %}
  869.                             </div>
  870.                         {% endif %}
  871.                     </div>
  872.                 {% endif %}
  873.             </div>
  874.             <div class=\"col-3 p-0 d-none d-md-block\">
  875.                 {% include 'Front/Scholar/Partial/menu_lessons.html.twig' with {
  876.                     'current_chapter': chapter
  877.                 } %}
  878.             </div>
  879.         </div>
  880.     </div>
  881.     {{ parent() }}
  882. {% endblock content %}
  883. {% block body %}
  884.     {{ parent() }}
  885.     {% if app.user %}
  886.         <!-- Modal -->
  887.         <div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
  888.              style=\"font-family: 'Poppins'\">
  889.             <div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
  890.                 <div class=\"modal-content border-8\">
  891.                     <div class=\"modal-header\">
  892.                         <h5 class=\"modal-title title-main-modal-message question-title\"
  893.                             style=\"font-size: 0.875rem;font-weight: bold;\">
  894.                             {{ 'front.scholar.lesson.show.message.modal.title.label'|trans }}
  895.                         </h5>
  896.                         <h5 class=\"modal-title title-main-modal-message response-title\"
  897.                             style=\"display:none; font-size: 0.875rem; font-weight: bold\">
  898.                             {{ 'front.scholar.lesson.show.message.modal.title_response.label'|trans }}
  899.                             <span class=\"span-response-title\"></span>
  900.                         </h5>
  901.                         <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  902.                             <span aria-hidden=\"true\">&times;</span>
  903.                         </button>
  904.                     </div>
  905.                     <div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
  906.                         <div id=\"modal-response-message\"></div>
  907.                         {{ form_start(formAnswer) }}
  908.                         {{ form_row(formAnswer.content) }}
  909.                     </div>
  910.                     <div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
  911.                         <button type=\"button\" class=\"btn-close-modale\"
  912.                                 data-dismiss=\"modal\">{{ 'front.scholar.lesson.show.message.modal.close.label'|trans }}</button>
  913.                         <button type=\"submit\"
  914.                                 class=\"btn-valid-modale\">{{ button_label|default('message.entity.save.label'|trans) }}</button>
  915.                     </div>
  916.                     {{ form_end(formAnswer) }}
  917.                 </div>
  918.             </div>
  919.         </div>
  920.         {% if enableChatBot is same as true %}
  921.             {% include 'Front/Scholar/Chapter/_chat_bot_modal.html.twig' %}
  922.         {% endif %}
  923.     {% endif %}
  924. {% endblock %}
  925. {% block javascripts %}
  926.     {% if app.user and currentRoute == 'front_channel_chapter_show' %}
  927.         <script>
  928.             var attendanceUrl = '{{ url('async_channel_scholar_attendance_chapter', {
  929.                 'channelId': channel.id
  930.             }) }}';
  931.         </script>
  932.     {% endif %}
  933.     {{ parent() }}
  934. {% endblock %}
  935. ""Front/Scholar/Chapter/show.html.twig""/var/www/html/templates/Front/Scholar/Chapter/show.html.twig");
  936.     }
  937. }