<?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;

/* absence/showUc.html.twig */
class __TwigTemplate_cca33cbbbc6592ed7b73a2052bd7cd6ec518845c05a9fa1e0be2aa9a68d42122 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'title' => [$this, 'block_title'],
            'body' => [$this, 'block_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "absence/showUc.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "absence/showUc.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "absence/showUc.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 "Suplování";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    // line 5
    public function block_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        // line 6
        echo "
    <h2>Suplování</h2>

    <hr>

    <div class=\"shadow\" style=\"width: max-content;\">
        <table id=\"table\" data-toggle=\"table\" data-height=\"500\"
               class=\"table table-bordered table-borderless\">
            <thead class=\"thead-light\">
            <tr>
                <th data-field=\"Den\">Den</th>

                ";
        // line 18
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["doba"]) || array_key_exists("doba", $context) ? $context["doba"] : (function () { throw new RuntimeError('Variable "doba" does not exist.', 18, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["d"]) {
            // line 19
            echo "
                    <th>";
            // line 20
            echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["d"], "doba", [], "any", false, false, false, 20), "H:i"), "html", null, true);
            echo "</th>

                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['d'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 23
        echo "
            </tr>
            </thead>
            <tbody>

            ";
        // line 28
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($context["den"]);
        foreach ($context['_seq'] as $context["_key"] => $context["den"]) {
            // line 29
            echo "
                <tr>
                    <td style=\"background-color: #808080; color: #f2f2f2\">
                        ";
            // line 32
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["den"], "den", [], "any", false, false, false, 32), "html", null, true);
            echo "
                    </td>

                    ";
            // line 35
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["doba"]) || array_key_exists("doba", $context) ? $context["doba"] : (function () { throw new RuntimeError('Variable "doba" does not exist.', 35, $this->source); })()));
            foreach ($context['_seq'] as $context["_key"] => $context["d"]) {
                // line 36
                echo "                        ";
                $context["stopper"] = 0;
                // line 37
                echo "                        ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable((isset($context["cas"]) || array_key_exists("cas", $context) ? $context["cas"] : (function () { throw new RuntimeError('Variable "cas" does not exist.', 37, $this->source); })()));
                $context['loop'] = [
                  'parent' => $context['_parent'],
                  'index0' => 0,
                  'index'  => 1,
                  'first'  => true,
                ];
                if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                    $length = count($context['_seq']);
                    $context['loop']['revindex0'] = $length - 1;
                    $context['loop']['revindex'] = $length;
                    $context['loop']['length'] = $length;
                    $context['loop']['last'] = 1 === $length;
                }
                foreach ($context['_seq'] as $context["_key"] => $context["c"]) {
                    // line 38
                    echo "                            ";
                    if (((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["c"], "doba", [], "any", false, false, false, 38), $context["d"]) && 0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["c"], "den", [], "any", false, false, false, 38), $context["den"])) && 0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["c"], "ucitel", [], "any", false, false, false, 38), (isset($context["ucitel"]) || array_key_exists("ucitel", $context) ? $context["ucitel"] : (function () { throw new RuntimeError('Variable "ucitel" does not exist.', 38, $this->source); })())))) {
                        // line 39
                        echo "                                ";
                        $context["stopper"] = 1;
                        // line 40
                        echo "                                <td style=\"background-color: #bfbfbf\">
                                    <a href=\"";
                        // line 41
                        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("time_table.show", ["id" => twig_get_attribute($this->env, $this->source, $context["c"], "id", [], "any", false, false, false, 41)]), "html", null, true);
                        echo "\"
                                       style=\"color: #0d0d0d\">";
                        // line 42
                        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["c"], "predmet", [], "any", false, false, false, 42), "zkratka", [], "any", false, false, false, 42), "html", null, true);
                        echo "</a>
                                </td>

                            ";
                    }
                    // line 46
                    echo "                            ";
                    if ((0 === twig_compare((isset($context["stopper"]) || array_key_exists("stopper", $context) ? $context["stopper"] : (function () { throw new RuntimeError('Variable "stopper" does not exist.', 46, $this->source); })()), 0) && twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 46))) {
                        // line 47
                        echo "
                                    <td></td>

                            ";
                    }
                    // line 51
                    echo "                        ";
                    ++$context['loop']['index0'];
                    ++$context['loop']['index'];
                    $context['loop']['first'] = false;
                    if (isset($context['loop']['length'])) {
                        --$context['loop']['revindex0'];
                        --$context['loop']['revindex'];
                        $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                    }
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['c'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 52
                echo "                        ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable((isset($context["suplovani"]) || array_key_exists("suplovani", $context) ? $context["suplovani"] : (function () { throw new RuntimeError('Variable "suplovani" does not exist.', 52, $this->source); })()));
                foreach ($context['_seq'] as $context["_key"] => $context["s"]) {
                    // line 53
                    echo "
                            ";
                    // line 54
                    if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["s"], 1, [], "array", false, false, false, 54), $context["den"]) && 0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["s"], 0, [], "array", false, false, false, 54), "absence", [], "any", false, false, false, 54), "doba", [], "any", false, false, false, 54), $context["d"]))) {
                        // line 55
                        echo "                                <td style=\"background-color: #969696\">
                                    <a href=\"";
                        // line 56
                        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("time_table.show", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["s"], 0, [], "array", false, false, false, 56), "absence", [], "any", false, false, false, 56), "cas", [], "any", false, false, false, 56), "id", [], "any", false, false, false, 56)]), "html", null, true);
                        echo "\"
                                       style=\"color: #0d0d0d\">";
                        // line 57
                        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["s"], 0, [], "array", false, false, false, 57), "absence", [], "any", false, false, false, 57), "predmet", [], "any", false, false, false, 57), "zkratka", [], "any", false, false, false, 57), "html", null, true);
                        echo "</a>
                                </td>
                            ";
                    }
                    // line 60
                    echo "
                        ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['s'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 62
                echo "                    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['d'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 63
            echo "
                </tr>

            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['den'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 67
        echo "
            </tbody>
        </table>
    </div>

    <hr>

    <div class=\"text-left\">
        ";
        // line 75
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 75, $this->source); })()), 'form_start');
        echo "

        <div class=\"input-group mb-3\">
            <div class=\"input-group-prepend\">
                <span class=\"input-group-text\">Od: </span>
            </div>
            ";
        // line 81
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 81, $this->source); })()), "dateZ", [], "any", false, false, false, 81), 'widget');
        echo "
        </div>
        <div class=\"input-group mb-3\">
            <div class=\"input-group-prepend\">
                <span class=\"input-group-text\">Do: </span>
            </div>
            ";
        // line 87
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 87, $this->source); })()), "dateK", [], "any", false, false, false, 87), 'widget');
        echo "
        </div>

            ";
        // line 90
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 90, $this->source); })()), "save", [], "any", false, false, false, 90), 'widget');
        echo "

        ";
        // line 92
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 92, $this->source); })()), 'form_end');
        echo "
    </div>

