var/cache/dev/twig/67/67a6988635a6d88f6462a9510cac0c63.php line 170

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Sandbox\SecurityNotAllowedTestError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. use Twig\TemplateWrapper;
  16. /* @ScoreCms/Public/default/document.html.twig */
  17. class __TwigTemplate_b3ed0cff362709176152ced2cce2ebb4 extends Template
  18. {
  19.     private Source $source;
  20.     /**
  21.      * @var array<string, Template>
  22.      */
  23.     private array $macros = [];
  24.     public function __construct(Environment $env)
  25.     {
  26.         parent::__construct($env);
  27.         $this->source = $this->getSourceContext();
  28.         $this->blocks = [
  29.             'title' => [$this, 'block_title'],
  30.             'stylesheets' => [$this, 'block_stylesheets'],
  31.             'javascripts' => [$this, 'block_javascripts'],
  32.             'body' => [$this, 'block_body'],
  33.         ];
  34.     }
  35.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  36.     {
  37.         // line 1
  38.         return $this->load($this->env->getRuntime('Score\CmsBundle\Twig\AppRuntime')->getTemplate(), 1);
  39.     }
  40.     protected function doDisplay(array $context, array $blocks = []): iterable
  41.     {
  42.         $macros = $this->macros;
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  44.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ScoreCms/Public/default/document.html.twig"));
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  46.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ScoreCms/Public/default/document.html.twig"));
  47.         yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  48.         
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50.         
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52.     }
  53.     // line 3
  54.     /**
  55.      * @return iterable<null|scalar|\Stringable>
  56.      */
  57.     public function block_title(array $context, array $blocks = []): iterable
  58.     {
  59.         $macros = $this->macros;
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  64.         // line 4
  65.         yield "    ";
  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.', 4, $this->source); })()), "name", [], "any", false, false, false, 4), "html", null, true);
  67.         yield "    |    ";
  68.         yield from $this->yieldParentBlock("title", $context, $blocks);
  69.         yield "
  70. ";
  71.         
  72.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  73.         
  74.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  75.         yield from [];
  76.     }
  77.     // line 7
  78.     /**
  79.      * @return iterable<null|scalar|\Stringable>
  80.      */
  81.     public function block_stylesheets(array $context, array $blocks = []): iterable
  82.     {
  83.         $macros = $this->macros;
  84.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  85.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  86.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  87.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  88.         // line 8
  89.         yield "    ";
  90.         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"); }), "
  91. ");
  92.         yield "
  93.     ";
  94.         // line 9
  95.         yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
  96.         yield "
  97. ";
  98.         
  99.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  100.         
  101.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  102.         yield from [];
  103.     }
  104.     // line 12
  105.     /**
  106.      * @return iterable<null|scalar|\Stringable>
  107.      */
  108.     public function block_javascripts(array $context, array $blocks = []): iterable
  109.     {
  110.         $macros = $this->macros;
  111.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  112.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  113.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  114.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  115.         // line 13
  116.         yield "
  117.     ";
  118.         // line 14
  119.         yield from $this->yieldParentBlock("javascripts", $context, $blocks);
  120.         yield "
  121.     <script type=\"text/javascript\">
  122.         let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
  123.         // with jQuery
  124.         let el = \$(`[data-domain=\"\${hash}\"]`)
  125.         if (el.length) {
  126.             //el.addClass(\"govuk-accordion__section--expanded\")
  127.             el.find(\"button.accordion-button\").removeClass(\"collapsed\").attr(\"aria-expanded\", \"true\")
  128.             el.find(\".accordion-collapse\").addClass(\"show\")
  129.         }
  130.     </script>
  131. ";
  132.         
  133.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  134.         
  135.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  136.         yield from [];
  137.     }
  138.     // line 28
  139.     /**
  140.      * @return iterable<null|scalar|\Stringable>
  141.      */
  142.     public function block_body(array $context, array $blocks = []): iterable
  143.     {
  144.         $macros = $this->macros;
  145.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  146.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  147.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  148.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  149.         // line 29
  150.         yield "    <div class=\"container py-3\">
  151.         <div class=\"row govuk-grid-row\">
  152.             <div class=\"col govuk-grid-column\">
  153.                 <h1 class=\"govuk-heading-xl\">";
  154.         // line 32
  155.         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);
  156.         yield "</h1>
  157.                 <div class=\"govuk-body\">
  158.                     ";
  159.         // line 34
  160.         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));
  161.         yield "
  162.                 </div>
  163.                 ";
  164.         // line 36
  165.         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)) {
  166.             // line 37
  167.             yield "                    <div class=\"govuk-body\">
  168.                         ";
  169.             // line 38
  170.             $context['_parent'] = $context;
  171.             $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));
  172.             $context['loop'] = [
  173.               'parent' => $context['_parent'],
  174.               'index0' => 0,
  175.               'index'  => 1,
  176.               'first'  => true,
  177.             ];
  178.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  179.                 $length = count($context['_seq']);
  180.                 $context['loop']['revindex0'] = $length - 1;
  181.                 $context['loop']['revindex'] = $length;
  182.                 $context['loop']['length'] = $length;
  183.                 $context['loop']['last'] = 1 === $length;
  184.             }
  185.             foreach ($context['_seq'] as $context["_key"] => $context["blockJoint"]) {
  186.                 // line 39
  187.                 yield "                            ";
  188.                 yield (string) Twig\Extension\CoreExtension::include($this->env, $context, "@ScoreCms/Public/default/_block.html.twig", ["blockJoint" => $context["blockJoint"]]);
  189.                 yield "
  190.                         ";
  191.                 ++$context['loop']['index0'];
  192.                 ++$context['loop']['index'];
  193.                 $context['loop']['first'] = false;
  194.                 if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  195.                     --$context['loop']['revindex0'];
  196.                     --$context['loop']['revindex'];
  197.                     $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  198.                 }
  199.             }
  200.             $_parent = $context['_parent'];
  201.             unset($context['_seq'], $context['_key'], $context['blockJoint'], $context['_parent'], $context['loop']);
  202.             $context = array_intersect_key($context, $_parent);
  203.             $context += $_parent;
  204.             // line 41
  205.             yield "                    </div>
  206.                 ";
  207.         }
  208.         // line 43
  209.         yield "
  210.                 ";
  211.         // line 44
  212.         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)) {
  213.             // line 45
  214.             yield "                    <div class=\"govuk-body\">
  215.                         <h3>Popisy za oblasti</h3>
  216.                         <div class=\"govuk-accordion accordion\" data-module=\"idsk-accordion\"
  217.                              id=\"accordion_";
  218.             // line 48
  219.             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);
  220.             yield "\" data-attribute=\"value\">
  221.                             <div class=\"controls d-none govuk-accordion__controls\">
  222.                                 <button class=\"govuk-accordion__open-all\" data-open-title=\"Otvoriť všetky\"
  223.                                         data-close-title=\"Zatvoriť všetky\" type=\"button\" aria-expanded=\"false\">
  224.                                     <span class=\"govuk-visually-hidden govuk-accordion__controls-span\"
  225.                                           data-section-title=\"sekcie\"></span>
  226.                                 </button>
  227.                             </div>
  228.                             <div>
  229.                                 ";
  230.             // line 57
  231.             $context['_parent'] = $context;
  232.             $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));
  233.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  234.                 // line 58
  235.                 yield "                                    <div class=\"accordion-item govuk-accordion__section\"
  236.                                          data-domain=\"";
  237.                 // line 59
  238.                 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);
  239.                 yield "\">
  240.                                         <div class=\"govuk-accordion__section-header\">
  241.                                             <h2 class=\"accordion-header govuk-accordion__section-heading\">
  242.                                                 <button class=\"accordion-button collapsed govuk-accordion__section-button\"
  243.                                                         type=\"button\" data-bs-toggle=\"collapse\"
  244.                                                         data-bs-target=\"#accordion_";
  245.                 // line 64
  246.                 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);
  247.                 yield "-content-1\"
  248.                                                         aria-expanded=\"false\"
  249.                                                         aria-controls=\"accordion_";
  250.                 // line 66
  251.                 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);
  252.                 yield "-content-1\">
  253. \t\t\t\t\t\t\t\t\t\t\t\t<span class=\"govuk-accordion_xxx_section-button\"
  254.                                                       id=\"accordion_";
  255.                 // line 68
  256.                 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);
  257.                 yield "-heading-1\">
  258. \t\t\t\t\t\t\t\t\t\t\t\t\t";
  259.                 // line 69
  260.                 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);
  261.                 yield "
  262. \t\t\t\t\t\t\t\t\t\t\t\t</span>
  263.                                                 </button>
  264.                                             </h2>
  265.                                             ";
  266.                 // line 76
  267.                 yield "                                        </div>
  268.                                         <div id=\"accordion_";
  269.                 // line 77
  270.                 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);
  271.                 yield "-content-1\"
  272.                                              class=\"accordion-collapse collapse govuk-accordion__section-content\"
  273.                                              aria-labelledby=\"accordion_";
  274.                 // line 79
  275.                 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);
  276.                 yield "-heading-1\"
  277.                                              data-bs-parent=\"#accordion_";
  278.                 // line 80
  279.                 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);
  280.                 yield "\">
  281.                                             <div class=\x27accordion-body govuk-body\x27>
  282.                                                 ";
  283.                 // line 82
  284.                 yield (string) $this->env->getRuntime('Score\CmsBundle\Twig\AppRuntime')->updateDocumentLinks(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "description", [], "any", false, false, false, 82));
  285.                 yield "
  286.                                             </div>
  287.                                         </div>
  288.                                     </div>
  289.                                 ";
  290.             }
  291.             $_parent = $context['_parent'];
  292.             unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
  293.             $context = array_intersect_key($context, $_parent);
  294.             $context += $_parent;
  295.             // line 87
  296.             yield "                            </div>
  297.                         </div>
  298.                     </div>
  299.                     <script type=\"text/javascript\">
  300.                         {\t// IDSK accordion - je treba aktualizovat sessionstorage pred tym ako sa idsk initializuje!
  301.                             let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
  302.                             document.querySelectorAll(\x27.govuk-accordion .govuk-accordion__section\x27)?.forEach(function (el) {
  303.                                 sessionStorage.setItem(el.querySelector(`.govuk-accordion__section-content`)?.id || \"accordion\", hash === el.dataset.domain);
  304.                             });
  305.                         }
  306.                     </script>
  307.                 ";
  308.         }
  309.         // line 99
  310.         yield "
  311.                 ";
  312.         // line 100
  313.         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)) {
  314.             // line 101
  315.             yield "                    <div class=\"govuk-body\">
  316.                         ";
  317.             // line 102
  318.             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)) {
  319.                 // line 103
  320.                 yield "                            <img src=\"";
  321.                 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);
  322.                 yield "\" class=\"img-fluid my-2\">
  323.                         ";
  324.             }
  325.             // line 105
  326.             yield "                        <h3>Stiahnuť dokument</h3>
  327.                         <div>
  328.                             <p>
  329.                                 ";
  330.             // line 109
  331.             yield "                                ";
  332.             // line 110
  333.             yield "                                <a href=\"";
  334.             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);
  335.             yield "\"
  336.                                    data-document-action=\"download\" download=\"";
  337.             // line 111
  338.             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);
  339.             yield "\"
  340.                                    data-cms=\"document-link\">";
  341.             // line 112
  342.             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);
  343.             yield "</a>
  344.                             </p>
  345.                         </div>
  346.                     </div>
  347.                 ";
  348.         }
  349.         // line 117
  350.         yield "                <div class=\"govuk-body\">
  351.                     <h3>Súvisiace dokumenty</h3>
  352.                     <ul>
  353.                     ";
  354.         // line 120
  355.         $context['_parent'] = $context;
  356.         $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));
  357.         $context['_iterated'] = false;
  358.         foreach ($context['_seq'] as $context["_key"] => $context["doc"]) {
  359.             // line 121
  360.             yield "                        ";
  361.             if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["doc"], "getHasDetail", [], "any", false, false, false, 121)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  362.                 // line 122
  363.                 yield "                            <li><a href=\"";
  364.                 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);
  365.                 yield "\" data-document-action=\"show\"
  366.                                   data-cms=\"document-link\">";
  367.                 // line 123
  368.                 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);
  369.                 yield "</a>
  370.                             </li>
  371.                         ";
  372.             } else {
  373.                 // line 126
  374.                 yield "                            <li>
  375.                                 <a href=\"";
  376.                 // line 127
  377.                 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);
  378.                 yield "\"
  379.                                    data-document-action=\"download\" download=\"";
  380.                 // line 128
  381.                 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);
  382.                 yield "\"
  383.                                    data-cms=\"document-link\">";
  384.                 // line 129
  385.                 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);
  386.                 yield "</a>
  387.                             </li>
  388.                         ";
  389.             }
  390.             // line 132
  391.             yield "                    ";
  392.             $context['_iterated'] = true;
  393.         }
  394.         if (!$context['_iterated']) {
  395.             // line 133
  396.             yield "                        <li>–</li>
  397.                     ";
  398.         }
  399.         $_parent = $context['_parent'];
  400.         unset($context['_seq'], $context['_key'], $context['doc'], $context['_parent'], $context['_iterated']);
  401.         $context = array_intersect_key($context, $_parent);
  402.         $context += $_parent;
  403.         // line 135
  404.         yield "                    </ul>
  405.                 </div>
  406.             </div>
  407.         </div>
  408.     </div>
  409. ";
  410.         
  411.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  412.         
  413.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  414.         yield from [];
  415.     }
  416.     /**
  417.      * @codeCoverageIgnore
  418.      */
  419.     public function getTemplateName(): string
  420.     {
  421.         return "@ScoreCms/Public/default/document.html.twig";
  422.     }
  423.     /**
  424.      * @codeCoverageIgnore
  425.      */
  426.     public function isTraitable(): bool
  427.     {
  428.         return false;
  429.     }
  430.     /**
  431.      * @codeCoverageIgnore
  432.      */
  433.     public function getDebugInfo(): array
  434.     {
  435.         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,);
  436.     }
  437.     public function getSourceContext(): Source
  438.     {
  439.         return new Source("{% extends cms_template() %}
  440. {% block title %}
  441.     {{ document.name }}    |    {{ parent() }}
  442. {% endblock %}
  443. {% block stylesheets %}
  444.     {{ document.metatags | filter (mTag => mTag.metatagPattern.type is same as \"head\") | join(\"\\n\") | raw }}
  445.     {{ parent() }}
  446. {% endblock %}
  447. {% block javascripts %}
  448.     {{ parent() }}
  449.     <script type=\"text/javascript\">
  450.         let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
  451.         // with jQuery
  452.         let el = \$(`[data-domain=\"\${hash}\"]`)
  453.         if (el.length) {
  454.             //el.addClass(\"govuk-accordion__section--expanded\")
  455.             el.find(\"button.accordion-button\").removeClass(\"collapsed\").attr(\"aria-expanded\", \"true\")
  456.             el.find(\".accordion-collapse\").addClass(\"show\")
  457.         }
  458.     </script>
  459. {% endblock %}
  460. {% block body %}
  461.     <div class=\"container py-3\">
  462.         <div class=\"row govuk-grid-row\">
  463.             <div class=\"col govuk-grid-column\">
  464.                 <h1 class=\"govuk-heading-xl\">{{ document.name }}</h1>
  465.                 <div class=\"govuk-body\">
  466.                     {{ document.description | cms_document_links | raw }}
  467.                 </div>
  468.                 {% if document.blockJoints | length %}
  469.                     <div class=\"govuk-body\">
  470.                         {% for blockJoint in document.blockJoints %}
  471.                             {{ include(\x27@ScoreCms/Public/default/_block.html.twig\x27,{\x27blockJoint\x27: blockJoint}) }}
  472.                         {% endfor %}
  473.                     </div>
  474.                 {% endif %}
  475.                 {% if document.documentDescriptions %}
  476.                     <div class=\"govuk-body\">
  477.                         <h3>Popisy za oblasti</h3>
  478.                         <div class=\"govuk-accordion accordion\" data-module=\"idsk-accordion\"
  479.                              id=\"accordion_{{ document.id }}\" data-attribute=\"value\">
  480.                             <div class=\"controls d-none govuk-accordion__controls\">
  481.                                 <button class=\"govuk-accordion__open-all\" data-open-title=\"Otvoriť všetky\"
  482.                                         data-close-title=\"Zatvoriť všetky\" type=\"button\" aria-expanded=\"false\">
  483.                                     <span class=\"govuk-visually-hidden govuk-accordion__controls-span\"
  484.                                           data-section-title=\"sekcie\"></span>
  485.                                 </button>
  486.                             </div>
  487.                             <div>
  488.                                 {% for item in document.documentDescriptions %}
  489.                                     <div class=\"accordion-item govuk-accordion__section\"
  490.                                          data-domain=\"{{ item.documentDomain.seoName }}\">
  491.                                         <div class=\"govuk-accordion__section-header\">
  492.                                             <h2 class=\"accordion-header govuk-accordion__section-heading\">
  493.                                                 <button class=\"accordion-button collapsed govuk-accordion__section-button\"
  494.                                                         type=\"button\" data-bs-toggle=\"collapse\"
  495.                                                         data-bs-target=\"#accordion_{{ document.id ~ \"_\" ~ item.id }}-content-1\"
  496.                                                         aria-expanded=\"false\"
  497.                                                         aria-controls=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-content-1\">
  498. \t\t\t\t\t\t\t\t\t\t\t\t<span class=\"govuk-accordion_xxx_section-button\"
  499.                                                       id=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-heading-1\">
  500. \t\t\t\t\t\t\t\t\t\t\t\t\t{{ item.documentDomain.name }}
  501. \t\t\t\t\t\t\t\t\t\t\t\t</span>
  502.                                                 </button>
  503.                                             </h2>
  504.                                             {# <div class=\"summary { # d-none # } govuk-accordion__section-summary govuk-body\" id=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-summary-1\">
  505. \t\t\t\t\t\t\t\t\t\t\t{{ \"\" }}
  506. \t\t\t\t\t\t\t\t\t\t</div> #}
  507.                                         </div>
  508.                                         <div id=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-content-1\"
  509.                                              class=\"accordion-collapse collapse govuk-accordion__section-content\"
  510.                                              aria-labelledby=\"accordion_{{ document.id ~ \"_\" ~ item.id }}-heading-1\"
  511.                                              data-bs-parent=\"#accordion_{{ document.id }}\">
  512.                                             <div class=\x27accordion-body govuk-body\x27>
  513.                                                 {{ item.description | cms_document_links | raw }}
  514.                                             </div>
  515.                                         </div>
  516.                                     </div>
  517.                                 {% endfor %}
  518.                             </div>
  519.                         </div>
  520.                     </div>
  521.                     <script type=\"text/javascript\">
  522.                         {\t// IDSK accordion - je treba aktualizovat sessionstorage pred tym ako sa idsk initializuje!
  523.                             let hash = document.URL.substr(document.URL.indexOf(\x27#\x27) + 1)
  524.                             document.querySelectorAll(\x27.govuk-accordion .govuk-accordion__section\x27)?.forEach(function (el) {
  525.                                 sessionStorage.setItem(el.querySelector(`.govuk-accordion__section-content`)?.id || \"accordion\", hash === el.dataset.domain);
  526.                             });
  527.                         }
  528.                     </script>
  529.                 {% endif %}
  530.                 {% if document.actualFile %}
  531.                     <div class=\"govuk-body\">
  532.                         {% if document.icon %}
  533.                             <img src=\"{{ document.iconThumb }}\" class=\"img-fluid my-2\">
  534.                         {% endif %}
  535.                         <h3>Stiahnuť dokument</h3>
  536.                         <div>
  537.                             <p>
  538.                                 {# <img src=\"/bundles/scorecms/plugins/fileman/images/filetypes/file_extension_{{ document.actualFile.extension }}.png\"> #}
  539.                                 {# <img src=\"/bundles/scorecms/plugins/fileman/images/filetypes/file_extension_txt.png\"> #}
  540.                                 <a href=\"{{ path(\x27document-download-ext\x27,{seoId:document.seoId, ext:document.extension|replace({\x27.\x27: \x27\x27})}) }}\"
  541.                                    data-document-action=\"download\" download=\"{{ document.seoId ~ document.extension }}\"
  542.                                    data-cms=\"document-link\">{{ document.name ~ document.info }}</a>
  543.                             </p>
  544.                         </div>
  545.                     </div>
  546.                 {% endif %}
  547.                 <div class=\"govuk-body\">
  548.                     <h3>Súvisiace dokumenty</h3>
  549.                     <ul>
  550.                     {% for doc in document.myRelevants %}
  551.                         {% if doc.getHasDetail %}
  552.                             <li><a href=\"{{ path(\x27document\x27,{seoId:doc.seoId}) }}\" data-document-action=\"show\"
  553.                                   data-cms=\"document-link\">{{ doc.name }}</a>
  554.                             </li>
  555.                         {% else %}
  556.                             <li>
  557.                                 <a href=\"{{ path(\x27document-download-ext\x27,{seoId:doc.seoId, ext:doc.extension|replace({\x27.\x27: \x27\x27})}) }}\"
  558.                                    data-document-action=\"download\" download=\"{{ doc.seoId ~ doc.extension }}\"
  559.                                    data-cms=\"document-link\">{{ doc.name ~ doc.info }}</a>
  560.                             </li>
  561.                         {% endif %}
  562.                     {% else %}
  563.                         <li>–</li>
  564.                     {% endfor %}
  565.                     </ul>
  566.                 </div>
  567.             </div>
  568.         </div>
  569.     </div>
  570. {% endblock %}
  571. ", "@ScoreCms/Public/default/document.html.twig", "/var/www/zelenyvzdelavacifond.sk/vendor/score/cms/src/Resources/views/Public/default/document.html.twig");
  572.     }
  573. }