<?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/month_by_user.html.twig */
class __TwigTemplate_c78bd4f2626d50bd05f97181764b7a3ed10234199a3a521081a80baaf9cc2d85 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/month_by_user.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_user_month", [], "reporting"), "html", null, true);
    }

    // line 5
    public function block_report($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 6
        echo "
    ";
        // line 7
        $context["hasData"] = false;
        // line 8
        echo "    ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["days"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
            // line 9
            echo "        ";
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["day"], "details", [], "any", false, false, false, 9))) {
                // line 10
                echo "            ";
                $context["hasData"] = true;
                // line 11
                echo "        ";
            }
            // line 12
            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 13
        echo "
    ";
        // line 14
        $this->loadTemplate("reporting/month_by_user.html.twig", "reporting/month_by_user.html.twig", 14, "834656193")->display($context);
        // line 95
        echo "
";
    }

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  115 => 107,  107 => 103,  105 => 102,  98 => 99,  94 => 98,  89 => 95,  87 => 14,  84 => 13,  78 => 12,  75 => 11,  72 => 10,  69 => 9,  64 => 8,  62 => 7,  59 => 6,  55 => 5,  48 => 3,  37 => 1,);
    }

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


/* reporting/month_by_user.html.twig */
class __TwigTemplate_c78bd4f2626d50bd05f97181764b7a3ed10234199a3a521081a80baaf9cc2d85___834656193 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 14
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

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

    // line 16
    public function block_box_before($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 17
        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_user_month"), "attr" => ["class" => "form-inline"]]);
        echo "
        ";
    }

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

    // line 22
    public function block_box_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 23
        echo "            ";
        if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "user", [], "any", true, true, false, 23)) {
            // line 24
            echo "                ";
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "user", [], "any", false, false, false, 24), 'row', ["label" => false]);
            echo "
            ";
        } else {
            // line 26
            echo "                ";
            echo twig_call_macro($macros["widgets"], "macro_username", [($context["user"] ?? null)], 26, $context, $this->getSourceContext());
            echo "
            ";
        }
        // line 28
        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, 28), 'widget');
        echo "
        ";
    }

    // line 30
    public function block_box_body_class($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "user-month-reporting-box table-responsive";
        if (($context["hasData"] ?? null)) {
            echo " no-padding";
        }
    }

    // line 31
    public function block_box_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 32
        echo "            ";
        if ( !($context["hasData"] ?? null)) {
            // line 33
            echo "                ";
            echo twig_call_macro($macros["widgets"], "macro_nothing_found", [], 33, $context, $this->getSourceContext());
            echo "
            ";
        } else {
            // line 35
            echo "            <table class=\"table table-bordered table-hover dataTable\">
                <tr>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    ";
            // line 39
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["days"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
                // line 40
                echo "                    <th class=\"text-center text-nowrap";
                if (call_user_func_array($this->env->getTest('weekend')->getCallable(), [twig_get_attribute($this->env, $this->source, $context["day"], "day", [], "any", false, false, false, 40)])) {
                    echo " weekend";
                }
                echo "\">
                        ";
                // line 41
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dayName(twig_get_attribute($this->env, $this->source, $context["day"], "day", [], "any", false, false, false, 41), true), "html", null, true);
                echo "<br>
                        ";
                // line 42
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateFormat(twig_get_attribute($this->env, $this->source, $context["day"], "day", [], "any", false, false, false, 42), "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 45
            echo "                </tr>
                ";
            // line 46
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["rows"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["project"]) {
                // line 47
                echo "                    <tr class=\"project\">
                        <td class=\"text-nowrap\">
                            <strong>";
                // line 49
                echo twig_call_macro($macros["widgets"], "macro_label_project", [twig_get_attribute($this->env, $this->source, $context["project"], "project", [], "any", false, false, false, 49)], 49, $context, $this->getSourceContext());
                echo "</strong>
                        </td>
                        <th class=\"text-nowrap text-center total\">";
                // line 51
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(twig_get_attribute($this->env, $this->source, $context["project"], "duration", [], "any", false, false, false, 51)), "html", null, true);
                echo "</th>
                        ";
                // line 52
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["project"], "days", [], "any", false, false, false, 52));
                foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
                    // line 53
                    echo "                            <td class=\"text-nowrap text-center day-total";
                    if (call_user_func_array($this->env->getTest('weekend')->getCallable(), [twig_get_attribute($this->env, $this->source, $context["day"], "date", [], "any", false, false, false, 53)])) {
                        echo " weekend";
                    }
                    echo "\">
                                ";
                    // line 54
                    if (1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["day"], "duration", [], "any", false, false, false, 54), 0)) {
                        // line 55
                        echo "                                    <strong>";
                        echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(twig_get_attribute($this->env, $this->source, $context["day"], "duration", [], "any", false, false, false, 55)), "html", null, true);
                        echo "</strong>
                                ";
                    }
                    // line 57
                    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 59
                echo "                    </tr>
                    ";
                // line 60
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["project"], "activities", [], "any", false, false, false, 60));
                foreach ($context['_seq'] as $context["_key"] => $context["activity"]) {
                    // line 61
                    echo "                    <tr class=\"activity\">
                        <td class=\"text-nowrap\">
                            ";
                    // line 63
                    echo twig_call_macro($macros["widgets"], "macro_label_activity", [twig_get_attribute($this->env, $this->source, $context["activity"], "activity", [], "any", false, false, false, 63)], 63, $context, $this->getSourceContext());
                    echo "
                        </td>
                        <th class=\"text-nowrap text-center total\">";
                    // line 65
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(twig_get_attribute($this->env, $this->source, $context["activity"], "duration", [], "any", false, false, false, 65)), "html", null, true);
                    echo "</th>
                        ";
                    // line 66
                    $context['_parent'] = $context;
                    $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["activity"], "days", [], "any", false, false, false, 66));
                    foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
                        // line 67
                        echo "                            <td class=\"text-nowrap text-center day-total";
                        if (call_user_func_array($this->env->getTest('weekend')->getCallable(), [twig_get_attribute($this->env, $this->source, $context["day"], "date", [], "any", false, false, false, 67)])) {
                            echo " weekend";
                        }
                        echo "\">
                                ";
                        // line 68
                        if (1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["day"], "duration", [], "any", false, false, false, 68), 0)) {
                            // line 69
                            echo "                                    ";
                            echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(twig_get_attribute($this->env, $this->source, $context["day"], "duration", [], "any", false, false, false, 69)), "html", null, true);
                            echo "
                                ";
                        }
                        // line 71
                        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 73
                    echo "                    </tr>
                    ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['activity'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 75
                echo "                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['project'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 76
            echo "                ";
            $context["total"] = 0;
            // line 77
            echo "                <tr class=\"summary\">
                    ";
            // line 78
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["days"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
                // line 79
                echo "                        ";
                $context["total"] = (($context["total"] ?? null) + twig_get_attribute($this->env, $this->source, $context["day"], "totalDuration", [], "any", false, false, false, 79));
                // line 80
                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 81
            echo "                    <th></th>
                    <th class=\"text-nowrap text-center total\">";
            // line 82
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(($context["total"] ?? null)), "html", null, true);
            echo "</th>
                    ";
            // line 83
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["days"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["day"]) {
                // line 84
                echo "                        <th class=\"text-nowrap text-center 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, 84)])) {
                    echo " weekend";
                }
                echo "\">
                            ";
                // line 85
                if (1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["day"], "totalDuration", [], "any", false, false, false, 85), 0)) {
                    // line 86
                    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, 86)), "html", null, true);
                    echo "
                            ";
                }
                // line 88
                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 90
            echo "                </tr>
            </table>
            ";
        }
        // line 93
        echo "        ";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  448 => 93,  443 => 90,  436 => 88,  430 => 86,  428 => 85,  421 => 84,  417 => 83,  413 => 82,  410 => 81,  404 => 80,  401 => 79,  397 => 78,  394 => 77,  391 => 76,  385 => 75,  378 => 73,  371 => 71,  365 => 69,  363 => 68,  356 => 67,  352 => 66,  348 => 65,  343 => 63,  339 => 61,  335 => 60,  332 => 59,  325 => 57,  319 => 55,  317 => 54,  310 => 53,  306 => 52,  302 => 51,  297 => 49,  293 => 47,  289 => 46,  286 => 45,  277 => 42,  273 => 41,  266 => 40,  262 => 39,  256 => 35,  250 => 33,  247 => 32,  243 => 31,  233 => 30,  226 => 28,  220 => 26,  214 => 24,  211 => 23,  207 => 22,  200 => 20,  196 => 19,  189 => 17,  185 => 16,  180 => 14,  178 => 15,  171 => 14,  115 => 107,  107 => 103,  105 => 102,  98 => 99,  94 => 98,  89 => 95,  87 => 14,  84 => 13,  78 => 12,  75 => 11,  72 => 10,  69 => 9,  64 => 8,  62 => 7,  59 => 6,  55 => 5,  48 => 3,  37 => 1,);
    }

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