<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* @ScoreCms/Public/default/document.html.twig */
class __TwigTemplate_b3ed0cff362709176152ced2cce2ebb4 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return $this->load($this->env->getRuntime('Score\CmsBundle\Twig\AppRuntime')->getTemplate(), 1);
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ScoreCms/Public/default/document.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ScoreCms/Public/default/document.html.twig"));
yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
// line 4
yield " ";
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 4, $this->source); })()), "name", [], "any", false, false, false, 4), "html", null, true);
yield " | ";
yield from $this->yieldParentBlock("title", $context, $blocks);
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 7
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_stylesheets(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 8
yield " ";
yield (string) Twig\Extension\CoreExtension::join(Twig\Extension\CoreExtension::filter($this->env, $this->env->hasExtension(\Twig\Extension\SandboxExtension::class) && $this->env->getExtension(\Twig\Extension\SandboxExtension::class)->isSandboxed($this->source), CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 8, $this->source); })()), "metatags", [], "any", false, false, false, 8), function ($__mTag__) use ($context, $macros) { $context["mTag"] = $__mTag__; return (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["mTag"]) || array_key_exists("mTag", $context) ? $context["mTag"] : (function () { throw new RuntimeError('Variable "mTag" does not exist.', 8, $this->source); })()), "metatagPattern", [], "any", false, false, false, 8), "type", [], "any", false, false, false, 8) === "head"); }), "
");
yield "
";
// line 9
yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 12
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 13
yield "
";
// line 14
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
<script type=\"text/javascript\">
let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
// with jQuery
let el = \$(`[data-domain=\"\${hash}\"]`)
if (el.length) {
//el.addClass(\"govuk-accordion__section--expanded\")
el.find(\"button.accordion-button\").removeClass(\"collapsed\").attr(\"aria-expanded\", \"true\")
el.find(\".accordion-collapse\").addClass(\"show\")
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 28
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 29
yield " <div class=\"container py-3\">
<div class=\"row govuk-grid-row\">
<div class=\"col govuk-grid-column\">
<h1 class=\"govuk-heading-xl\">";
// line 32
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 32, $this->source); })()), "name", [], "any", false, false, false, 32), "html", null, true);
yield "</h1>
<div class=\"govuk-body\">
";
// line 34
yield (string) $this->env->getRuntime('Score\CmsBundle\Twig\AppRuntime')->updateDocumentLinks(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 34, $this->source); })()), "description", [], "any", false, false, false, 34));
yield "
</div>
";
// line 36
if ((($tmp = Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 36, $this->source); })()), "blockJoints", [], "any", false, false, false, 36))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 37
yield " <div class=\"govuk-body\">
";
// line 38
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 38, $this->source); })()), "blockJoints", [], "any", false, false, false, 38));
$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["blockJoint"]) {
// line 39
yield " ";
yield (string) Twig\Extension\CoreExtension::include($this->env, $context, "@ScoreCms/Public/default/_block.html.twig", ["blockJoint" => $context["blockJoint"]]);
yield "
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['blockJoint'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 41
yield " </div>
";
}
// line 43
yield "
";
// line 44
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 44, $this->source); })()), "documentDescriptions", [], "any", false, false, false, 44)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 45
yield " <div class=\"govuk-body\">
<h3>Popisy za oblasti</h3>
<div class=\"govuk-accordion accordion\" data-module=\"idsk-accordion\"
id=\"accordion_";
// line 48
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 48, $this->source); })()), "id", [], "any", false, false, false, 48), "html", null, true);
yield "\" data-attribute=\"value\">
<div class=\"controls d-none govuk-accordion__controls\">
<button class=\"govuk-accordion__open-all\" data-open-title=\"Otvoriť všetky\"
data-close-title=\"Zatvoriť všetky\" type=\"button\" aria-expanded=\"false\">
<span class=\"govuk-visually-hidden govuk-accordion__controls-span\"
data-section-title=\"sekcie\"></span>
</button>
</div>
<div>
";
// line 57
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 57, $this->source); })()), "documentDescriptions", [], "any", false, false, false, 57));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 58
yield " <div class=\"accordion-item govuk-accordion__section\"
data-domain=\"";
// line 59
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "documentDomain", [], "any", false, false, false, 59), "seoName", [], "any", false, false, false, 59), "html", null, true);
yield "\">
<div class=\"govuk-accordion__section-header\">
<h2 class=\"accordion-header govuk-accordion__section-heading\">
<button class=\"accordion-button collapsed govuk-accordion__section-button\"
type=\"button\" data-bs-toggle=\"collapse\"
data-bs-target=\"#accordion_";
// line 64
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 64, $this->source); })()), "id", [], "any", false, false, false, 64) . "_") . CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 64)), "html", null, true);
yield "-content-1\"
aria-expanded=\"false\"
aria-controls=\"accordion_";
// line 66
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 66, $this->source); })()), "id", [], "any", false, false, false, 66) . "_") . CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 66)), "html", null, true);
yield "-content-1\">
\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"govuk-accordion_xxx_section-button\"
id=\"accordion_";
// line 68
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 68, $this->source); })()), "id", [], "any", false, false, false, 68) . "_") . CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 68)), "html", null, true);
yield "-heading-1\">
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 69
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "documentDomain", [], "any", false, false, false, 69), "name", [], "any", false, false, false, 69), "html", null, true);
yield "
\t\t\t\t\t\t\t\t\t\t\t\t</span>
</button>
</h2>
";
// line 76
yield " </div>
<div id=\"accordion_";
// line 77
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 77, $this->source); })()), "id", [], "any", false, false, false, 77) . "_") . CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 77)), "html", null, true);
yield "-content-1\"
class=\"accordion-collapse collapse govuk-accordion__section-content\"
aria-labelledby=\"accordion_";
// line 79
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 79, $this->source); })()), "id", [], "any", false, false, false, 79) . "_") . CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 79)), "html", null, true);
yield "-heading-1\"
data-bs-parent=\"#accordion_";
// line 80
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 80, $this->source); })()), "id", [], "any", false, false, false, 80), "html", null, true);
yield "\">
<div class=\x27accordion-body govuk-body\x27>
";
// line 82
yield (string) $this->env->getRuntime('Score\CmsBundle\Twig\AppRuntime')->updateDocumentLinks(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "description", [], "any", false, false, false, 82));
yield "
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 87
yield " </div>
</div>
</div>
<script type=\"text/javascript\">
{\t// IDSK accordion - je treba aktualizovat sessionstorage pred tym ako sa idsk initializuje!
let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
document.querySelectorAll(\x27.govuk-accordion .govuk-accordion__section\x27)?.forEach(function (el) {
sessionStorage.setItem(el.querySelector(`.govuk-accordion__section-content`)?.id || \"accordion\", hash === el.dataset.domain);
});
}
</script>
";
}
// line 99
yield "
";
// line 100
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 100, $this->source); })()), "actualFile", [], "any", false, false, false, 100)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 101
yield " <div class=\"govuk-body\">
";
// line 102
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 102, $this->source); })()), "icon", [], "any", false, false, false, 102)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 103
yield " <img src=\"";
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 103, $this->source); })()), "iconThumb", [], "any", false, false, false, 103), "html", null, true);
yield "\" class=\"img-fluid my-2\">
";
}
// line 105
yield " <h3>Stiahnuť dokument</h3>
<div>
<p>
";
// line 109
yield " ";
// line 110
yield " <a href=\"";
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("document-download-ext", ["seoId" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 110, $this->source); })()), "seoId", [], "any", false, false, false, 110), "ext" => Twig\Extension\CoreExtension::replace(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 110, $this->source); })()), "extension", [], "any", false, false, false, 110), ["." => ""])]), "html", null, true);
yield "\"
data-document-action=\"download\" download=\"";
// line 111
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 111, $this->source); })()), "seoId", [], "any", false, false, false, 111) . CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 111, $this->source); })()), "extension", [], "any", false, false, false, 111)), "html", null, true);
yield "\"
data-cms=\"document-link\">";
// line 112
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 112, $this->source); })()), "name", [], "any", false, false, false, 112) . CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 112, $this->source); })()), "info", [], "any", false, false, false, 112)), "html", null, true);
yield "</a>
</p>
</div>
</div>
";
}
// line 117
yield " <div class=\"govuk-body\">
<h3>Súvisiace dokumenty</h3>
<ul>
";
// line 120
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 120, $this->source); })()), "myRelevants", [], "any", false, false, false, 120));
$context['_iterated'] = false;
foreach ($context['_seq'] as $context["_key"] => $context["doc"]) {
// line 121
yield " ";
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "getHasDetail", [], "any", false, false, false, 121)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 122
yield " <li><a href=\"";
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("document", ["seoId" => CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "seoId", [], "any", false, false, false, 122)]), "html", null, true);
yield "\" data-document-action=\"show\"
data-cms=\"document-link\">";
// line 123
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "name", [], "any", false, false, false, 123), "html", null, true);
yield "</a>
</li>
";
} else {
// line 126
yield " <li>
<a href=\"";
// line 127
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("document-download-ext", ["seoId" => CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "seoId", [], "any", false, false, false, 127), "ext" => Twig\Extension\CoreExtension::replace(CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "extension", [], "any", false, false, false, 127), ["." => ""])]), "html", null, true);
yield "\"
data-document-action=\"download\" download=\"";
// line 128
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "seoId", [], "any", false, false, false, 128) . CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "extension", [], "any", false, false, false, 128)), "html", null, true);
yield "\"
data-cms=\"document-link\">";
// line 129
yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "name", [], "any", false, false, false, 129) . CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "info", [], "any", false, false, false, 129)), "html", null, true);
yield "</a>
</li>
";
}
// line 132
yield " ";
$context['_iterated'] = true;
}
if (!$context['_iterated']) {
// line 133
yield " <li>–</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['doc'], $context['_parent'], $context['_iterated']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 135
yield " </ul>
</div>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@ScoreCms/Public/default/document.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 434 => 135, 426 => 133, 421 => 132, 415 => 129, 411 => 128, 407 => 127, 404 => 126, 398 => 123, 393 => 122, 390 => 121, 385 => 120, 380 => 117, 372 => 112, 368 => 111, 363 => 110, 361 => 109, 356 => 105, 350 => 103, 348 => 102, 345 => 101, 343 => 100, 340 => 99, 326 => 87, 314 => 82, 309 => 80, 305 => 79, 300 => 77, 297 => 76, 290 => 69, 286 => 68, 281 => 66, 276 => 64, 268 => 59, 265 => 58, 261 => 57, 249 => 48, 244 => 45, 242 => 44, 239 => 43, 235 => 41, 217 => 39, 200 => 38, 197 => 37, 195 => 36, 190 => 34, 185 => 32, 180 => 29, 167 => 28, 143 => 14, 140 => 13, 127 => 12, 114 => 9, 108 => 8, 95 => 7, 79 => 4, 66 => 3, 44 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends cms_template() %}
{% block title %}
{{ document.name }} | {{ parent() }}
{% endblock %}
{% block stylesheets %}
{{ document.metatags | filter (mTag => mTag.metatagPattern.type is same as \"head\") | join(\"\\n\") | raw }}
{{ parent() }}
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type=\"text/javascript\">
let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
// with jQuery
let el = \$(`[data-domain=\"\${hash}\"]`)
if (el.length) {
//el.addClass(\"govuk-accordion__section--expanded\")
el.find(\"button.accordion-button\").removeClass(\"collapsed\").attr(\"aria-expanded\", \"true\")
el.find(\".accordion-collapse\").addClass(\"show\")
}
</script>
{% endblock %}
{% block body %}
<div class=\"container py-3\">
<div class=\"row govuk-grid-row\">
<div class=\"col govuk-grid-column\">
<h1 class=\"govuk-heading-xl\">{{ document.name }}</h1>
<div class=\"govuk-body\">
{{ document.description | cms_document_links | raw }}
</div>
{% if document.blockJoints | length %}
<div class=\"govuk-body\">
{% for blockJoint in document.blockJoints %}
{{ include(\x27@ScoreCms/Public/default/_block.html.twig\x27,{\x27blockJoint\x27: blockJoint}) }}
{% endfor %}
</div>
{% endif %}
{% if document.documentDescriptions %}
<div class=\"govuk-body\">
<h3>Popisy za oblasti</h3>
<div class=\"govuk-accordion accordion\" data-module=\"idsk-accordion\"
id=\"accordion_{{ document.id }}\" data-attribute=\"value\">
<div class=\"controls d-none govuk-accordion__controls\">
<button class=\"govuk-accordion__open-all\" data-open-title=\"Otvoriť všetky\"
data-close-title=\"Zatvoriť všetky\" type=\"button\" aria-expanded=\"false\">
<span class=\"govuk-visually-hidden govuk-accordion__controls-span\"
data-section-title=\"sekcie\"></span>
</button>
</div>
<div>
{% for item in document.documentDescriptions %}
<div class=\"accordion-item govuk-accordion__section\"
data-domain=\"{{ item.documentDomain.seoName }}\">
<div class=\"govuk-accordion__section-header\">
<h2 class=\"accordion-header govuk-accordion__section-heading\">
<button class=\"accordion-button collapsed govuk-accordion__section-button\"
type=\"button\" data-bs-toggle=\"collapse\"
data-bs-target=\"#accordion_{{ document.id ~ \"_\" ~ item.id }}-content-1\"
aria-expanded=\"false\"
aria-controls=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-content-1\">
\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"govuk-accordion_xxx_section-button\"
id=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-heading-1\">
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ item.documentDomain.name }}
\t\t\t\t\t\t\t\t\t\t\t\t</span>
</button>
</h2>
{# <div class=\"summary { # d-none # } govuk-accordion__section-summary govuk-body\" id=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-summary-1\">
\t\t\t\t\t\t\t\t\t\t\t{{ \"\" }}
\t\t\t\t\t\t\t\t\t\t</div> #}
</div>
<div id=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-content-1\"
class=\"accordion-collapse collapse govuk-accordion__section-content\"
aria-labelledby=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-heading-1\"
data-bs-parent=\"#accordion_{{ document.id }}\">
<div class=\x27accordion-body govuk-body\x27>
{{ item.description | cms_document_links | raw }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<script type=\"text/javascript\">
{\t// IDSK accordion - je treba aktualizovat sessionstorage pred tym ako sa idsk initializuje!
let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
document.querySelectorAll(\x27.govuk-accordion .govuk-accordion__section\x27)?.forEach(function (el) {
sessionStorage.setItem(el.querySelector(`.govuk-accordion__section-content`)?.id || \"accordion\", hash === el.dataset.domain);
});
}
</script>
{% endif %}
{% if document.actualFile %}
<div class=\"govuk-body\">
{% if document.icon %}
<img src=\"{{ document.iconThumb }}\" class=\"img-fluid my-2\">
{% endif %}
<h3>Stiahnuť dokument</h3>
<div>
<p>
{# <img src=\"/bundles/scorecms/plugins/fileman/images/filetypes/file_extension_{{ document.actualFile.extension }}.png\"> #}
{# <img src=\"/bundles/scorecms/plugins/fileman/images/filetypes/file_extension_txt.png\"> #}
<a href=\"{{ path(\x27document-download-ext\x27,{seoId:document.seoId, ext:document.extension|replace({\x27.\x27: \x27\x27})}) }}\"
data-document-action=\"download\" download=\"{{ document.seoId ~ document.extension }}\"
data-cms=\"document-link\">{{ document.name ~ document.info }}</a>
</p>
</div>
</div>
{% endif %}
<div class=\"govuk-body\">
<h3>Súvisiace dokumenty</h3>
<ul>
{% for doc in document.myRelevants %}
{% if doc.getHasDetail %}
<li><a href=\"{{ path(\x27document\x27,{seoId:doc.seoId}) }}\" data-document-action=\"show\"
data-cms=\"document-link\">{{ doc.name }}</a>
</li>
{% else %}
<li>
<a href=\"{{ path(\x27document-download-ext\x27,{seoId:doc.seoId, ext:doc.extension|replace({\x27.\x27: \x27\x27})}) }}\"
data-document-action=\"download\" download=\"{{ doc.seoId ~ doc.extension }}\"
data-cms=\"document-link\">{{ doc.name ~ doc.info }}</a>
</li>
{% endif %}
{% else %}
<li>–</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endblock %}
", "@ScoreCms/Public/default/document.html.twig", "/var/www/zelenyvzdelavacifond.sk/vendor/score/cms/src/Resources/views/Public/default/document.html.twig");
}
}