<?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;
/* attributeGroup/index.html.twig */
class __TwigTemplate_3432d92939b37ec7eb171d31107dc6ac515dea8c059a201e9b12a7acd8035339 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
'map' => [$this, 'block_map'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "courses.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "attributeGroup/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "attributeGroup/index.html.twig"));
$this->parent = $this->loadTemplate("courses.html.twig", "attributeGroup/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 3, $this->source); })()), "name", [], "any", false, false, false, 3), "html", null, true);
echo " | Všechny kurzy";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 6
$context["showMap"] = ((array_key_exists("showMap", $context)) ? (_twig_default_filter((isset($context["showMap"]) || array_key_exists("showMap", $context) ? $context["showMap"] : (function () { throw new RuntimeError('Variable "showMap" does not exist.', 6, $this->source); })()), false)) : (false));
// line 7
echo "<div class=\"container-fluid\">
<div class=\"row\">
<div class=\"col-12 col-md-6 position-relative\">
";
// line 10
$this->loadTemplate("form/_searchForm.html.twig", "attributeGroup/index.html.twig", 10)->display($context);
// line 11
echo " </div>
<div class=\"col-12 col-md-6 homepage-box d-md-block d-none\">
<div class=\"row\">
<div class=\"col-";
// line 14
if ((isset($context["showMap"]) || array_key_exists("showMap", $context) ? $context["showMap"] : (function () { throw new RuntimeError('Variable "showMap" does not exist.', 14, $this->source); })())) {
echo "12";
} else {
echo "6";
}
echo "\">
<h1>";
// line 15
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 15, $this->source); })()), "name", [], "any", false, false, false, 15), "html", null, true);
echo "</h1>
<p>
";
// line 17
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 17, $this->source); })()), "description", [], "any", false, false, false, 17), "html", null, true);
echo "
</p>
</div>
";
// line 21
if ((isset($context["showMap"]) || array_key_exists("showMap", $context) ? $context["showMap"] : (function () { throw new RuntimeError('Variable "showMap" does not exist.', 21, $this->source); })())) {
// line 22
echo " <div class=\"col-12\">
";
// line 23
$this->loadTemplate("course/map.html.twig", "attributeGroup/index.html.twig", 23)->display(twig_array_merge($context, (isset($context["courses"]) || array_key_exists("courses", $context) ? $context["courses"] : (function () { throw new RuntimeError('Variable "courses" does not exist.', 23, $this->source); })())));
// line 24
echo " </div>
";
} else {
// line 26
echo " <div class=\"col-6\">
";
// line 27
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 27, $this->source); })()), "image", [], "any", false, false, false, 27))) {
// line 28
echo " ";
echo $this->env->getExtension('Sonata\MediaBundle\Twig\Extension\MediaExtension')->thumbnail(twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 28, $this->source); })()), "image", [], "any", false, false, false, 28), "big", []);
// line 29
echo " ";
} else {
// line 30
echo " <img src=\"/images/hp.png\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 30, $this->source); })()), "name", [], "any", false, false, false, 30), "html", null, true);
echo "\" class=\"img-fluid\"/>
";
}
// line 32
echo " </div>
";
}
// line 34
echo " </div>
</div>
</div>
</div>
";
// line 38
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 38, $this->source); })()), "attributes", [], "any", false, false, false, 38)) > 0)) {
// line 39
echo " <div class=\"container-fluid mt-5\">
<div class=\"row text-center\">
";
// line 42
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 42, $this->source); })()), "attributes", [], "any", false, false, false, 42));
foreach ($context['_seq'] as $context["_key"] => $context["attribute"]) {
// line 43
echo " <div class=\"col-12 col-md-6 col-lg-3 mb-3\">
<a style=\"height: 60px;\" class=\"btn btn-light w-100\" href=\"";
// line 44
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("attribute_group_attr_index", ["slug" => twig_get_attribute($this->env, $this->source, (isset($context["attributeGroup"]) || array_key_exists("attributeGroup", $context) ? $context["attributeGroup"] : (function () { throw new RuntimeError('Variable "attributeGroup" does not exist.', 44, $this->source); })()), "identifier", [], "any", false, false, false, 44), "attributeSlug" => twig_get_attribute($this->env, $this->source, $context["attribute"], "identifier", [], "any", false, false, false, 44)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["attribute"], "name", [], "any", false, false, false, 44), "html", null, true);
echo "</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attribute'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
echo "
</div>
</div>
";
}
// line 51
echo " ";
if ((twig_length_filter($this->env, (isset($context["submenuGroups"]) || array_key_exists("submenuGroups", $context) ? $context["submenuGroups"] : (function () { throw new RuntimeError('Variable "submenuGroups" does not exist.', 51, $this->source); })())) > 0)) {
// line 52
echo " <div class=\"container-fluid mt-5\">
<div class=\"row\">
";
// line 54
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["submenuGroups"]) || array_key_exists("submenuGroups", $context) ? $context["submenuGroups"] : (function () { throw new RuntimeError('Variable "submenuGroups" does not exist.', 54, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["attributeGroupSub"]) {
// line 55
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["attributeGroupSub"], "attributes", [], "any", false, false, false, 55));
foreach ($context['_seq'] as $context["_key"] => $context["attribute"]) {
// line 56
echo " <div class=\"col-12 col-md-6 col-lg-3 mb-3\">
<a style=\"height: 60px;\" class=\"btn btn-light w-100\" href=\"";
// line 57
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("attribute_group_attr_index", ["slug" => twig_get_attribute($this->env, $this->source, $context["attributeGroupSub"], "identifier", [], "any", false, false, false, 57), "attributeSlug" => twig_get_attribute($this->env, $this->source, $context["attribute"], "identifier", [], "any", false, false, false, 57)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["attribute"], "name", [], "any", false, false, false, 57), "html", null, true);
echo "</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attribute'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 60
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attributeGroupSub'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 61
echo " </div>
</div>
";
}
// line 64
echo "<div class=\"container mt-5\">
<div class=\"row\">
";
// line 66
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["courses"]) || array_key_exists("courses", $context) ? $context["courses"] : (function () { throw new RuntimeError('Variable "courses" does not exist.', 66, $this->source); })()));
$context['_iterated'] = false;
$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["course"]) {
// line 67
echo " <div class=\"col-12\">
";
// line 68
$this->loadTemplate("course/item/default.html.twig", "attributeGroup/index.html.twig", 68)->display(twig_array_merge($context, ["course" => $context["course"]]));
// line 69
echo " </div>
";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 71
echo " Nebyly nalezeny žádné kurzy
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['course'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 73
echo "
<div class=\"navigation\">
";
// line 75
echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["courses"]) || array_key_exists("courses", $context) ? $context["courses"] : (function () { throw new RuntimeError('Variable "courses" does not exist.', 75, $this->source); })()));
echo "
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 80
public function block_map($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "map"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "map"));
// line 81
echo " <script type=\"text/javascript\">
const locations = [
";
// line 83
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["courses"]) || array_key_exists("courses", $context) ? $context["courses"] : (function () { throw new RuntimeError('Variable "courses" does not exist.', 83, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 84
echo " ";
if (( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["item"], "latitude", [], "any", false, false, false, 84)) && !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["item"], "longitude", [], "any", false, false, false, 84)))) {
// line 85
echo " {
'title': '";
// line 86
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 86), "html", null, true);
echo "',
'position': {lat: ";
// line 87
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "latitude", [], "any", false, false, false, 87), "html", null, true);
echo ", lng: ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "longitude", [], "any", false, false, false, 87), "html", null, true);
echo " },
";
// line 89
echo " },
";
}
// line 92
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 93
echo " ];
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "attributeGroup/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 345 => 93, 339 => 92, 334 => 89, 328 => 87, 324 => 86, 321 => 85, 318 => 84, 314 => 83, 310 => 81, 300 => 80, 286 => 75, 282 => 73, 275 => 71, 261 => 69, 259 => 68, 256 => 67, 238 => 66, 234 => 64, 229 => 61, 223 => 60, 212 => 57, 209 => 56, 204 => 55, 200 => 54, 196 => 52, 193 => 51, 187 => 47, 176 => 44, 173 => 43, 169 => 42, 164 => 39, 162 => 38, 156 => 34, 152 => 32, 146 => 30, 143 => 29, 140 => 28, 138 => 27, 135 => 26, 131 => 24, 129 => 23, 126 => 22, 124 => 21, 117 => 17, 112 => 15, 104 => 14, 99 => 11, 97 => 10, 92 => 7, 90 => 6, 80 => 5, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'courses.html.twig' %}
{% block title %}{{ attributeGroup.name }} | Všechny kurzy{% endblock %}
{% block content %}
{% set showMap = showMap|default(false) %}
<div class=\"container-fluid\">
<div class=\"row\">
<div class=\"col-12 col-md-6 position-relative\">
{% include 'form/_searchForm.html.twig' %}
</div>
<div class=\"col-12 col-md-6 homepage-box d-md-block d-none\">
<div class=\"row\">
<div class=\"col-{% if(showMap) %}12{% else %}6{% endif %}\">
<h1>{{ attributeGroup.name }}</h1>
<p>
{{ attributeGroup.description }}
</p>
</div>
{% if(showMap) %}
<div class=\"col-12\">
{% include 'course/map.html.twig' with courses %}
</div>
{% else %}
<div class=\"col-6\">
{% if(attributeGroup.image is not empty) %}
{% thumbnail attributeGroup.image, 'big' %}
{% else %}
<img src=\"/images/hp.png\" alt=\"{{ attributeGroup.name }}\" class=\"img-fluid\"/>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% if(attributeGroup.attributes|length>0) %}
<div class=\"container-fluid mt-5\">
<div class=\"row text-center\">
{% for attribute in attributeGroup.attributes %}
<div class=\"col-12 col-md-6 col-lg-3 mb-3\">
<a style=\"height: 60px;\" class=\"btn btn-light w-100\" href=\"{{ path('attribute_group_attr_index', {'slug': attributeGroup.identifier, 'attributeSlug': attribute.identifier}) }}\">{{ attribute.name }}</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if(submenuGroups|length>0) %}
<div class=\"container-fluid mt-5\">
<div class=\"row\">
{% for attributeGroupSub in submenuGroups %}
{% for attribute in attributeGroupSub.attributes %}
<div class=\"col-12 col-md-6 col-lg-3 mb-3\">
<a style=\"height: 60px;\" class=\"btn btn-light w-100\" href=\"{{ path('attribute_group_attr_index', {'slug': attributeGroupSub.identifier, 'attributeSlug': attribute.identifier}) }}\">{{ attribute.name }}</a>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
{% endif %}
<div class=\"container mt-5\">
<div class=\"row\">
{% for course in courses %}
<div class=\"col-12\">
{% include 'course/item/default.html.twig' with {'course': course} %}
</div>
{% else %}
Nebyly nalezeny žádné kurzy
{% endfor %}
<div class=\"navigation\">
{{ knp_pagination_render(courses) }}
</div>
</div>
{% endblock %}
{% block map %}
<script type=\"text/javascript\">
const locations = [
{% for item in courses %}
{% if(item.latitude is not empty and item.longitude is not empty) %}
{
'title': '{{ item.name }}',
'position': {lat: {{ item.latitude }}, lng: {{ item.longitude }} },
{#'url': '{{ path('course_show', {'slug': item.slug}) }}'#}
},
{% endif %}
{% endfor %}
];
</script>
{% endblock %}
", "attributeGroup/index.html.twig", "/home/forge/vsechnykurzy.cz/templates/attributeGroup/index.html.twig");
}
}