<?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/Training/show.html.twig */
class __TwigTemplate_8f1f2bd0a5100175e783d35c4ae402ca5e29c7cbc398f6a148c34ae55ac6bfd1 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'before_navbar' => [$this, 'block_before_navbar'],
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
'inner_content' => [$this, 'block_inner_content'],
'body' => [$this, 'block_body'],
];
}
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/Training/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/Training/show.html.twig"));
// line 3
$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.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "attributes", [], "any", false, false, false, 3), "get", [0 => "_route"], "method", false, false, false, 3);
// line 4
$context["has_front_access"] = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("FRONT_ACCESS", ["training" => // line 5
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 5, $this->source); })())]);
// line 1
$this->parent = $this->loadTemplate("base.html.twig", "Front/Scholar/Training/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 8
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 9
echo " ";
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 9, $this->source); })()) == "manager_channel_training_show")) {
// line 10
echo " <div style=\"background-color: #E9F8F8;\" class=\"p-2 justify-content-center align-items-center d-flex flex-column flex-md-row text-center\">
";
// line 12
$context["headerReturnLink"] = null;
// line 13
echo " ";
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 13, $this->source); })()) == "manager_channel_training_show")) {
// line 14
echo " ";
$context["headerReturnLink"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("manager_channel_trainings", ["channelId" => twig_get_attribute($this->env, $this->source, (isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 14, $this->source); })()), "id", [], "any", false, false, false, 14)]);
// line 15
echo " ";
}
// line 16
echo "
<div style=\"font-weight: bold; color: #212B7A\" class=\"mx-1\">Vous êtes en mode visualisation de l'interface pour les administrateurs.</div>
<div style=\"font-weight: bold\"><a href=\"";
// line 18
echo twig_escape_filter($this->env, (isset($context["headerReturnLink"]) || array_key_exists("headerReturnLink", $context) ? $context["headerReturnLink"] : (function () { throw new RuntimeError('Variable "headerReturnLink" does not exist.', 18, $this->source); })()), "html", null, true);
echo "\" style=\"text-decoration: underline\">Revenir à la page d'administration</a></div>
</div>
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 23
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, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 23, $this->source); })()), "name", [], "any", false, false, false, 23), "html", null, true);
echo " - ";
$this->displayParentBlock("title", $context, $blocks);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 24
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 25
echo " ";
$context["advice_avg"] = $this->env->getRuntime('App\Twig\Runtime\AdviceRuntime')->adviceAvgByTraining((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 25, $this->source); })()));
// line 26
echo " <div class=\"jumbotron-v2 mb-4\">
<div class=\"container\">
<h2 class=\"v2-title-big\">";
// line 29
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.title.label", ["%name%" => twig_get_attribute($this->env, $this->source, // line 30
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 30, $this->source); })()), "name", [], "any", false, false, false, 30)]), "html", null, true);
// line 32
echo "</h2>
<div class=\"md-none\">
<div class=\"info-content mt-4 ";
// line 35
if (((isset($context["advice_avg"]) || array_key_exists("advice_avg", $context) ? $context["advice_avg"] : (function () { throw new RuntimeError('Variable "advice_avg" does not exist.', 35, $this->source); })()) === null)) {
echo " info-without-advice ";
}
echo "\">
<div>
<i class=\"fas fa-users\"></i>
<p>";
// line 38
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarTrainingRuntime')->countCursusForTraining((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 38, $this->source); })())), "html", null, true);
echo "</p>
</div>
";
// line 40
if ( !((isset($context["advice_avg"]) || array_key_exists("advice_avg", $context) ? $context["advice_avg"] : (function () { throw new RuntimeError('Variable "advice_avg" does not exist.', 40, $this->source); })()) === null)) {
// line 41
echo " <div>
<i class=\"fas fa-star\"></i>
<p>";
// line 43
echo twig_escape_filter($this->env, (isset($context["advice_avg"]) || array_key_exists("advice_avg", $context) ? $context["advice_avg"] : (function () { throw new RuntimeError('Variable "advice_avg" does not exist.', 43, $this->source); })()), "html", null, true);
echo " (";
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\Runtime\AdviceRuntime')->getCountAdviceTraining((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 43, $this->source); })())), "html", null, true);
echo ")</p>
</div>
";
}
// line 46
echo " <div class=\"dot-div\"></div>
<div>
";
// line 48
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 48, $this->source); })()), "updatedAt", [], "any", false, false, false, 48))) {
// line 49
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_get_attribute($this->env, $this->source, // line 50
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 50, $this->source); })()), "updatedAt", [], "any", false, false, false, 50), "long", "medium", "", 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.', 50, $this->source); })()), "request", [], "any", false, false, false, 50), "locale", [], "any", false, false, false, 50))]);
} else {
// line 53
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_get_attribute($this->env, $this->source, // line 54
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 54, $this->source); })()), "createdAt", [], "any", false, false, false, 54), "long", "medium", "", 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.', 54, $this->source); })()), "request", [], "any", false, false, false, 54), "locale", [], "any", false, false, false, 54))]);
}
// line 57
echo " </div>
</div>
</div>
<div class=\"md-set\">
<div class=\"info-content mt-4\">
<div>
<div>
<i class=\"fas fa-users\"></i>
<p>";
// line 67
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarTrainingRuntime')->countCursusForTraining((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 67, $this->source); })())), "html", null, true);
echo "</p>
</div>
";
// line 69
if ( !((isset($context["advice_avg"]) || array_key_exists("advice_avg", $context) ? $context["advice_avg"] : (function () { throw new RuntimeError('Variable "advice_avg" does not exist.', 69, $this->source); })()) === null)) {
// line 70
echo " <div class=\"info-content-stars\">
<i class=\"fas fa-star\"></i>
<p>";
// line 72
echo twig_escape_filter($this->env, (isset($context["advice_avg"]) || array_key_exists("advice_avg", $context) ? $context["advice_avg"] : (function () { throw new RuntimeError('Variable "advice_avg" does not exist.', 72, $this->source); })()), "html", null, true);
echo " (";
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\Runtime\AdviceRuntime')->getCountAdviceTraining((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 72, $this->source); })())), "html", null, true);
echo ")</p>
</div>
";
}
// line 75
echo " </div>
<div class=\"mt-2\">
<div class=\"dot-div\">
<i class=\"fas fa-circle\"></i>
</div>
<div>
";
// line 81
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 81, $this->source); })()), "updatedAt", [], "any", false, false, false, 81))) {
// line 82
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_get_attribute($this->env, $this->source, // line 83
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 83, $this->source); })()), "updatedAt", [], "any", false, false, false, 83), "long", "medium", "", 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.', 83, $this->source); })()), "request", [], "any", false, false, false, 83), "locale", [], "any", false, false, false, 83))]);
} else {
// line 86
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_get_attribute($this->env, $this->source, // line 87
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 87, $this->source); })()), "createdAt", [], "any", false, false, false, 87), "long", "medium", "", 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.', 87, $this->source); })()), "request", [], "any", false, false, false, 87), "locale", [], "any", false, false, false, 87))]);
}
// line 90
echo " </div>
</div>
</div>
</div>
<div class=\"description mt-4\">
<p>";
// line 98
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 98, $this->source); })()), "description", [], "any", false, false, false, 98), "html", null, true);
echo "</p>
</div>
</div>
</div>
";
// line 103
$this->displayParentBlock("content", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 106
public function block_inner_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", "inner_content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "inner_content"));
// line 107
echo " <div class=\"row\">
<div class=\"col-lg-9 col-md-8 mb-3\">
<h2 class=\"v2-title-small mt-5\">";
// line 109
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.sub_title.programm.label"), "html", null, true);
echo "</h2>
<div id=\"accordion\" class=\"accordion-nellapp mt-5\">
";
// line 111
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["firstModules"]) || array_key_exists("firstModules", $context) ? $context["firstModules"] : (function () { throw new RuntimeError('Variable "firstModules" does not exist.', 111, $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["module"]) {
// line 112
echo " ";
$this->loadTemplate("Front/Scholar/Training/Partial/accordion-item.html.twig", "Front/Scholar/Training/show.html.twig", 112)->display(twig_array_merge($context, ["module" => $context["module"], "loop" => $context["loop"], "training" => (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 112, $this->source); })())]));
// line 113
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['module'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 114
echo " ";
if (twig_length_filter($this->env, (isset($context["lastModules"]) || array_key_exists("lastModules", $context) ? $context["lastModules"] : (function () { throw new RuntimeError('Variable "lastModules" does not exist.', 114, $this->source); })()))) {
// line 115
echo " <div class=\"more-module\" style=\"display: none\">
";
// line 116
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["lastModules"]) || array_key_exists("lastModules", $context) ? $context["lastModules"] : (function () { throw new RuntimeError('Variable "lastModules" does not exist.', 116, $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["module"]) {
// line 117
echo " ";
$this->loadTemplate("Front/Scholar/Training/Partial/accordion-item.html.twig", "Front/Scholar/Training/show.html.twig", 117)->display(twig_array_merge($context, ["module" => $context["module"], "loop" => $context["loop"], "training" => (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 117, $this->source); })())]));
// line 118
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['module'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 119
echo " </div>
<div class=\"w100-flex-center-x mt-3 div-btn-see-more\">
<button class=\"btn-see-more-v2\"
data-btn-more-module=\"true\">
";
// line 123
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.list.button.see_more.label"), "html", null, true);
echo "
5/";
// line 124
echo twig_escape_filter($this->env, (5 + twig_length_filter($this->env, (isset($context["lastModules"]) || array_key_exists("lastModules", $context) ? $context["lastModules"] : (function () { throw new RuntimeError('Variable "lastModules" does not exist.', 124, $this->source); })()))), "html", null, true);
echo "
</button>
</div>
<div class=\"w100-flex-center-x mt-3 div-btn-see-less\" style=\"display: none\">
<button class=\"btn-see-more-v2\"
data-btn-less-module=\"true\">
";
// line 130
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.list.button.see_less.label"), "html", null, true);
echo "
</button>
</div>
";
}
// line 134
echo " </div>
</div>
<div class=\"col-lg-3 col-md-4 order-first order-md-last\">
<div class=\"card-elevation-training\">
<div class=\"\" style=\"background-color: #f0f8f8;border-radius: 6px;text-align: center;\">
<img class=\"img-top-card\" src=\"";
// line 140
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarTrainingRuntime')->getTrainingImgUrl((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 140, $this->source); })())), "html", null, true);
echo "\">
</div>
<div class=\"card-body\">
<div class=\"channel-name d-flex\">
<div>
<div class=\"img-logo-rounded\">
";
// line 147
$this->loadTemplate("Front/Channel/Image/_image_main_avatar.html.twig", "Front/Scholar/Training/show.html.twig", 147)->display(twig_array_merge($context, ["channel" => twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 147, $this->source); })()), "ownerChannel", [], "any", false, false, false, 147)]));
// line 148
echo " </div>
</div>
<div class=\"channel-description\">
<a href=\"";
// line 152
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_channel_show", ["channelId" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 152, $this->source); })()), "ownerChannel", [], "any", false, false, false, 152), "id", [], "any", false, false, false, 152)]), "html", null, true);
echo "\"
class=\"font-weight-bold\">";
// line 153
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 153, $this->source); })()), "ownerChannel", [], "any", false, false, false, 153), "name", [], "any", false, false, false, 153), "html", null, true);
echo "</a>
";
// line 154
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 154, $this->source); })()), "ownerChannel", [], "any", false, false, false, 154), "slogan", [], "any", false, false, false, 154))) {
// line 155
echo " <p class=\"small\">
";
// line 156
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 156, $this->source); })()), "ownerChannel", [], "any", false, false, false, 156), "slogan", [], "any", false, false, false, 156), "html", null, true);
echo "
</p>
";
}
// line 159
echo " </div>
</div>
<div class=\"training-stats mt-4\">
";
// line 162
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 162, $this->source); })()), "trainingType", [], "any", false, false, false, 162))) {
// line 163
echo " <div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-book-open\"></i>
</div>
<p>";
// line 168
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarTrainingTypeRuntime')->getTrainingTypeKey((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 168, $this->source); })()))), "html", null, true);
echo "</p>
</div>
</div>
";
}
// line 172
echo "
";
// line 173
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 173, $this->source); })()), "totalHourDescription", [], "any", false, false, false, 173))) {
// line 174
echo " <div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-stopwatch\"></i>
</div>
<p>";
// line 179
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 179, $this->source); })()), "totalHourDescription", [], "any", false, false, false, 179), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.card.total_hour.label"), "html", null, true);
echo "</p>
</div>
</div>
";
}
// line 183
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 183, $this->source); })()), "videoDescription", [], "any", false, false, false, 183))) {
// line 184
echo " <div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-file-video\"></i>
</div>
<p>";
// line 189
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 189, $this->source); })()), "videoDescription", [], "any", false, false, false, 189), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.card.video_time.label"), "html", null, true);
echo "</p>
</div>
</div>
";
}
// line 193
echo " ";
$context["count_exercises"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarTrainingRuntime')->countExercisesByTraining((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 193, $this->source); })()));
// line 194
echo " ";
if (((isset($context["count_exercises"]) || array_key_exists("count_exercises", $context) ? $context["count_exercises"] : (function () { throw new RuntimeError('Variable "count_exercises" does not exist.', 194, $this->source); })()) != 0)) {
// line 195
echo " <div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"far fa-list-alt\"></i>
</div>
<p>";
// line 201
echo twig_escape_filter($this->env, (isset($context["count_exercises"]) || array_key_exists("count_exercises", $context) ? $context["count_exercises"] : (function () { throw new RuntimeError('Variable "count_exercises" does not exist.', 201, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.card.use_case.label"), "html", null, true);
echo "</p>
</div>
</div>
";
}
// line 205
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 205, $this->source); })()), "diplomaDescription", [], "any", false, false, false, 205))) {
// line 206
echo " <div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-graduation-cap\"></i>
</div>
<p>";
// line 211
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 211, $this->source); })()), "diplomaDescription", [], "any", false, false, false, 211), "html", null, true);
echo "</p>
</div>
</div>
";
}
// line 215
echo " </div>
";
// line 217
if (( !(null === twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 217, $this->source); })()), "trainingProduct", [], "any", false, false, false, 217)) && !(isset($context["has_front_access"]) || array_key_exists("has_front_access", $context) ? $context["has_front_access"] : (function () { throw new RuntimeError('Variable "has_front_access" does not exist.', 217, $this->source); })()))) {
// line 218
echo " <div class=\"mt-4 w100-flex-center-x\">
";
// line 219
$context["value"] = (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 219, $this->source); })()), "trainingProduct", [], "any", false, false, false, 219), "price", [], "any", false, false, false, 219) * 1);
// line 220
echo " <p class=\"price-card-training\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.card.price.label", ["%price%" => (isset($context["value"]) || array_key_exists("value", $context) ? $context["value"] : (function () { throw new RuntimeError('Variable "value" does not exist.', 220, $this->source); })())]), "html", null, true);
echo "
*</p>
</div>
<div class=\"mt-2 w100-flex-center-x\">
<p class=\"price-note-card-training\">";
// line 224
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.card.price.note", ["%funding_contact_path%" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_channel_training_payment_funding_contact", ["training_id" => twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 224, $this->source); })()), "id", [], "any", false, false, false, 224)])]);
echo "</p>
</div>
";
}
// line 227
echo "
";
// line 228
if (( !twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 228, $this->source); })()), "public", [], "any", false, false, false, 228) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 228, $this->source); })()) == "front_channel_training_show"))) {
// line 229
echo " <div class=\"text-center mt-4 div-btn-card-show-training d-flex flex-column\">
";
// line 230
if ((isset($context["has_front_access"]) || array_key_exists("has_front_access", $context) ? $context["has_front_access"] : (function () { throw new RuntimeError('Variable "has_front_access" does not exist.', 230, $this->source); })())) {
// line 231
echo " <div class=\"w100-flex-center-x\">
<div class=\"progress-circle\">
<div class=\"c100 p";
// line 233
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["trainingProgression"]) || array_key_exists("trainingProgression", $context) ? $context["trainingProgression"] : (function () { throw new RuntimeError('Variable "trainingProgression" does not exist.', 233, $this->source); })()), "progression", [], "any", false, false, false, 233), "html", null, true);
echo " blue light-green-fill medium\">
<div class=\"slice\">
<div class=\"bar\"></div>
<div class=\"fill\"></div>
</div>
</div>
</div>
</div>
<div class=\"mb-2 training-progress-percent\">
";
// line 242
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["trainingProgression"]) || array_key_exists("trainingProgression", $context) ? $context["trainingProgression"] : (function () { throw new RuntimeError('Variable "trainingProgression" does not exist.', 242, $this->source); })()), "progression", [], "any", false, false, false, 242), "html", null, true);
echo " %
</div>
";
// line 245
if ((($this->env->getRuntime('Nellapp\Bundle\SDKBundle\Routing\Twig\Runtime\UrlGeneratorRuntime')->exist("core", "app_account_show_cursus") && array_key_exists("cursus", $context)) && !(null === (isset($context["cursus"]) || array_key_exists("cursus", $context) ? $context["cursus"] : (function () { throw new RuntimeError('Variable "cursus" does not exist.', 245, $this->source); })())))) {
// line 246
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Routing\Twig\Runtime\UrlGeneratorRuntime')->generate("core", "app_account_show_cursus", ["cursusId" => twig_get_attribute($this->env, $this->source, // line 247
(isset($context["cursus"]) || array_key_exists("cursus", $context) ? $context["cursus"] : (function () { throw new RuntimeError('Variable "cursus" does not exist.', 247, $this->source); })()), "id", [], "any", false, false, false, 247)]), "html", null, true);
// line 248
echo "\"
class=\"see-training-progress-link\">";
// line 249
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.card.progression.link.label"), "html", null, true);
echo "
</a>
";
}
// line 252
echo "
";
// line 253
$context["lastChapterAchieved"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarTrainingRuntime')->getLastAchievedChapter((isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 253, $this->source); })()));
// line 254
echo " ";
if ( !(null === (isset($context["lastChapterAchieved"]) || array_key_exists("lastChapterAchieved", $context) ? $context["lastChapterAchieved"] : (function () { throw new RuntimeError('Variable "lastChapterAchieved" does not exist.', 254, $this->source); })()))) {
// line 255
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_channel_chapter_show", ["trainingId" => twig_get_attribute($this->env, $this->source, // line 256
(isset($context["lastChapterAchieved"]) || array_key_exists("lastChapterAchieved", $context) ? $context["lastChapterAchieved"] : (function () { throw new RuntimeError('Variable "lastChapterAchieved" does not exist.', 256, $this->source); })()), "trainingId", [], "array", false, false, false, 256), "moduleId" => twig_get_attribute($this->env, $this->source, // line 257
(isset($context["lastChapterAchieved"]) || array_key_exists("lastChapterAchieved", $context) ? $context["lastChapterAchieved"] : (function () { throw new RuntimeError('Variable "lastChapterAchieved" does not exist.', 257, $this->source); })()), "moduleId", [], "array", false, false, false, 257), "lessonId" => twig_get_attribute($this->env, $this->source, // line 258
(isset($context["lastChapterAchieved"]) || array_key_exists("lastChapterAchieved", $context) ? $context["lastChapterAchieved"] : (function () { throw new RuntimeError('Variable "lastChapterAchieved" does not exist.', 258, $this->source); })()), "lessonId", [], "array", false, false, false, 258), "chapterId" => twig_get_attribute($this->env, $this->source, // line 259
(isset($context["lastChapterAchieved"]) || array_key_exists("lastChapterAchieved", $context) ? $context["lastChapterAchieved"] : (function () { throw new RuntimeError('Variable "lastChapterAchieved" does not exist.', 259, $this->source); })()), "chapterId", [], "array", false, false, false, 259)]), "html", null, true);
// line 260
echo "\"
class=\"btn-nellapp-v2 mt-3 d-inline-block\">
";
// line 262
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.card.continue_btn.label"), "html", null, true);
echo "
</a>
";
}
// line 265
echo " ";
} else {
// line 266
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_channel_training_payment_funding_contact", ["training_id" => twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 266, $this->source); })()), "id", [], "any", false, false, false, 266)]), "html", null, true);
echo "\"
class=\"btn btn-nellapp-v2\">
";
// line 268
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.actions.follow.label"), "html", null, true);
echo "
</a>
";
}
// line 271
echo " </div>
";
}
// line 273
echo " </div>
</div>
</div>
</div>
";
// line 278
if ((twig_length_filter($this->env, (isset($context["training_descriptions"]) || array_key_exists("training_descriptions", $context) ? $context["training_descriptions"] : (function () { throw new RuntimeError('Variable "training_descriptions" does not exist.', 278, $this->source); })())) > 0)) {
// line 279
echo " <div class=\"row\">
<div class=\"col-12\">
<h2 class=\"v2-title-small mt-5 mb-2\">";
// line 281
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.sub_title.plus.label"), "html", null, true);
echo "</h2>
</div>
<div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
";
// line 285
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["training_descriptions"]) || array_key_exists("training_descriptions", $context) ? $context["training_descriptions"] : (function () { throw new RuntimeError('Variable "training_descriptions" does not exist.', 285, $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["description"]) {
// line 286
echo " <div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6 mt-4\">
";
// line 287
$this->loadTemplate("Front/Scholar/Card/training-description.html.twig", "Front/Scholar/Training/show.html.twig", 287)->display(twig_array_merge($context, ["description" => $context["description"]]));
// line 288
echo " </div>
";
++$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['description'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 290
echo " </div>
</div>
</div>
";
}
// line 294
echo "
<div class=\"row mt-3\">
<div class=\"col-12\">
<h2 class=\"v2-title-small mt-5 mb-2\">";
// line 297
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.sub_title.channel.label"), "html", null, true);
echo "</h2>
</div>
<div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"mt-3\">
";
// line 303
$this->loadTemplate("Front/Scholar/Card/channel.html.twig", "Front/Scholar/Training/show.html.twig", 303)->display(twig_array_merge($context, ["channel" => twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 303, $this->source); })()), "ownerChannel", [], "any", false, false, false, 303)]));
// line 304
echo " </div>
</div>
</div>
</div>
</div>
";
// line 310
if ((twig_length_filter($this->env, (isset($context["teacher_entities"]) || array_key_exists("teacher_entities", $context) ? $context["teacher_entities"] : (function () { throw new RuntimeError('Variable "teacher_entities" does not exist.', 310, $this->source); })())) > 0)) {
// line 311
echo " <div class=\"row mt-3\">
<div class=\"col-12\">
<h2 class=\"v2-title-small mt-5 mb-2\">";
// line 313
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.sub_title.teacher.label"), "html", null, true);
echo "
(";
// line 314
echo twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["teacher_entities"]) || array_key_exists("teacher_entities", $context) ? $context["teacher_entities"] : (function () { throw new RuntimeError('Variable "teacher_entities" does not exist.', 314, $this->source); })())), "html", null, true);
echo ")</h2>
</div>
</div>
";
// line 317
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["teacher_entities"]) || array_key_exists("teacher_entities", $context) ? $context["teacher_entities"] : (function () { throw new RuntimeError('Variable "teacher_entities" does not exist.', 317, $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["teacher"]) {
// line 318
echo " <div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"mt-3\">
";
// line 322
$this->loadTemplate("Front/Scholar/Card/teacher.html.twig", "Front/Scholar/Training/show.html.twig", 322)->display(twig_array_merge($context, ["teacher" => $context["teacher"]]));
// line 323
echo " </div>
</div>
</div>
</div>
";
++$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['teacher'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 328
echo " ";
}
// line 329
echo "
";
// line 330
if ((array_key_exists("training_advices", $context) && (twig_length_filter($this->env, (isset($context["training_advices"]) || array_key_exists("training_advices", $context) ? $context["training_advices"] : (function () { throw new RuntimeError('Variable "training_advices" does not exist.', 330, $this->source); })())) > 0))) {
// line 331
echo " <div class=\"row mt-3 mb-5\">
<div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"div-title-between mt-5 mb-2\">
<h2 class=\"v2-title-small\">";
// line 336
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.sub_title.advice.label"), "html", null, true);
echo "
(";
// line 337
echo twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["training_advices"]) || array_key_exists("training_advices", $context) ? $context["training_advices"] : (function () { throw new RuntimeError('Variable "training_advices" does not exist.', 337, $this->source); })())), "html", null, true);
echo ")</h2>
<p class=\"\"><i class=\"far fa-star\"></i> ";
// line 338
echo twig_escape_filter($this->env, (isset($context["advice_avg"]) || array_key_exists("advice_avg", $context) ? $context["advice_avg"] : (function () { throw new RuntimeError('Variable "advice_avg" does not exist.', 338, $this->source); })()), "html", null, true);
echo "</p>
</div>
</div>
<div class=\"col-12\">
<div class=\"mt-3\">
";
// line 343
$context["adviceCount"] = 1;
// line 344
echo " ";
$context["break"] = false;
// line 345
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["training_advices"]) || array_key_exists("training_advices", $context) ? $context["training_advices"] : (function () { throw new RuntimeError('Variable "training_advices" does not exist.', 345, $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["advice"]) {
// line 346
echo " ";
if ( !(isset($context["break"]) || array_key_exists("break", $context) ? $context["break"] : (function () { throw new RuntimeError('Variable "break" does not exist.', 346, $this->source); })())) {
// line 347
echo " ";
$this->loadTemplate("Front/Scholar/Card/advice.html.twig", "Front/Scholar/Training/show.html.twig", 347)->display(twig_array_merge($context, ["advice" => $context["advice"]]));
// line 348
echo " ";
$context["adviceCount"] = ((isset($context["adviceCount"]) || array_key_exists("adviceCount", $context) ? $context["adviceCount"] : (function () { throw new RuntimeError('Variable "adviceCount" does not exist.', 348, $this->source); })()) + 1);
// line 349
echo " ";
if (((isset($context["adviceCount"]) || array_key_exists("adviceCount", $context) ? $context["adviceCount"] : (function () { throw new RuntimeError('Variable "adviceCount" does not exist.', 349, $this->source); })()) == 6)) {
// line 350
echo " ";
$context["break"] = true;
// line 351
echo " ";
}
// line 352
echo " ";
}
// line 353
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['advice'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 354
echo "
";
// line 355
$context["adviceCount"] = 1;
// line 356
echo " ";
if ((twig_length_filter($this->env, (isset($context["training_advices"]) || array_key_exists("training_advices", $context) ? $context["training_advices"] : (function () { throw new RuntimeError('Variable "training_advices" does not exist.', 356, $this->source); })())) > 5)) {
// line 357
echo " <div class=\"div-more-advice\">
";
// line 358
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["training_advices"]) || array_key_exists("training_advices", $context) ? $context["training_advices"] : (function () { throw new RuntimeError('Variable "training_advices" does not exist.', 358, $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["advice"]) {
// line 359
echo " ";
$context["adviceCount"] = ((isset($context["adviceCount"]) || array_key_exists("adviceCount", $context) ? $context["adviceCount"] : (function () { throw new RuntimeError('Variable "adviceCount" does not exist.', 359, $this->source); })()) + 1);
// line 360
echo " ";
if (((isset($context["adviceCount"]) || array_key_exists("adviceCount", $context) ? $context["adviceCount"] : (function () { throw new RuntimeError('Variable "adviceCount" does not exist.', 360, $this->source); })()) > 6)) {
// line 361
echo " ";
$this->loadTemplate("Front/Scholar/Card/advice.html.twig", "Front/Scholar/Training/show.html.twig", 361)->display(twig_array_merge($context, ["advice" => $context["advice"]]));
// line 362
echo " ";
}
// line 363
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['advice'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 364
echo " </div>
";
}
// line 366
echo " </div>
</div>
</div>
</div>
</div>
";
}
// line 372
echo " ";
if ((array_key_exists("form", $context) && 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.', 372, $this->source); })()), "user", [], "any", false, false, false, 372))) {
// line 373
echo " <div class=\"row\">
<div class=\"col-lg-9 col-md-8\">
<p class=\"small-description\">";
// line 375
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.sub_title.advice.sentence.enter_key.label"), "html", null, true);
echo "</p>
</div>
</div>
<div class=\"row\" ";
// line 378
if ((array_key_exists("advice_user", $context) && !(null === (isset($context["advice_user"]) || array_key_exists("advice_user", $context) ? $context["advice_user"] : (function () { throw new RuntimeError('Variable "advice_user" does not exist.', 378, $this->source); })())))) {
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["advice_user"]) || array_key_exists("advice_user", $context) ? $context["advice_user"] : (function () { throw new RuntimeError('Variable "advice_user" does not exist.', 378, $this->source); })()), "note", [], "any", false, false, false, 378))) {
echo "data-advice-current-note=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["advice_user"]) || array_key_exists("advice_user", $context) ? $context["advice_user"] : (function () { throw new RuntimeError('Variable "advice_user" does not exist.', 378, $this->source); })()), "note", [], "any", false, false, false, 378), "html", null, true);
echo "\"";
}
}
echo ">
<div class=\"col-lg-9 col-md-8 mt-1\">
<div class=\"form-advice-content\">
<div class=\"avatar-rounded\">";
// line 381
echo $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Twig\Runtime\UserRunTime')->displayAvatar($this->env, 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.', 381, $this->source); })()), "user", [], "any", false, false, false, 381));
echo "</div>
<div class=\"form-advice-bg-gray\">
";
// line 383
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.', 383, $this->source); })()), 'form_start');
echo "
<div style=\"display: none\">
";
// line 385
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.', 385, $this->source); })()), "note", [], "any", false, false, false, 385), 'widget');
echo "
</div>
";
// line 387
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.', 387, $this->source); })()), "comment", [], "any", false, false, false, 387), 'widget');
echo "
";
// line 388
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.', 388, $this->source); })()), "comment", [], "any", false, false, false, 388), 'errors');
echo "
";
// line 389
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.', 389, $this->source); })()), 'form_end');
echo "
<div class=\"stars-rating\">
<i class=\"far fa-star\" data-rating=\"1\"></i>
<i class=\"far fa-star\" data-rating=\"2\"></i>
<i class=\"far fa-star\" data-rating=\"3\"></i>
<i class=\"far fa-star\" data-rating=\"4\"></i>
<i class=\"far fa-star\" data-rating=\"5\"></i>
</div>
<div class=\"center-y ml-2\">
<span id=\"span-nb-note-advice\">0</span>
</div>
</div>
</div>
</div>
</div>
";
// line 404
if ( !(null === (isset($context["advice_user"]) || array_key_exists("advice_user", $context) ? $context["advice_user"] : (function () { throw new RuntimeError('Variable "advice_user" does not exist.', 404, $this->source); })()))) {
// line 405
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["advice_user"]) || array_key_exists("advice_user", $context) ? $context["advice_user"] : (function () { throw new RuntimeError('Variable "advice_user" does not exist.', 405, $this->source); })()), "id", [], "any", false, false, false, 405))) {
// line 406
echo " <div class=\"row\">
<div class=\"col-lg-9 col-md-8 mt-1\">
<div class=\"w100-flex-end-x\">
<a class=\"delete-btn-advice\"
href=\"";
// line 410
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_training_advice_delete", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["advice_user"]) || array_key_exists("advice_user", $context) ? $context["advice_user"] : (function () { throw new RuntimeError('Variable "advice_user" does not exist.', 410, $this->source); })()), "id", [], "any", false, false, false, 410)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.sub_title.advice.action.delete.label"), "html", null, true);
echo "</a>
</div>
</div>
</div>
";
}
// line 415
echo " ";
}
// line 416
echo " ";
}
// line 417
echo "
";
// line 421
if ((array_key_exists("training_advices", $context) && (twig_length_filter($this->env, (isset($context["training_advices"]) || array_key_exists("training_advices", $context) ? $context["training_advices"] : (function () { throw new RuntimeError('Variable "training_advices" does not exist.', 421, $this->source); })())) > 5))) {
// line 422
echo " <div class=\"row\">
<div class=\"col-lg-9 col-md-8 mt-5\">
<div class=\"w100-flex-center-x\">
<button class=\"see-more-btn\"
id=\"training-advice-see-more\">";
// line 426
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.advice.see_more.label", ["%count%" => twig_length_filter($this->env, (isset($context["training_advices"]) || array_key_exists("training_advices", $context) ? $context["training_advices"] : (function () { throw new RuntimeError('Variable "training_advices" does not exist.', 426, $this->source); })()))]), "html", null, true);
echo "</button>
</div>
</div>
</div>
";
}
// line 431
echo " <div class=\"empty-div-bottom\"></div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 434
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 435
echo " ";
$this->displayParentBlock("body", $context, $blocks);
echo "
";
// line 436
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("CHANNEL_USER_PERM_TRAINING_SHOW", (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 436, $this->source); })()))) {
// line 437
echo " <div class=\"modal fade\" id=\"delete-modal\" tabindex=\"-1\" role=\"dialog\"
aria-labelledby=\"delete-modal-label\" aria-hidden=\"true\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"delete-modal-label\">
";
// line 443
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.actions.delete.modal.title.label", ["%name%" => twig_get_attribute($this->env, $this->source, // line 444
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 444, $this->source); })()), "name", [], "any", false, false, false, 444)]);
// line 445
echo "
</h5>
</div>
<div class=\"modal-body\">
";
// line 450
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.actions.delete.modal.body.label", ["%name%" => twig_get_attribute($this->env, $this->source, // line 451
(isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 451, $this->source); })()), "name", [], "any", false, false, false, 451)]);
// line 452
echo "
</div>
<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-link\" data-dismiss=\"modal\">
";
// line 457
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.actions.delete.modal.cancel.label"), "html", null, true);
echo "
</button>
<a href=\"";
// line 460
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_channel_training_delete", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["sub"]) || array_key_exists("sub", $context) ? $context["sub"] : (function () { throw new RuntimeError('Variable "sub" does not exist.', 460, $this->source); })()), "id", [], "any", false, false, false, 460), "channelId" => twig_get_attribute($this->env, $this->source, (isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 460, $this->source); })()), "id", [], "any", false, false, false, 460)]), "html", null, true);
echo "\"
class=\"btn btn-danger btn-raised\">
";
// line 462
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.actions.delete.modal.delete.label"), "html", null, true);
echo "
</a>
</div>
</div>
</div>
</div>
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Front/Scholar/Training/show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1145 => 462, 1140 => 460, 1134 => 457, 1127 => 452, 1125 => 451, 1124 => 450, 1117 => 445, 1115 => 444, 1114 => 443, 1106 => 437, 1104 => 436, 1099 => 435, 1089 => 434, 1078 => 431, 1070 => 426, 1064 => 422, 1062 => 421, 1056 => 417, 1053 => 416, 1050 => 415, 1040 => 410, 1034 => 406, 1031 => 405, 1029 => 404, 1011 => 389, 1007 => 388, 1003 => 387, 998 => 385, 993 => 383, 988 => 381, 975 => 378, 969 => 375, 965 => 373, 962 => 372, 954 => 366, 950 => 364, 936 => 363, 933 => 362, 930 => 361, 927 => 360, 924 => 359, 907 => 358, 904 => 357, 901 => 356, 899 => 355, 896 => 354, 882 => 353, 879 => 352, 876 => 351, 873 => 350, 870 => 349, 867 => 348, 864 => 347, 861 => 346, 843 => 345, 840 => 344, 838 => 343, 830 => 338, 826 => 337, 822 => 336, 815 => 331, 813 => 330, 810 => 329, 807 => 328, 789 => 323, 787 => 322, 781 => 318, 764 => 317, 758 => 314, 754 => 313, 750 => 311, 748 => 310, 740 => 304, 738 => 303, 729 => 297, 724 => 294, 718 => 290, 703 => 288, 701 => 287, 698 => 286, 681 => 285, 674 => 281, 670 => 279, 668 => 278, 661 => 273, 657 => 271, 651 => 268, 645 => 266, 642 => 265, 636 => 262, 632 => 260, 630 => 259, 629 => 258, 628 => 257, 627 => 256, 625 => 255, 622 => 254, 620 => 253, 617 => 252, 611 => 249, 608 => 248, 606 => 247, 604 => 246, 602 => 245, 596 => 242, 584 => 233, 580 => 231, 578 => 230, 575 => 229, 573 => 228, 570 => 227, 564 => 224, 556 => 220, 554 => 219, 551 => 218, 549 => 217, 545 => 215, 538 => 211, 531 => 206, 528 => 205, 519 => 201, 511 => 195, 508 => 194, 505 => 193, 496 => 189, 489 => 184, 486 => 183, 477 => 179, 470 => 174, 468 => 173, 465 => 172, 458 => 168, 451 => 163, 449 => 162, 444 => 159, 438 => 156, 435 => 155, 433 => 154, 429 => 153, 425 => 152, 419 => 148, 417 => 147, 407 => 140, 399 => 134, 392 => 130, 383 => 124, 379 => 123, 373 => 119, 359 => 118, 356 => 117, 339 => 116, 336 => 115, 333 => 114, 319 => 113, 316 => 112, 299 => 111, 294 => 109, 290 => 107, 280 => 106, 268 => 103, 260 => 98, 250 => 90, 247 => 87, 246 => 86, 243 => 83, 242 => 82, 240 => 81, 232 => 75, 224 => 72, 220 => 70, 218 => 69, 213 => 67, 201 => 57, 198 => 54, 197 => 53, 194 => 50, 193 => 49, 191 => 48, 187 => 46, 179 => 43, 175 => 41, 173 => 40, 168 => 38, 160 => 35, 155 => 32, 153 => 30, 152 => 29, 148 => 26, 145 => 25, 135 => 24, 114 => 23, 100 => 18, 96 => 16, 93 => 15, 90 => 14, 87 => 13, 85 => 12, 81 => 10, 78 => 9, 68 => 8, 57 => 1, 55 => 5, 54 => 4, 52 => 3, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% set currentRoute = app.request.attributes.get('_route') %}
{% set has_front_access = is_granted('FRONT_ACCESS', {
'training': sub,
}) %}
{% block before_navbar %}
{% if currentRoute == 'manager_channel_training_show' %}
<div style=\"background-color: #E9F8F8;\" class=\"p-2 justify-content-center align-items-center d-flex flex-column flex-md-row text-center\">
{% set headerReturnLink = null %}
{% if currentRoute == 'manager_channel_training_show' %}
{% set headerReturnLink = path('manager_channel_trainings', {'channelId': channel.id}) %}
{% endif %}
<div style=\"font-weight: bold; color: #212B7A\" class=\"mx-1\">Vous êtes en mode visualisation de l'interface pour les administrateurs.</div>
<div style=\"font-weight: bold\"><a href=\"{{- headerReturnLink -}}\" style=\"text-decoration: underline\">Revenir à la page d'administration</a></div>
</div>
{% endif %}
{% endblock before_navbar %}
{% block title %}{{ sub.name }} - {{ parent() }}{% endblock %}
{% block content %}
{% set advice_avg = sub|advice_avg_by_training %}
<div class=\"jumbotron-v2 mb-4\">
<div class=\"container\">
<h2 class=\"v2-title-big\">
{{- 'front.scholar.training.show.title.label'|trans({
'%name%': sub.name,
}) -}}
</h2>
<div class=\"md-none\">
<div class=\"info-content mt-4 {% if advice_avg is same as null %} info-without-advice {% endif %}\">
<div>
<i class=\"fas fa-users\"></i>
<p>{{ sub|countCursusForTraining }}</p>
</div>
{% if advice_avg is not same as null %}
<div>
<i class=\"fas fa-star\"></i>
<p>{{ advice_avg }} ({{ sub|get_count_advice_training }})</p>
</div>
{% endif %}
<div class=\"dot-div\"></div>
<div>
{% if sub.updatedAt is not null %}
{{- 'front.scholar.training.show.createdAt.label'|trans({
'%date%': sub.updatedAt|format_datetime('long', locale=app.request.locale),
})|raw -}}
{% else %}
{{- 'front.scholar.training.show.createdAt.label'|trans({
'%date%': sub.createdAt|format_datetime('long', locale=app.request.locale),
})|raw -}}
{% endif %}
</div>
</div>
</div>
<div class=\"md-set\">
<div class=\"info-content mt-4\">
<div>
<div>
<i class=\"fas fa-users\"></i>
<p>{{ sub|countCursusForTraining }}</p>
</div>
{% if advice_avg is not same as null %}
<div class=\"info-content-stars\">
<i class=\"fas fa-star\"></i>
<p>{{ advice_avg }} ({{ sub|get_count_advice_training }})</p>
</div>
{% endif %}
</div>
<div class=\"mt-2\">
<div class=\"dot-div\">
<i class=\"fas fa-circle\"></i>
</div>
<div>
{% if sub.updatedAt is not null %}
{{- 'front.scholar.training.show.createdAt.label'|trans({
'%date%': sub.updatedAt|format_datetime('long', locale=app.request.locale),
})|raw -}}
{% else %}
{{- 'front.scholar.training.show.createdAt.label'|trans({
'%date%': sub.createdAt|format_datetime('long', locale=app.request.locale),
})|raw -}}
{% endif %}
</div>
</div>
</div>
</div>
<div class=\"description mt-4\">
<p>{{ sub.description }}</p>
</div>
</div>
</div>
{{ parent() }}
{% endblock content %}
{% block inner_content %}
<div class=\"row\">
<div class=\"col-lg-9 col-md-8 mb-3\">
<h2 class=\"v2-title-small mt-5\">{{ 'front.scholar.training.show.sub_title.programm.label'|trans }}</h2>
<div id=\"accordion\" class=\"accordion-nellapp mt-5\">
{% for module in firstModules %}
{% include 'Front/Scholar/Training/Partial/accordion-item.html.twig' with {'module' : module, 'loop': loop, 'training' : sub} %}
{% endfor %}
{% if lastModules|length %}
<div class=\"more-module\" style=\"display: none\">
{% for module in lastModules %}
{% include 'Front/Scholar/Training/Partial/accordion-item.html.twig' with {'module' : module, 'loop': loop, 'training': sub} %}
{% endfor %}
</div>
<div class=\"w100-flex-center-x mt-3 div-btn-see-more\">
<button class=\"btn-see-more-v2\"
data-btn-more-module=\"true\">
{{ 'front.scholar.training.list.button.see_more.label'|trans }}
5/{{ 5 + lastModules|length }}
</button>
</div>
<div class=\"w100-flex-center-x mt-3 div-btn-see-less\" style=\"display: none\">
<button class=\"btn-see-more-v2\"
data-btn-less-module=\"true\">
{{ 'front.scholar.training.list.button.see_less.label'|trans }}
</button>
</div>
{% endif %}
</div>
</div>
<div class=\"col-lg-3 col-md-4 order-first order-md-last\">
<div class=\"card-elevation-training\">
<div class=\"\" style=\"background-color: #f0f8f8;border-radius: 6px;text-align: center;\">
<img class=\"img-top-card\" src=\"{{ sub|get_training_img_url }}\">
</div>
<div class=\"card-body\">
<div class=\"channel-name d-flex\">
<div>
<div class=\"img-logo-rounded\">
{% include 'Front/Channel/Image/_image_main_avatar.html.twig' with {'channel': sub.ownerChannel} %}
</div>
</div>
<div class=\"channel-description\">
<a href=\"{{ path('front_channel_show', {'channelId' : sub.ownerChannel.id }) }}\"
class=\"font-weight-bold\">{{ sub.ownerChannel.name }}</a>
{% if sub.ownerChannel.slogan is not empty %}
<p class=\"small\">
{{ sub.ownerChannel.slogan }}
</p>
{% endif %}
</div>
</div>
<div class=\"training-stats mt-4\">
{% if sub.trainingType is not null %}
<div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-book-open\"></i>
</div>
<p>{{ sub | get_training_type_key | trans }}</p>
</div>
</div>
{% endif %}
{% if sub.totalHourDescription is not null %}
<div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-stopwatch\"></i>
</div>
<p>{{ sub.totalHourDescription }} {{ 'front.scholar.training.show.card.total_hour.label'|trans }}</p>
</div>
</div>
{% endif %}
{% if sub.videoDescription is not null %}
<div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-file-video\"></i>
</div>
<p>{{ sub.videoDescription }} {{ 'front.scholar.training.show.card.video_time.label'|trans }}</p>
</div>
</div>
{% endif %}
{% set count_exercises = sub|count_exercises_by_training %}
{% if count_exercises != 0 %}
<div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"far fa-list-alt\"></i>
</div>
<p>{{ count_exercises }} {{ 'front.scholar.training.show.card.use_case.label'|trans }}</p>
</div>
</div>
{% endif %}
{% if sub.diplomaDescription is not null %}
<div class=\"row mt-3\">
<div class=\"col-12 content-stat\">
<div>
<i class=\"fas fa-graduation-cap\"></i>
</div>
<p>{{ sub.diplomaDescription }}</p>
</div>
</div>
{% endif %}
</div>
{% if sub.trainingProduct is not null and not has_front_access %}
<div class=\"mt-4 w100-flex-center-x\">
{% set value = sub.trainingProduct.price * 1 %}
<p class=\"price-card-training\">{{ 'front.scholar.training.show.card.price.label'|trans({'%price%' : value}) }}
*</p>
</div>
<div class=\"mt-2 w100-flex-center-x\">
<p class=\"price-note-card-training\">{{ 'front.scholar.training.show.card.price.note'|trans({'%funding_contact_path%' : path('front_channel_training_payment_funding_contact', {'training_id': sub.id})}) | raw }}</p>
</div>
{% endif %}
{% if not sub.public and currentRoute == 'front_channel_training_show' %}
<div class=\"text-center mt-4 div-btn-card-show-training d-flex flex-column\">
{% if has_front_access %}
<div class=\"w100-flex-center-x\">
<div class=\"progress-circle\">
<div class=\"c100 p{{ trainingProgression.progression }} blue light-green-fill medium\">
<div class=\"slice\">
<div class=\"bar\"></div>
<div class=\"fill\"></div>
</div>
</div>
</div>
</div>
<div class=\"mb-2 training-progress-percent\">
{{ trainingProgression.progression }} %
</div>
{% if nellapp_url_exist('core', 'app_account_show_cursus') and cursus is defined and cursus is not null %}
<a href=\"{{ nellapp_url('core', 'app_account_show_cursus', {
'cursusId': cursus.id
}) }}\"
class=\"see-training-progress-link\">{{ 'front.scholar.training.show.card.progression.link.label' | trans }}
</a>
{% endif %}
{% set lastChapterAchieved = getLastAchievedChapter(sub) %}
{% if lastChapterAchieved is not null %}
<a href=\"{{ path('front_channel_chapter_show', {
'trainingId': lastChapterAchieved['trainingId'],
'moduleId': lastChapterAchieved['moduleId'],
'lessonId': lastChapterAchieved['lessonId'],
'chapterId': lastChapterAchieved['chapterId'],
}) }}\"
class=\"btn-nellapp-v2 mt-3 d-inline-block\">
{{ 'front.scholar.training.show.card.continue_btn.label' | trans }}
</a>
{% endif %}
{% else %}
<a href=\"{{ path('front_channel_training_payment_funding_contact', {'training_id': sub.id}) }}\"
class=\"btn btn-nellapp-v2\">
{{ 'front.scholar.training.show.actions.follow.label'|trans }}
</a>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% if training_descriptions|length > 0 %}
<div class=\"row\">
<div class=\"col-12\">
<h2 class=\"v2-title-small mt-5 mb-2\">{{ 'front.scholar.training.show.sub_title.plus.label'|trans }}</h2>
</div>
<div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
{% for description in training_descriptions %}
<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6 mt-4\">
{% include 'Front/Scholar/Card/training-description.html.twig' with {'description' : description} %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class=\"row mt-3\">
<div class=\"col-12\">
<h2 class=\"v2-title-small mt-5 mb-2\">{{ 'front.scholar.training.show.sub_title.channel.label'|trans }}</h2>
</div>
<div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"mt-3\">
{% include 'Front/Scholar/Card/channel.html.twig' with {'channel' : sub.ownerChannel} %}
</div>
</div>
</div>
</div>
</div>
{% if teacher_entities|length > 0 %}
<div class=\"row mt-3\">
<div class=\"col-12\">
<h2 class=\"v2-title-small mt-5 mb-2\">{{ 'front.scholar.training.show.sub_title.teacher.label'|trans }}
({{ teacher_entities|length }})</h2>
</div>
</div>
{% for teacher in teacher_entities %}
<div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"mt-3\">
{% include 'Front/Scholar/Card/teacher.html.twig' with {'teacher' : teacher} %}
</div>
</div>
</div>
</div>
{% endfor %}
{% endif %}
{% if training_advices is defined and training_advices|length > 0 %}
<div class=\"row mt-3 mb-5\">
<div class=\"col-lg-9 col-md-8\">
<div class=\"row\">
<div class=\"col-12\">
<div class=\"div-title-between mt-5 mb-2\">
<h2 class=\"v2-title-small\">{{ 'front.scholar.training.show.sub_title.advice.label'|trans }}
({{ training_advices|length }})</h2>
<p class=\"\"><i class=\"far fa-star\"></i> {{ advice_avg }}</p>
</div>
</div>
<div class=\"col-12\">
<div class=\"mt-3\">
{% set adviceCount = 1 %}
{% set break = false %}
{% for advice in training_advices %}
{% if not break %}
{% include 'Front/Scholar/Card/advice.html.twig' with {'advice' : advice} %}
{% set adviceCount = adviceCount + 1 %}
{% if adviceCount == 6 %}
{% set break = true %}
{% endif %}
{% endif %}
{% endfor %}
{% set adviceCount = 1 %}
{% if training_advices|length > 5 %}
<div class=\"div-more-advice\">
{% for advice in training_advices %}
{% set adviceCount = adviceCount + 1 %}
{% if adviceCount > 6 %}
{% include 'Front/Scholar/Card/advice.html.twig' with {'advice' : advice} %}
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% if form is defined and app.user %}
<div class=\"row\">
<div class=\"col-lg-9 col-md-8\">
<p class=\"small-description\">{{ 'front.scholar.training.show.sub_title.advice.sentence.enter_key.label'|trans }}</p>
</div>
</div>
<div class=\"row\" {% if advice_user is defined and advice_user is not null %} {% if advice_user.note is not null %}data-advice-current-note=\"{{ advice_user.note }}\"{% endif %}{% endif %}>
<div class=\"col-lg-9 col-md-8 mt-1\">
<div class=\"form-advice-content\">
<div class=\"avatar-rounded\">{{ app.user|user_avatar }}</div>
<div class=\"form-advice-bg-gray\">
{{ form_start(form) }}
<div style=\"display: none\">
{{ form_widget(form.note) }}
</div>
{{ form_widget(form.comment) }}
{{ form_errors(form.comment) }}
{{ form_end(form) }}
<div class=\"stars-rating\">
<i class=\"far fa-star\" data-rating=\"1\"></i>
<i class=\"far fa-star\" data-rating=\"2\"></i>
<i class=\"far fa-star\" data-rating=\"3\"></i>
<i class=\"far fa-star\" data-rating=\"4\"></i>
<i class=\"far fa-star\" data-rating=\"5\"></i>
</div>
<div class=\"center-y ml-2\">
<span id=\"span-nb-note-advice\">0</span>
</div>
</div>
</div>
</div>
</div>
{% if advice_user is not null %}
{% if advice_user.id is not null %}
<div class=\"row\">
<div class=\"col-lg-9 col-md-8 mt-1\">
<div class=\"w100-flex-end-x\">
<a class=\"delete-btn-advice\"
href=\"{{ path('front_training_advice_delete', {'id' : advice_user.id}) }}\">{{ 'front.scholar.training.show.sub_title.advice.action.delete.label'|trans }}</a>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endif %}
{% if training_advices is defined and training_advices|length > 5 %}
<div class=\"row\">
<div class=\"col-lg-9 col-md-8 mt-5\">
<div class=\"w100-flex-center-x\">
<button class=\"see-more-btn\"
id=\"training-advice-see-more\">{{ 'front.scholar.training.advice.see_more.label'|trans({'%count%': training_advices|length}) }}</button>
</div>
</div>
</div>
{% endif %}
<div class=\"empty-div-bottom\"></div>
{% endblock inner_content %}
{% block body %}
{{ parent() }}
{% if is_granted('CHANNEL_USER_PERM_TRAINING_SHOW', sub) %}
<div class=\"modal fade\" id=\"delete-modal\" tabindex=\"-1\" role=\"dialog\"
aria-labelledby=\"delete-modal-label\" aria-hidden=\"true\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"delete-modal-label\">
{{ 'front.scholar.training.show.actions.delete.modal.title.label'|trans({
'%name%': sub.name,
})|raw }}
</h5>
</div>
<div class=\"modal-body\">
{{ 'front.scholar.training.show.actions.delete.modal.body.label'|trans({
'%name%': sub.name,
})|raw }}
</div>
<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-link\" data-dismiss=\"modal\">
{{ 'front.scholar.training.show.actions.delete.modal.cancel.label'|trans }}
</button>
<a href=\"{{ path('front_channel_training_delete', {'id': sub.id, 'channelId': channel.id}) }}\"
class=\"btn btn-danger btn-raised\">
{{ 'front.scholar.training.show.actions.delete.modal.delete.label'|trans }}
</a>
</div>
</div>
</div>
</div>
{% endif %}
{% endblock body %}
", "Front/Scholar/Training/show.html.twig", "/var/www/html/templates/Front/Scholar/Training/show.html.twig");
}
}