";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    public function getTemplateName()
    {
        return "absence/showUc.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  292 => 92,  287 => 90,  281 => 87,  272 => 81,  263 => 75,  253 => 67,  244 => 63,  238 => 62,  231 => 60,  225 => 57,  221 => 56,  218 => 55,  216 => 54,  213 => 53,  208 => 52,  194 => 51,  188 => 47,  185 => 46,  178 => 42,  174 => 41,  171 => 40,  168 => 39,  165 => 38,  147 => 37,  144 => 36,  140 => 35,  134 => 32,  129 => 29,  125 => 28,  118 => 23,  109 => 20,  106 => 19,  102 => 18,  88 => 6,  78 => 5,  59 => 3,  36 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends 'base.html.twig' %}

{% block title %}Suplování{% endblock %}

{% block body %}

    <h2>Suplování</h2>

    <hr>

    <div class=\"shadow\" style=\"width: max-content;\">
        <table id=\"table\" data-toggle=\"table\" data-height=\"500\"
               class=\"table table-bordered table-borderless\">
            <thead class=\"thead-light\">
            <tr>
                <th data-field=\"Den\">Den</th>

                {% for d in doba %}

                    <th>{{ d.doba|date('H:i') }}</th>

                {% endfor %}

            </tr>
            </thead>
            <tbody>

            {% for den in den %}

                <tr>
                    <td style=\"background-color: #808080; color: #f2f2f2\">
                        {{ den.den }}
                    </td>

                    {% for d in doba %}
                        {% set stopper = 0 %}
                        {% for c in cas %}
                            {% if c.doba == d and c.den == den and c.ucitel == ucitel %}
                                {% set stopper = 1 %}
                                <td style=\"background-color: #bfbfbf\">
                                    <a href=\"{{ path('time_table.show', {id: c.id}) }}\"
                                       style=\"color: #0d0d0d\">{{ c.predmet.zkratka }}</a>
                                </td>

                            {% endif %}
                            {% if  stopper == 0 and loop.last %}

                                    <td></td>

                            {% endif %}
                        {% endfor %}
                        {% for s in suplovani %}

                            {% if s[1] == den and s[0].absence.doba == d %}
                                <td style=\"background-color: #969696\">
                                    <a href=\"{{ path('time_table.show', {id: s[0].absence.cas.id}) }}\"
                                       style=\"color: #0d0d0d\">{{ s[0].absence.predmet.zkratka }}</a>
                                </td>
                            {% endif %}

                        {% endfor %}
                    {% endfor %}

                </tr>

            {% endfor %}

            </tbody>
        </table>
    </div>

    <hr>

    <div class=\"text-left\">
        {{ form_start(form) }}

        <div class=\"input-group mb-3\">
            <div class=\"input-group-prepend\">
                <span class=\"input-group-text\">Od: </span>
            </div>
            {{ form_widget(form.dateZ) }}
        </div>
        <div class=\"input-group mb-3\">
            <div class=\"input-group-prepend\">
                <span class=\"input-group-text\">Do: </span>
            </div>
            {{ form_widget(form.dateK) }}
        </div>

            {{ form_widget(form.save) }}

        {{ form_end(form) }}
    </div>

{% endblock %}

", "absence/showUc.html.twig", "C:\\Users\\JanVe\\Desktop\\BakalarskaPrace\\www\\Thesis\\templates\\absence\\showUc.html.twig");
    }
}
