<?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/index.html.twig */
class __TwigTemplate_28ee3f3d938bc91d73d3b5943ac594981be5f2729013805e822ab667a8eb4893 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/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", "absence/index.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "absence/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 "Docházka";
        
        $__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>Docházka</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=\"zaci\">Žáci</th>
                <th> Celk. Poč. zameškaných hodin</th>
                <th> Datum </th>
                <th> Předmět </th>
                <th> Info </th>
                <th> Přítomen </th>
            </tr>
            </thead>
            <tbody>

            ";
        // line 26
        $context["dat"] = null;
        // line 27
        echo "            ";
        $context["poc"] = 0;
        // line 28
        echo "            ";
        $context["poc2"] = 0;
        // line 29
        echo "            ";
        $context["p"] = (isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 29, $this->source); })());
        // line 30
        echo "            ";
        $context["vysledek"] = null;
        // line 31
        echo "
            ";
        // line 32
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["zaci"]) || array_key_exists("zaci", $context) ? $context["zaci"] : (function () { throw new RuntimeError('Variable "zaci" does not exist.', 32, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["z"]) {
            // line 33
            echo "                ";
            if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["z"], "trida", [], "any", false, false, false, 33), (isset($context["tridavar"]) || array_key_exists("tridavar", $context) ? $context["tridavar"] : (function () { throw new RuntimeError('Variable "tridavar" does not exist.', 33, $this->source); })())) || 0 === twig_compare((isset($context["tridavar"]) || array_key_exists("tridavar", $context) ? $context["tridavar"] : (function () { throw new RuntimeError('Variable "tridavar" does not exist.', 33, $this->source); })()), null))) {
                // line 34
                echo "                    ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["z"], "absence", [], "any", false, false, false, 34));
                foreach ($context['_seq'] as $context["_key"] => $context["a"]) {
                    // line 35
                    echo "                        ";
                    if (0 === twig_compare((isset($context["tridavar"]) || array_key_exists("tridavar", $context) ? $context["tridavar"] : (function () { throw new RuntimeError('Variable "tridavar" does not exist.', 35, $this->source); })()), null)) {
                        // line 36
                        echo "                            ";
                        if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["a"], "pritomen", [], "any", false, false, false, 36), 0)) {
                            // line 37
                            echo "                                ";
                            $context["poc2"] = ((isset($context["poc2"]) || array_key_exists("poc2", $context) ? $context["poc2"] : (function () { throw new RuntimeError('Variable "poc2" does not exist.', 37, $this->source); })()) + 1);
                            // line 38
                            echo "                            ";
                        }
                        // line 39
                        echo "                        ";
                    } else {
                        // line 40
                        echo "                            ";
                        if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["a"], "pritomen", [], "any", false, false, false, 40), 0)) {
                            // line 41
                            echo "                                ";
                            $context["poc"] = ((isset($context["poc"]) || array_key_exists("poc", $context) ? $context["poc"] : (function () { throw new RuntimeError('Variable "poc" does not exist.', 41, $this->source); })()) + 1);
                            // line 42
                            echo "                            ";
                        }
                        // line 43
                        echo "                        ";
                    }
                    // line 44
                    echo "                        ";
                    if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["a"], "datum", [], "any", false, false, false, 44), (isset($context["datum"]) || array_key_exists("datum", $context) ? $context["datum"] : (function () { throw new RuntimeError('Variable "datum" does not exist.', 44, $this->source); })()))) {
                        // line 45
                        echo "
                            ";
                        // line 46
                        if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["a"], "predmet", [], "any", false, false, false, 46), (isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 46, $this->source); })())) && 0 === twig_compare( !(isset($context["tridavar"]) || array_key_exists("tridavar", $context) ? $context["tridavar"] : (function () { throw new RuntimeError('Variable "tridavar" does not exist.', 46, $this->source); })()), null))) {
                            // line 47
                            echo "                                ";
                            $context["vysledek"] = $context["a"];
                            // line 48
                            echo "                            ";
                        }
                        // line 49
                        echo "                        ";
                    }
                    // line 50
                    echo "                    ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 51
                echo "
                <tr>

                    <td style=\"background-color: #808080; color: #f2f2f2\">
                        <a href=\"";
                // line 55
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("zak.show", ["id" => twig_get_attribute($this->env, $this->source, $context["z"], "id", [], "any", false, false, false, 55)]), "html", null, true);
                echo "\" style=\"color: #0d0d0d\">";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["z"], "jmeno", [], "any", false, false, false, 55), "html", null, true);
                echo " ";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["z"], "prijmeni", [], "any", false, false, false, 55), "html", null, true);
                echo "</a>
                    </td>

                    <td>
                        ";
                // line 59
                if (0 === twig_compare((isset($context["tridavar"]) || array_key_exists("tridavar", $context) ? $context["tridavar"] : (function () { throw new RuntimeError('Variable "tridavar" does not exist.', 59, $this->source); })()), null)) {
                    // line 60
                    echo "                            ";
                    echo twig_escape_filter($this->env, (isset($context["poc2"]) || array_key_exists("poc2", $context) ? $context["poc2"] : (function () { throw new RuntimeError('Variable "poc2" does not exist.', 60, $this->source); })()), "html", null, true);
                    echo "
                        ";
                } else {
                    // line 62
                    echo "                            ";
                    echo twig_escape_filter($this->env, (isset($context["poc"]) || array_key_exists("poc", $context) ? $context["poc"] : (function () { throw new RuntimeError('Variable "poc" does not exist.', 62, $this->source); })()), "html", null, true);
                    echo "
                        ";
                }
                // line 64
                echo "                    </td>

                    <td>
                        ";
                // line 67
                if (0 === twig_compare((isset($context["vysledek"]) || array_key_exists("vysledek", $context) ? $context["vysledek"] : (function () { throw new RuntimeError('Variable "vysledek" does not exist.', 67, $this->source); })()), null)) {
                    // line 68
                    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.', 68, $this->source); })()), "d-M-Y"), "html", null, true);
                    echo "
                        ";
                } else {
                    // line 70
                    echo "                            ";
                    echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["vysledek"]) || array_key_exists("vysledek", $context) ? $context["vysledek"] : (function () { throw new RuntimeError('Variable "vysledek" does not exist.', 70, $this->source); })()), "datum", [], "any", false, false, false, 70), "d-M-Y"), "html", null, true);
                    echo "
                        ";
                }
                // line 72
                echo "                    </td>

                    <td>
                        ";
                // line 75
                if (0 === twig_compare((isset($context["vysledek"]) || array_key_exists("vysledek", $context) ? $context["vysledek"] : (function () { throw new RuntimeError('Variable "vysledek" does not exist.', 75, $this->source); })()), null)) {
                    // line 76
                    echo "                            ";
                    if (0 === twig_compare((isset($context["tridavar"]) || array_key_exists("tridavar", $context) ? $context["tridavar"] : (function () { throw new RuntimeError('Variable "tridavar" does not exist.', 76, $this->source); })()), null)) {
                        // line 77
                        echo "                                ";
                        $context["predmet"] = twig_get_attribute($this->env, $this->source, (isset($context["control"]) || array_key_exists("control", $context) ? $context["control"] : (function () { throw new RuntimeError('Variable "control" does not exist.', 77, $this->source); })()), "findPredmet", [0 => (isset($context["casrep"]) || array_key_exists("casrep", $context) ? $context["casrep"] : (function () { throw new RuntimeError('Variable "casrep" does not exist.', 77, $this->source); })()), 1 => (isset($context["datum"]) || array_key_exists("datum", $context) ? $context["datum"] : (function () { throw new RuntimeError('Variable "datum" does not exist.', 77, $this->source); })()), 2 => (isset($context["doba"]) || array_key_exists("doba", $context) ? $context["doba"] : (function () { throw new RuntimeError('Variable "doba" does not exist.', 77, $this->source); })()), 3 => twig_get_attribute($this->env, $this->source, $context["z"], "trida", [], "any", false, false, false, 77)], "method", false, false, false, 77);
                        // line 78
                        echo "                            ";
                    }
                    // line 79
                    echo "                            ";
                    echo twig_escape_filter($this->env, (isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 79, $this->source); })()), "html", null, true);
                    echo "
                            ";
                    // line 80
                    if (0 === twig_compare((isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 80, $this->source); })()), null)) {
                        // line 81
                        echo "                            <span>N/A</span>
                            ";
                    }
                    // line 83
                    echo "                        ";
                } else {
                    // line 84
                    echo "                            ";
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["vysledek"]) || array_key_exists("vysledek", $context) ? $context["vysledek"] : (function () { throw new RuntimeError('Variable "vysledek" does not exist.', 84, $this->source); })()), "predmet", [], "any", false, false, false, 84), "html", null, true);
                    echo "
                        ";
                }
                // line 86
                echo "                    </td>

                    <td style=\"background-color: #bfbfbf\">
                        ";
                // line 89
                if (0 === twig_compare((isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 89, $this->source); })()), null)) {
                    // line 90
                    echo "                            <span>N/A</span>
                        ";
                } else {
                    // line 92
                    echo "                            <a href=\"";
                    echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("absence.show", ["zak" => twig_get_attribute($this->env, $this->source, $context["z"], "id", [], "any", false, false, false, 92)]), "html", null, true);
                    echo "\">Zobrazit</a>
                        ";
                }
                // line 94
                echo "                    </td>

                    <td style=\"background-color: #bfbfbf\">
                        ";
                // line 97
                if ((0 === twig_compare((isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 97, $this->source); })()), null) || 0 === twig_compare((isset($context["tridavar"]) || array_key_exists("tridavar", $context) ? $context["tridavar"] : (function () { throw new RuntimeError('Variable "tridavar" does not exist.', 97, $this->source); })()), null))) {
                    // line 98
                    echo "                            ";
                    $context["predmet"] = twig_get_attribute($this->env, $this->source, (isset($context["control"]) || array_key_exists("control", $context) ? $context["control"] : (function () { throw new RuntimeError('Variable "control" does not exist.', 98, $this->source); })()), "findPredmet", [0 => (isset($context["casrep"]) || array_key_exists("casrep", $context) ? $context["casrep"] : (function () { throw new RuntimeError('Variable "casrep" does not exist.', 98, $this->source); })()), 1 => (isset($context["datum"]) || array_key_exists("datum", $context) ? $context["datum"] : (function () { throw new RuntimeError('Variable "datum" does not exist.', 98, $this->source); })()), 2 => (isset($context["doba"]) || array_key_exists("doba", $context) ? $context["doba"] : (function () { throw new RuntimeError('Variable "doba" does not exist.', 98, $this->source); })()), 3 => twig_get_attribute($this->env, $this->source, $context["z"], "trida", [], "any", false, false, false, 98)], "method", false, false, false, 98);
                    // line 99
                    echo "                        ";
                }
                // line 100
                echo "                    ";
                if (0 === twig_compare( !(isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 100, $this->source); })()), null)) {
                    // line 101
                    echo "                        <a href=\"";
                    echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("absence.create", ["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.', 101, $this->source); })()), "d-m-Y"), "id" => twig_get_attribute($this->env, $this->source, $context["z"], "id", [], "any", false, false, false, 101), "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.', 101, $this->source); })()), "id", [], "any", false, false, false, 101), "predmet" => twig_get_attribute($this->env, $this->source, (isset($context["predmet"]) || array_key_exists("predmet", $context) ? $context["predmet"] : (function () { throw new RuntimeError('Variable "predmet" does not exist.', 101, $this->source); })()), "id", [], "any", false, false, false, 101), "cas" => twig_get_attribute($this->env, $this->source, (isset($context["cas"]) || array_key_exists("cas", $context) ? $context["cas"] : (function () { throw new RuntimeError('Variable "cas" does not exist.', 101, $this->source); })()), "id", [], "any", false, false, false, 101)]), "html", null, true);
                    echo "\">Změnit</a>
                        ";
                    // line 102
                    if (0 === twig_compare((isset($context["vysledek"]) || array_key_exists("vysledek", $context) ? $context["vysledek"] : (function () { throw new RuntimeError('Variable "vysledek" does not exist.', 102, $this->source); })()), null)) {
                        // line 103
                        echo "                            (Ano)
                        ";
                    } else {
                        // line 105
                        echo "                            ";
                        if (twig_get_attribute($this->env, $this->source, (isset($context["vysledek"]) || array_key_exists("vysledek", $context) ? $context["vysledek"] : (function () { throw new RuntimeError('Variable "vysledek" does not exist.', 105, $this->source); })()), "pritomen", [], "any", false, false, false, 105)) {
                            // line 106
                            echo "                                (Ano)
                            ";
                        } else {
                            // line 108
                            echo "                                (Ne)
                            ";
                        }
                        // line 110
                        echo "                        ";
                    }
                    // line 111
                    echo "                    ";
                } else {
                    // line 112
                    echo "                        <span>N/A</span>
                    ";
                }
                // line 114
                echo "                    </td>

                </tr>

                    ";
                // line 118
                $context["poc"] = 0;
                // line 119
                echo "                    ";
                $context["poc2"] = 0;
                // line 120
                echo "
                ";
            }
            // line 122
            echo "            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['z'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 123
        echo "
            </tbody>
        </table>
    </div>

    <hr>

    ";
        // line 130
        if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_STUDENT")) {
            // line 131
            echo "
        <div class=\"text-left\">
            ";
            // line 133
            echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 133, $this->source); })()), 'form_start');
            echo "

            <div class=\"input-group mb-3\">
                <div class=\"input-group-prepend\">
                    ";
            // line 137
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 137, $this->source); })()), "zobrazit", [], "any", false, false, false, 137), 'widget');
            echo "
                </div>
                ";
            // line 139
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 139, $this->source); })()), "trida", [], "any", false, false, false, 139), 'widget');
            echo "
            </div>

            <div class=\"input-group mb-3\">
                <div class=\"input-group-prepend\">
                    <span class=\"input-group-text\">Datum a Hodina</span>
                </div>
                ";
            // line 146
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 146, $this->source); })()), "datum", [], "any", false, false, false, 146), 'widget');
            echo "
                ";
            // line 147
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 147, $this->source); })()), "cisHod", [], "any", false, false, false, 147), 'widget');
            echo "
            </div>

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

    ";
        }
        // line 154
        echo "
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  415 => 154,  408 => 150,  402 => 147,  398 => 146,  388 => 139,  383 => 137,  376 => 133,  372 => 131,  370 => 130,  361 => 123,  355 => 122,  351 => 120,  348 => 119,  346 => 118,  340 => 114,  336 => 112,  333 => 111,  330 => 110,  326 => 108,  322 => 106,  319 => 105,  315 => 103,  313 => 102,  308 => 101,  305 => 100,  302 => 99,  299 => 98,  297 => 97,  292 => 94,  286 => 92,  282 => 90,  280 => 89,  275 => 86,  269 => 84,  266 => 83,  262 => 81,  260 => 80,  255 => 79,  252 => 78,  249 => 77,  246 => 76,  244 => 75,  239 => 72,  233 => 70,  227 => 68,  225 => 67,  220 => 64,  214 => 62,  208 => 60,  206 => 59,  195 => 55,  189 => 51,  183 => 50,  180 => 49,  177 => 48,  174 => 47,  172 => 46,  169 => 45,  166 => 44,  163 => 43,  160 => 42,  157 => 41,  154 => 40,  151 => 39,  148 => 38,  145 => 37,  142 => 36,  139 => 35,  134 => 34,  131 => 33,  127 => 32,  124 => 31,  121 => 30,  118 => 29,  115 => 28,  112 => 27,  110 => 26,  88 => 6,  78 => 5,  59 => 3,  36 => 1,);
    }

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

