<?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/indexUc.html.twig */
class __TwigTemplate_ea367ec3a0e43b46ee592338f51c50877cff5d113134daaac8a37422ec4ef763 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/indexUc.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/indexUc.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "absence/indexUc.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>

    <a href=\"";
        // line 11
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("absence.all", ["dateZ" => twig_date_format_filter($this->env, "now", "d-m-Y"), "dateK" => twig_date_format_filter($this->env, "now", "d-m-Y")]), "html", null, true);
        echo "\" class=\"btn btn-outline-primary float-left\">Seznam veškerého suplování</a>
    <br><br>

    <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=\"zaci\">Učitelé</th>
                <th> Datum </th>
                <th> Hodina </th>
                <th> Předmět </th>
                <th> Supluje </th>
                <th> Přítomen </th>
            </tr>
            </thead>
            <tbody>

            ";
        // line 29
        $context["dat"] = null;
        // line 30
        echo "            ";
        $context["poc"] = 0;
        // line 31
        echo "            ";
        $context["poc2"] = 0;
        // line 32
        echo "
            ";
        // line 33
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["vysledek"]) || array_key_exists("vysledek", $context) ? $context["vysledek"] : (function () { throw new RuntimeError('Variable "vysledek" does not exist.', 33, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["v"]) {
            // line 34
            echo "                ";
            if (0 !== twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 0, [], "array", false, false, false, 34), "jmeno", [], "any", false, false, false, 34), "Admin")) {
                // line 35
                echo "                    <tr>
                        <td style=\"background-color: #808080; color: #f2f2f2\">
                            <a href=\"#\" style=\"color: #0d0d0d\">";
                // line 37
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 0, [], "array", false, false, false, 37), "jmeno", [], "any", false, false, false, 37), "html", null, true);
                echo " ";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 0, [], "array", false, false, false, 37), "prijmeni", [], "any", false, false, false, 37), "html", null, true);
                echo "</a>
                        </td>

                        <td>
                            ";
                // line 41
                if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 41), null)) {
                    // line 42
                    echo "                                ";
                    echo twig_escape_filter($this->env, twig_date_format_filter($this->env, (isset($context["datum"]) || array_key_exists("datum", $context) ? $context["datum"] : (function () { throw new RuntimeError('Variable "datum" does not exist.', 42, $this->source); })()), "d-M-Y"), "html", null, true);
                    echo "
                            ";
                } else {
                    // line 44
                    echo "                                ";
                    echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 44), "datum", [], "any", false, false, false, 44), "d-M-Y"), "html", null, true);
                    echo "
                            ";
                }
                // line 46
                echo "                        </td>

                        <td>
                            ";
                // line 49
                if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 49), null)) {
                    // line 50
                    echo "                                ";
                    echo twig_escape_filter($this->env, (isset($context["doba"]) || array_key_exists("doba", $context) ? $context["doba"] : (function () { throw new RuntimeError('Variable "doba" does not exist.', 50, $this->source); })()), "html", null, true);
                    echo "
                            ";
                } else {
                    // line 52
                    echo "                                ";
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 52), "doba", [], "any", false, false, false, 52), "html", null, true);
                    echo "
                            ";
                }
                // line 54
                echo "                        </td>

                        <td>
                            ";
                // line 57
                if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 57), null)) {
                    // line 58
                    echo "                                ";
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["v"], 1, [], "array", false, false, false, 58), "html", null, true);
                    echo "
                            ";
                } else {
                    // line 60
                    echo "                                ";
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 60), "predmet", [], "any", false, false, false, 60), "html", null, true);
                    echo "
                            ";
                }
                // line 62
                echo "                        </td>

                        <td>
                            ";
                // line 65
                if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 65), null)) {
                    // line 66
                    echo "                                <span>N/A</span>
                            ";
                } else {
                    // line 68
                    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.', 68, $this->source); })()));
                    foreach ($context['_seq'] as $context["_key"] => $context["s"]) {
                        // line 69
                        echo "                                    ";
                        if (0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["s"], "absence", [], "any", false, false, false, 69), "id", [], "any", false, false, false, 69), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 69), "id", [], "any", false, false, false, 69))) {
                            // line 70
                            echo "                                        ";
                            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["s"], "ucitel", [], "any", false, false, false, 70), "jmeno", [], "any", false, false, false, 70), "html", null, true);
                            echo " ";
                            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["s"], "ucitel", [], "any", false, false, false, 70), "prijmeni", [], "any", false, false, false, 70), "html", null, true);
                            echo "
                                    ";
                        }
                        // line 72
                        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 73
                    echo "                            ";
                }
                // line 74
                echo "                        </td>

                        <td style=\"background-color: #bfbfbf\">
                            ";
                // line 77
                if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["v"], 1, [], "array", false, false, false, 77), null)) {
                    // line 78
                    echo "                                <span>N/A</span>
                            ";
                } else {
                    // line 80
                    echo "                                ";
                    if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 80), null)) {
                        // line 81
                        echo "                                    <a href=\"";
                        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("absence.createUc", ["ucitel" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 0, [], "array", false, false, false, 81), "id", [], "any", false, false, false, 81), "date" => twig_date_format_filter($this->env, (isset($context["datum"]) || array_key_exists("datum", $context) ? $context["datum"] : (function () { throw new RuntimeError('Variable "datum" does not exist.', 81, $this->source); })()), "d-m-Y"), "doba" => twig_get_attribute($this->env, $this->source, (isset($context["doba"]) || array_key_exists("doba", $context) ? $context["doba"] : (function () { throw new RuntimeError('Variable "doba" does not exist.', 81, $this->source); })()), "id", [], "any", false, false, false, 81), "predmet" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 1, [], "array", false, false, false, 81), "id", [], "any", false, false, false, 81)]), "html", null, true);
                        echo "\">Změnit</a>
                                    (Ano)
                                ";
                    } else {
                        // line 84
                        echo "                                    <a href=\"";
                        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("absence.createUc", ["ucitel" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 0, [], "array", false, false, false, 84), "id", [], "any", false, false, false, 84), "date" => twig_date_format_filter($this->env, (isset($context["datum"]) || array_key_exists("datum", $context) ? $context["datum"] : (function () { throw new RuntimeError('Variable "datum" does not exist.', 84, $this->source); })()), "d-m-Y"), "doba" => twig_get_attribute($this->env, $this->source, (isset($context["doba"]) || array_key_exists("doba", $context) ? $context["doba"] : (function () { throw new RuntimeError('Variable "doba" does not exist.', 84, $this->source); })()), "id", [], "any", false, false, false, 84), "predmet" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 1, [], "array", false, false, false, 84), "id", [], "any", false, false, false, 84)]), "html", null, true);
                        echo "\">Změnit</a>
                                    ";
                        // line 85
                        if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["v"], 2, [], "array", false, false, false, 85), "pritomen", [], "any", false, false, false, 85)) {
                            // line 86
                            echo "                                        (Ano)
                                    ";
                        } else {
                            // line 88
                            echo "                                        (Ne)
                                    ";
                        }
                        // line 90
                        echo "                                ";
                    }
                    // line 91
                    echo "                            ";
                }
                // line 92
                echo "                        </td>
                    </tr>
                ";
            }
            // line 95
            echo "            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['v'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 96
        echo "            </tbody>
        </table>
    </div>

    <hr>

        <div class=\"text-left\">
            ";
        // line 103
        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.', 103, $this->source); })()), 'form_start');
        echo "

            <div class=\"input-group mb-3\">
                <div class=\"input-group-prepend\">
                    ";
        // line 107
        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.', 107, $this->source); })()), "zobrazit", [], "any", false, false, false, 107), 'widget');
        echo "
                </div>
                ";
        // line 109
        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.', 109, $this->source); })()), "doba", [], "any", false, false, false, 109), 'widget');
        echo "
                ";
        // line 110
        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.', 110, $this->source); })()), "datum", [], "any", false, false, false, 110), 'widget');
        echo "
            </div>

            ";
        // line 113
        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.', 113, $this->source); })()), 'form_end');
        echo "
        </div>

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

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  319 => 113,  313 => 110,  309 => 109,  304 => 107,  297 => 103,  288 => 96,  282 => 95,  277 => 92,  274 => 91,  271 => 90,  267 => 88,  263 => 86,  261 => 85,  256 => 84,  249 => 81,  246 => 80,  242 => 78,  240 => 77,  235 => 74,  232 => 73,  226 => 72,  218 => 70,  215 => 69,  210 => 68,  206 => 66,  204 => 65,  199 => 62,  193 => 60,  187 => 58,  185 => 57,  180 => 54,  174 => 52,  168 => 50,  166 => 49,  161 => 46,  155 => 44,  149 => 42,  147 => 41,  138 => 37,  134 => 35,  131 => 34,  127 => 33,  124 => 32,  121 => 31,  118 => 30,  116 => 29,  95 => 11,  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>

    <a href=\"{{path('absence.all', {dateZ: \"now\"|date(\"d-m-Y\"), dateK: \"now\"|date(\"d-m-Y\") })}}\" class=\"btn btn-outline-primary float-left\">Seznam veškerého suplování</a>
    <br><br>

    <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=\"zaci\">Učitelé</th>
                <th> Datum </th>
                <th> Hodina </th>
                <th> Předmět </th>
                <th> Supluje </th>
                <th> Přítomen </th>
            </tr>
            </thead>
            <tbody>

            {% set dat = NULL %}
            {% set poc = 0 %}
            {% set poc2 = 0 %}

            {% for v in vysledek %}
                {% if v[0].jmeno != \"Admin\" %}
                    <tr>
                        <td style=\"background-color: #808080; color: #f2f2f2\">
                            <a href=\"#\" style=\"color: #0d0d0d\">{{ v[0].jmeno }} {{ v[0].prijmeni }}</a>
                        </td>

                        <td>
                            {% if v[2] == null %}
                                {{ datum|date(\"d-M-Y\") }}
                            {% else %}
                                {{ v[2].datum|date(\"d-M-Y\") }}
                            {% endif %}
                        </td>

                        <td>
                            {% if v[2] == null %}
                                {{ doba }}
                            {% else %}
                                {{ v[2].doba }}
                            {% endif %}
                        </td>

                        <td>
                            {% if v[2] == null %}
                                {{ v[1] }}
                            {% else %}
                                {{ v[2].predmet }}
                            {% endif %}
                        </td>

                        <td>
                            {% if v[2] == null %}
                                <span>N/A</span>
                            {% else %}
                                {% for s in suplovani %}
                                    {% if s.absence.id == v[2].id %}
                                        {{ s.ucitel.jmeno }} {{ s.ucitel.prijmeni }}
                                    {% endif %}
                                {% endfor %}
                            {% endif %}
                        </td>

                        <td style=\"background-color: #bfbfbf\">
                            {% if v[1] == null %}
                                <span>N/A</span>
                            {% else %}
                                {% if v[2] == null %}
                                    <a href=\"{{path('absence.createUc', {ucitel: v[0].id, date: datum|date(\"d-m-Y\"), doba: doba.id, predmet: v[1].id}) }}\">Změnit</a>
                                    (Ano)
                                {% else %}
                                    <a href=\"{{path('absence.createUc', {ucitel: v[0].id, date: datum|date(\"d-m-Y\"), doba: doba.id, predmet: v[1].id}) }}\">Změnit</a>
                                    {% if v[2].pritomen %}
                                        (Ano)
                                    {% else %}
                                        (Ne)
                                    {% endif %}
                                {% endif %}
                            {% endif %}
                        </td>
                    </tr>
                {% endif %}
            {% endfor %}
            </tbody>
        </table>
    </div>

    <hr>

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

            <div class=\"input-group mb-3\">
                <div class=\"input-group-prepend\">
                    {{ form_widget(form.zobrazit) }}
                </div>
                {{ form_widget(form.doba) }}
                {{ form_widget(form.datum) }}
            </div>

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

{% endblock %}

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