<?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;
/* website/product/product-detail-course-content-section.html.twig */
class __TwigTemplate_6bc207429904ec0ec0dc28841b1ec5f9abf9ce8d49ad186b270f34fac39712ab extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "website/product/product-detail-course-content-section.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "website/product/product-detail-course-content-section.html.twig"));
// line 1
$macros["__internal_779687c9a693c9d1c1784d8d4a73f46c92c0d2c51493644d3e50e6f1afb8b9d5"] = $this->macros["__internal_779687c9a693c9d1c1784d8d4a73f46c92c0d2c51493644d3e50e6f1afb8b9d5"] = $this->loadTemplate("utils.html.twig", "website/product/product-detail-course-content-section.html.twig", 1)->unwrap();
// line 2
echo "
";
// line 3
$context["icosLibrary"] = [1 => "globe", 2 => "file-text", 3 => "sound", 4 => "file-text", 5 => "video", 6 => "video", 7 => "video", 8 => "video", 9 => "video"];
// line 14
echo "
";
// line 15
$context["libEnum"] = [1 => "CONTENT_EMBED", 2 => "CONTENT_FILES", 3 => "CONTENT_AUDIO", 4 => "CONTENT_TEXT", 5 => "CONTENT_VIDEO", 6 => "CONTENT_LIVE", 7 => "CONTENT_CONFERENCE", 8 => "CONTENT_VIDEO_FILE", 9 => "CONTENT_EXTERNAL_LIVE", 10 => "CONTENT_NEW_LIVE"];
// line 27
echo "
";
// line 28
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["lessonModules"]) || array_key_exists("lessonModules", $context) ? $context["lessonModules"] : (function () { throw new RuntimeError('Variable "lessonModules" does not exist.', 28, $this->source); })())), 0))) {
// line 29
echo " ";
$context["total"] = twig_length_filter($this->env, (isset($context["lessonModules"]) || array_key_exists("lessonModules", $context) ? $context["lessonModules"] : (function () { throw new RuntimeError('Variable "lessonModules" does not exist.', 29, $this->source); })()));
// line 30
echo " ";
$context["resta"] = ((isset($context["total"]) || array_key_exists("total", $context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.', 30, $this->source); })()) - (isset($context["show"]) || array_key_exists("show", $context) ? $context["show"] : (function () { throw new RuntimeError('Variable "show" does not exist.', 30, $this->source); })()));
// line 31
echo " <h3 class=\"tit-sec\">";
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("content", "product"), "html", null, true);
echo "</h3>
<div id=\"contem-modulos\" class=\"perguntas\">
";
// line 33
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["lessonModules"]) || array_key_exists("lessonModules", $context) ? $context["lessonModules"] : (function () { throw new RuntimeError('Variable "lessonModules" does not exist.', 33, $this->source); })()));
foreach ($context['_seq'] as $context["i"] => $context["lessonModule"]) {
// line 34
echo " ";
$context["n"] = ($context["i"] + 1);
// line 35
echo " ";
if ((0 === twig_compare((isset($context["n"]) || array_key_exists("n", $context) ? $context["n"] : (function () { throw new RuntimeError('Variable "n" does not exist.', 35, $this->source); })()), ((isset($context["show"]) || array_key_exists("show", $context) ? $context["show"] : (function () { throw new RuntimeError('Variable "show" does not exist.', 35, $this->source); })()) + 1)))) {
echo "<div class=\"js--hidden\">";
}
// line 36
echo " <div class=\"questao";
echo (((0 >= twig_compare((isset($context["n"]) || array_key_exists("n", $context) ? $context["n"] : (function () { throw new RuntimeError('Variable "n" does not exist.', 36, $this->source); })()), (isset($context["open"]) || array_key_exists("open", $context) ? $context["open"] : (function () { throw new RuntimeError('Variable "open" does not exist.', 36, $this->source); })())))) ? (" status--aberto") : (""));
echo "\">
<div class=\"pergunta js--abre\">
<p>
<span class=\"question-number\">";
// line 39
echo twig_escape_filter($this->env, (isset($context["n"]) || array_key_exists("n", $context) ? $context["n"] : (function () { throw new RuntimeError('Variable "n" does not exist.', 39, $this->source); })()), "html", null, true);
echo "</span>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["lessonModule"], "title", [], "any", false, false, false, 39), "html", null, true);
echo "
";
// line 40
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["lessonModule"], "workload", [], "any", false, false, false, 40));
foreach ($context['_seq'] as $context["k"] => $context["workload"]) {
// line 41
echo " ";
if ((1 === twig_compare($context["workload"], 0))) {
// line 42
echo " <span class=\"workload\">
<span class=\"ico-clock\">";
// line 43
echo twig_call_macro($macros["__internal_779687c9a693c9d1c1784d8d4a73f46c92c0d2c51493644d3e50e6f1afb8b9d5"], "macro_ico", ["clock"], 43, $context, $this->getSourceContext());
echo "</span>";
echo twig_escape_filter($this->env, $context["workload"], "html", null, true);
echo "
";
// line 44
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->plural($context["workload"], $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("workload_hour", "product"), $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("workload_hours", "product")), "html", null, true);
// line 47
echo "
</span>
";
}
// line 50
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['k'], $context['workload'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 51
echo " </p>
<span class=\"ico seta\">";
// line 52
echo twig_call_macro($macros["__internal_779687c9a693c9d1c1784d8d4a73f46c92c0d2c51493644d3e50e6f1afb8b9d5"], "macro_ico", ["chevron-down"], 52, $context, $this->getSourceContext());
echo "</span>
</div>
<div class=\"resposta product-content js--sub\">
";
// line 55
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["lessonModule"], "description", [], "any", false, false, false, 55))) {
// line 56
echo " ";
if ((0 !== twig_compare(twig_get_attribute($this->env, $this->source, $context["lessonModule"], "description", [], "any", false, false, false, 56), "null"))) {
// line 57
echo " <div class=\"desc\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["lessonModule"], "description", [], "any", false, false, false, 57), "html", null, true);
echo "</div>
";
}
// line 59
echo " ";
}
// line 60
echo " <ul class=\"lessons\">
";
// line 61
$context["paged"] = [0 => $this->extensions['EADPlataforma\Twig\FunctionsExtension']->enum("LibraryEnum::CONTENT_FILES"), 1 => $this->extensions['EADPlataforma\Twig\FunctionsExtension']->enum("LibraryEnum::CONTENT_TEXT")];
// line 62
echo " ";
$context["isPaged"] = false;
// line 63
echo "
";
// line 64
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["lessonModule"], "lessons", [], "any", false, false, false, 64));
foreach ($context['_seq'] as $context["j"] => $context["lesson"]) {
// line 65
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["lesson"], "library", [], "any", false, false, false, 65)) {
// line 66
echo " <li class=\"lesson\">
";
// line 67
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["lesson"], "library", [], "any", false, true, false, 67), "type", [], "any", true, true, false, 67)) {
// line 68
echo " ";
if (((1 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["lesson"], "library", [], "any", false, false, false, 68), "type", [], "any", false, false, false, 68), 0)) && (-1 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["lesson"], "library", [], "any", false, false, false, 68), "type", [], "any", false, false, false, 68), 10)))) {
// line 69
echo " <i class=\"ico\">";
echo twig_call_macro($macros["__internal_779687c9a693c9d1c1784d8d4a73f46c92c0d2c51493644d3e50e6f1afb8b9d5"], "macro_ico", [twig_get_attribute($this->env, $this->source, (isset($context["icosLibrary"]) || array_key_exists("icosLibrary", $context) ? $context["icosLibrary"] : (function () { throw new RuntimeError('Variable "icosLibrary" does not exist.', 69, $this->source); })()), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["lesson"], "library", [], "any", false, false, false, 69), "type", [], "any", false, false, false, 69), [], "array", false, false, false, 69)], 69, $context, $this->getSourceContext());
echo "</i>
";
}
// line 71
echo " ";
}
// line 72
echo "
<p class=\"title\">";
// line 73
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["lesson"], "title", [], "any", false, false, false, 73), "html", null, true);
echo "</p>
";
// line 75
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["lesson"], "library", [], "any", false, true, false, 75), "type", [], "any", true, true, false, 75)) {
// line 76
echo " ";
$context["isPaged"] = ((twig_in_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["lesson"], "library", [], "any", false, false, false, 76), "type", [], "any", false, false, false, 76), (isset($context["paged"]) || array_key_exists("paged", $context) ? $context["paged"] : (function () { throw new RuntimeError('Variable "paged" does not exist.', 76, $this->source); })()))) ? (true) : (false));
// line 77
echo " ";
}
// line 78
echo "
";
// line 79
if ( !(isset($context["isPaged"]) || array_key_exists("isPaged", $context) ? $context["isPaged"] : (function () { throw new RuntimeError('Variable "isPaged" does not exist.', 79, $this->source); })())) {
// line 80
echo " <span class=\"ico\">";
echo twig_call_macro($macros["__internal_779687c9a693c9d1c1784d8d4a73f46c92c0d2c51493644d3e50e6f1afb8b9d5"], "macro_ico", ["clock"], 80, $context, $this->getSourceContext());
echo "</span>
";
}
// line 82
echo "
<p class=\"size\">
";
// line 84
echo twig_call_macro($macros["__internal_779687c9a693c9d1c1784d8d4a73f46c92c0d2c51493644d3e50e6f1afb8b9d5"], "macro_libraryDuration", [$context["lesson"]], 84, $context, $this->getSourceContext());
echo "
</p>
";
// line 86
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["lesson"], "demonstration", [], "any", false, false, false, 86), $this->extensions['EADPlataforma\Twig\FunctionsExtension']->enum("LessonEnum::YES")))) {
// line 87
echo " <p class=\"acao\">
<a class=\"btn-watch\" href=\"";
// line 88
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("lessonDemoPage", ["lessonId" => twig_get_attribute($this->env, $this->source, $context["lesson"], "id", [], "any", false, false, false, 88), "productOfferId" => twig_get_attribute($this->env, $this->source, (isset($context["productOffer"]) || array_key_exists("productOffer", $context) ? $context["productOffer"] : (function () { throw new RuntimeError('Variable "productOffer" does not exist.', 88, $this->source); })()), "id", [], "any", false, false, false, 88)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("watch", "product"), "html", null, true);
echo "</a>
</p>
";
}
// line 91
echo " </li>
";
}
// line 93
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['j'], $context['lesson'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 94
echo " </ul>
</div>
</div>
";
// line 97
if ((0 === twig_compare((isset($context["n"]) || array_key_exists("n", $context) ? $context["n"] : (function () { throw new RuntimeError('Variable "n" does not exist.', 97, $this->source); })()), (isset($context["total"]) || array_key_exists("total", $context) ? $context["total"] : (function () { throw new RuntimeError('Variable "total" does not exist.', 97, $this->source); })())))) {
echo "</div>";
}
// line 98
echo " ";
// line 99
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['i'], $context['lessonModule'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 100
echo "
";
// line 102
echo " ";
if ((1 === twig_compare((isset($context["resta"]) || array_key_exists("resta", $context) ? $context["resta"] : (function () { throw new RuntimeError('Variable "resta" does not exist.', 102, $this->source); })()), 0))) {
// line 103
echo " ";
$context["label"] = (((0 === twig_compare((isset($context["resta"]) || array_key_exists("resta", $context) ? $context["resta"] : (function () { throw new RuntimeError('Variable "resta" does not exist.', 103, $this->source); })()), 1))) ? ("module") : ("modules"));
// line 104
echo " <div class=\"modulos-mais\">
<a id=\"btn-modulos-mostrar\" class=\"btn-mais\">
<span class=\"js--shown\">";
// line 106
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("more", "product"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, (isset($context["resta"]) || array_key_exists("resta", $context) ? $context["resta"] : (function () { throw new RuntimeError('Variable "resta" does not exist.', 106, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage((isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 106, $this->source); })()), "product"), "html", null, true);
echo "</span>
<span class=\"js--hidden\">";
// line 107
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("hide", "product"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, (isset($context["resta"]) || array_key_exists("resta", $context) ? $context["resta"] : (function () { throw new RuntimeError('Variable "resta" does not exist.', 107, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage((isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 107, $this->source); })()), "product"), "html", null, true);
echo "</span>
</a>
</div>
";
}
// line 111
echo " </div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "website/product/product-detail-course-content-section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 292 => 111, 281 => 107, 273 => 106, 269 => 104, 266 => 103, 263 => 102, 260 => 100, 254 => 99, 252 => 98, 248 => 97, 243 => 94, 237 => 93, 233 => 91, 225 => 88, 222 => 87, 220 => 86, 215 => 84, 211 => 82, 205 => 80, 203 => 79, 200 => 78, 197 => 77, 194 => 76, 192 => 75, 187 => 73, 184 => 72, 181 => 71, 175 => 69, 172 => 68, 170 => 67, 167 => 66, 164 => 65, 160 => 64, 157 => 63, 154 => 62, 152 => 61, 149 => 60, 146 => 59, 140 => 57, 137 => 56, 135 => 55, 129 => 52, 126 => 51, 120 => 50, 115 => 47, 113 => 44, 107 => 43, 104 => 42, 101 => 41, 97 => 40, 91 => 39, 84 => 36, 79 => 35, 76 => 34, 72 => 33, 66 => 31, 63 => 30, 60 => 29, 58 => 28, 55 => 27, 53 => 15, 50 => 14, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% from 'utils.html.twig' import ico, libraryDuration %}
{% set icosLibrary = {
1: 'globe',
2: 'file-text',
3: 'sound',
4: 'file-text',
5: 'video',
6: 'video',
7: 'video',
8: 'video',
9: 'video'
} %}
{% set libEnum = {
1: 'CONTENT_EMBED',
2: 'CONTENT_FILES',
3: 'CONTENT_AUDIO',
4: 'CONTENT_TEXT',
5: 'CONTENT_VIDEO',
6: 'CONTENT_LIVE',
7: 'CONTENT_CONFERENCE',
8: 'CONTENT_VIDEO_FILE',
9: 'CONTENT_EXTERNAL_LIVE',
10: 'CONTENT_NEW_LIVE'
} %}
{% if lessonModules|length > 0 %}
{% set total = lessonModules|length %}
{% set resta = total-show %}
<h3 class=\"tit-sec\">{{ getLanguage('content', 'product') }}</h3>
<div id=\"contem-modulos\" class=\"perguntas\">
{% for i, lessonModule in lessonModules %}
{% set n = i+1 %}
{% if (n == show + 1) %}<div class=\"js--hidden\">{% endif %}
<div class=\"questao{{ n <= open ? ' status--aberto' }}\">
<div class=\"pergunta js--abre\">
<p>
<span class=\"question-number\">{{ n }}</span>{{ lessonModule.title }}
{% for k, workload in lessonModule.workload %}
{% if workload > 0 %}
<span class=\"workload\">
<span class=\"ico-clock\">{{ ico('clock') }}</span>{{ workload }}
{{ plural(workload,
getLanguage('workload_hour', 'product'),
getLanguage('workload_hours', 'product')
)}}
</span>
{% endif %}
{% endfor %}
</p>
<span class=\"ico seta\">{{ ico('chevron-down') }}</span>
</div>
<div class=\"resposta product-content js--sub\">
{% if lessonModule.description is not empty %}
{% if lessonModule.description != \"null\" %}
<div class=\"desc\">{{ lessonModule.description }}</div>
{% endif %}
{% endif %}
<ul class=\"lessons\">
{% set paged = [enum('LibraryEnum::CONTENT_FILES'), enum('LibraryEnum::CONTENT_TEXT')] %}
{% set isPaged = false %}
{% for j, lesson in lessonModule.lessons %}
{% if lesson.library %}
<li class=\"lesson\">
{% if lesson.library.type is defined %}
{% if lesson.library.type > 0 and lesson.library.type < 10 %}
<i class=\"ico\">{{ ico(icosLibrary[lesson.library.type]) }}</i>
{% endif %}
{% endif %}
<p class=\"title\">{{ lesson.title }}</p>
{% if lesson.library.type is defined %}
{% set isPaged = (lesson.library.type in paged ? true : false) %}
{% endif %}
{% if not isPaged %}
<span class=\"ico\">{{ ico('clock') }}</span>
{% endif %}
<p class=\"size\">
{{ libraryDuration(lesson) }}
</p>
{% if lesson.demonstration == enum('LessonEnum::YES') %}
<p class=\"acao\">
<a class=\"btn-watch\" href=\"{{ path('lessonDemoPage', { lessonId: lesson.id, productOfferId: productOffer.id }) }}\">{{ getLanguage('watch', 'product') }}</a>
</p>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
{% if (n == total) %}</div>{% endif %}
{# -/ .js--hidden #}
{% endfor %}
{# MOSTRAR MAIS #}
{% if resta > 0 %}
{% set label = (resta == 1)?'module':'modules' %}
<div class=\"modulos-mais\">
<a id=\"btn-modulos-mostrar\" class=\"btn-mais\">
<span class=\"js--shown\">{{ getLanguage('more', 'product') }} {{ resta }} {{ getLanguage(label, 'product') }}</span>
<span class=\"js--hidden\">{{ getLanguage('hide', 'product') }} {{ resta }} {{ getLanguage(label, 'product') }}</span>
</a>
</div>
{% endif %}
</div>
{% endif %}
", "website/product/product-detail-course-content-section.html.twig", "/var/www/html/templates/website/product/product-detail-course-content-section.html.twig");
}
}