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

/* reporting/monthly_user_list.html.twig */
class __TwigTemplate_ca34ecdf6098f251391ee10d2ae2388d01c3308eee8ad9c4ad0f300b77974cb7 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'report_title' => [$this, 'block_report_title'],
            'report' => [$this, 'block_report'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

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

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $this->parent = $this->loadTemplate("reporting/layout.html.twig", "reporting/monthly_user_list.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_report_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("report_monthly_users", [], "reporting"), "html", null, true);
    }

    // line 5
    public function block_report($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 6
        echo "
    ";
        // line 7
        $this->loadTemplate("reporting/monthly_user_list.html.twig", "reporting/monthly_user_list.html.twig", 7, "894531760")->display($context);
        // line 59
        echo "
";
    }

    // line 62
    public function block_javascripts($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 63
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\">
        document.addEventListener('kimai.initialized', function() {
            \$('#";
        // line 66
        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, ($context["form"] ?? null), "date", [], "any", false, false, false, 66), "vars", [], "any", false, false, false, 66), "id", [], "any", false, false, false, 66), "html", null, true);
        echo "').on('change', function(ev) {
                \$(this).closest('form').submit();
            });
        });
    </script>
";
    }

    public function getTemplateName()
    {
        return "reporting/monthly_user_list.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  80 => 66,  73 => 63,  69 => 62,  64 => 59,  62 => 7,  59 => 6,  55 => 5,  48 => 3,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "reporting/monthly_user_list.html.twig", "/var/www/html/kimai2/templates/reporting/monthly_user_list.html.twig");
    }
}


/* reporting/monthly_user_list.html.twig */
class __TwigTemplate_ca34ecdf6098f251391ee10d2ae2388d01c3308eee8ad9c4ad0f300b77974cb7___894531760 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'box_before' => [$this, 'block_box_before'],
            'box_after' => [$this, 'block_box_after'],
            'box_title' => [$this, 'block_box_title'],
            'box_body_class' => [$this, 'block_box_body_class'],
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 7
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 8
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "reporting/monthly_user_list.html.twig", 8)->unwrap();
        // line 7
        $this->parent = $this->loadTemplate("@AdminLTE/Widgets/box-widget.html.twig", "reporting/monthly_user_list.html.twig", 7);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 9
    public function block_box_before($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 10
        echo "            ";
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start', ["action" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("report_monthly_users"), "attr" => ["class" => "form-inline"]]);
        echo "
        ";
    }

    // line 12
    public function block_box_after($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 13
        echo "            ";
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
        echo "
        ";
    }

    // line 15
    public function block_box_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 16
        echo "            ";
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "date", [], "any", false, false, false, 16), 'widget');
        echo "
        ";
    }

    // line 18
    public function block_box_body_class($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "monthly-user-list-reporting-box table-responsive no-padding";
    }

    // line 19
    public function block_box_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 20
        echo "            <table class=\"table table-bordered table-hover dataTable\">
                <tr>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    ";
        // line 24
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["days"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
            // line 25
            echo "                    <th class=\"text-center text-nowrap";
            if (call_user_func_array($this->env->getTest('weekend')->getCallable(), [$context["day"]])) {
                echo " weekend";
            }
            echo "\">
                        ";
            // line 26
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dayName($context["day"], true), "html", null, true);
            echo "<br>
                        ";
            // line 27
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateFormat($context["day"], "d.m"), "html", null, true);
            echo "
                    </th>
                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['day'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 30
        echo "                </tr>
                ";
        // line 31
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["rows"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["userDay"]) {
            // line 32
            echo "                    ";
            $context["usersMonthDuration"] = 0;
            // line 33
            echo "                    <tr class=\"user\">
                        <td class=\"text-nowrap\">
                            <strong>";
            // line 35
            echo twig_call_macro($macros["widgets"], "macro_username", [twig_get_attribute($this->env, $this->source, $context["userDay"], "user", [], "any", false, false, false, 35)], 35, $context, $this->getSourceContext());
            echo "</strong>
                        </td>
                        ";
            // line 37
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["userDay"], "days", [], "any", false, false, false, 37));
            foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
                // line 38
                echo "                            ";
                if (1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["day"], "totalDuration", [], "any", false, false, false, 38), 0)) {
                    // line 39
                    echo "                                ";
                    $context["usersMonthDuration"] = (($context["usersMonthDuration"] ?? null) + twig_get_attribute($this->env, $this->source, $context["day"], "totalDuration", [], "any", false, false, false, 39));
                    // line 40
                    echo "                            ";
                }
                // line 41
                echo "                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['day'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 42
            echo "                        <th class=\"text-nowrap text-center total\">
                            ";
            // line 43
            if (1 === twig_compare(($context["usersMonthDuration"] ?? null), 0)) {
                // line 44
                echo "                                ";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(($context["usersMonthDuration"] ?? null)), "html", null, true);
                echo "
                            ";
            }
            // line 46
            echo "                        </th>
                        ";
            // line 47
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["userDay"], "days", [], "any", false, false, false, 47));
            foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
                // line 48
                echo "                            <td class=\"text-nowrap day-total";
                if (call_user_func_array($this->env->getTest('weekend')->getCallable(), [twig_get_attribute($this->env, $this->source, $context["day"], "day", [], "any", false, false, false, 48)])) {
                    echo " weekend";
                }
                echo "\">
                                ";
                // line 49
                if (1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["day"], "totalDuration", [], "any", false, false, false, 49), 0)) {
                    // line 50
                    echo "                                    ";
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(twig_get_attribute($this->env, $this->source, $context["day"], "totalDuration", [], "any", false, false, false, 50)), "html", null, true);
                    echo "
                                ";
                }
                // line 52
                echo "                            </td>
                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['day'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 54
            echo "                    </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['userDay'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 56
        echo "            </table>
        ";
    }

    public function getTemplateName()
    {
        return "reporting/monthly_user_list.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  308 => 56,  301 => 54,  294 => 52,  288 => 50,  286 => 49,  279 => 48,  275 => 47,  272 => 46,  266 => 44,  264 => 43,  261 => 42,  255 => 41,  252 => 40,  249 => 39,  246 => 38,  242 => 37,  237 => 35,  233 => 33,  230 => 32,  226 => 31,  223 => 30,  214 => 27,  210 => 26,  203 => 25,  199 => 24,  193 => 20,  189 => 19,  182 => 18,  175 => 16,  171 => 15,  164 => 13,  160 => 12,  153 => 10,  149 => 9,  144 => 7,  142 => 8,  135 => 7,  80 => 66,  73 => 63,  69 => 62,  64 => 59,  62 => 7,  59 => 6,  55 => 5,  48 => 3,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "reporting/monthly_user_list.html.twig", "/var/www/html/kimai2/templates/reporting/monthly_user_list.html.twig");
    }
}