{% block title %}Docházka{% endblock %}

{% block body %}

    <h2>Docházka</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=\"zaci\">Žáci</th>
                <th> Celk. Poč. zameškaných hodin</th>
                <th> Datum </th>
                <th> Předmět </th>
                <th> Info </th>
                <th> Přítomen </th>
            </tr>
            </thead>
            <tbody>

            {% set dat = NULL %}
            {% set poc = 0 %}
            {% set poc2 = 0 %}
            {% set p = predmet %}
            {% set vysledek = NULL %}

            {% for z in zaci %}
                {% if z.trida == tridavar or tridavar == NULL %}
                    {% for a in z.absence %}
                        {% if tridavar == NULL %}
                            {% if a.pritomen == 0 %}
                                {% set poc2 = poc2 + 1 %}
                            {% endif %}
                        {% else %}
                            {% if a.pritomen == 0 %}
                                {% set poc = poc + 1 %}
                            {% endif %}
                        {% endif %}
                        {% if a.datum == datum %}

                            {% if a.predmet == predmet and not tridavar == NULL %}
                                {% set vysledek = a %}
                            {% endif %}
                        {% endif %}
                    {% endfor %}

                <tr>

                    <td style=\"background-color: #808080; color: #f2f2f2\">
                        <a href=\"{{ path('zak.show', {id: z.id}) }}\" style=\"color: #0d0d0d\">{{ z.jmeno }} {{ z.prijmeni }}</a>
                    </td>

                    <td>
                        {% if tridavar == null %}
                            {{ poc2 }}
                        {% else %}
                            {{ poc }}
                        {% endif %}
                    </td>

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

                    <td>
                        {% if vysledek == null %}
                            {% if tridavar == null %}
                                {% set predmet = control.findPredmet(casrep, datum, doba, z.trida) %}
                            {% endif %}
                            {{ predmet }}
                            {% if predmet == null %}
                            <span>N/A</span>
                            {% endif %}
                        {% else %}
                            {{ vysledek.predmet }}
                        {% endif %}
                    </td>

                    <td style=\"background-color: #bfbfbf\">
                        {% if predmet == null %}
                            <span>N/A</span>
                        {% else %}
                            <a href=\"{{ path('absence.show', {zak: z.id}) }}\">Zobrazit</a>
                        {% endif %}
                    </td>

                    <td style=\"background-color: #bfbfbf\">
                        {% if predmet == null or tridavar == null %}
                            {% set predmet = control.findPredmet(casrep, datum, doba, z.trida) %}
                        {% endif %}
                    {% if not predmet == null %}
                        <a href=\"{{ path('absence.create', {date: datum|date(\"d-m-Y\"), id: z.id, doba: doba.id, predmet: predmet.id, cas: cas.id}) }}\">Změnit</a>
                        {% if vysledek == null %}
                            (Ano)
                        {% else %}
                            {% if vysledek.pritomen %}
                                (Ano)
                            {% else %}
                                (Ne)
                            {% endif %}
                        {% endif %}
                    {% else %}
                        <span>N/A</span>
                    {% endif %}
                    </td>

                </tr>

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

                {% endif %}
            {% endfor %}

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

    <hr>

    {% if not is_granted('ROLE_STUDENT') %}

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

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

            <div class=\"input-group mb-3\">
                <div class=\"input-group-prepend\">
                    <span class=\"input-group-text\">Datum a Hodina</span>
                </div>
                {{ form_widget(filterForm.datum) }}
                {{ form_widget(filterForm.cisHod) }}
            </div>

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

    {% endif %}

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