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

/* timesheet/export.html.twig */
class __TwigTemplate_7bdb1a5ba506549050692c8a9d70143a1ee4497365c5f34ba53d441432c05a2c extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'title' => [$this, 'block_title'],
            'invoice' => [$this, 'block_invoice'],
            'print_button' => [$this, 'block_print_button'],
        ];
    }

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

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "timesheet/export.html.twig", 1)->unwrap();
        // line 2
        $macros["tables"] = $this->macros["tables"] = $this->loadTemplate("macros/datatables.html.twig", "timesheet/export.html.twig", 2)->unwrap();
        // line 3
        $this->parent = $this->loadTemplate("invoice/layout.html.twig", "timesheet/export.html.twig", 3);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

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

    // line 6
    public function block_invoice($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 7
        echo "    ";
        $context["decimal"] = (((isset($context["decimal"]) || array_key_exists("decimal", $context))) ? (_twig_default_filter(($context["decimal"] ?? null), false)) : (false));
        // line 8
        echo "    ";
        $context["showUserColumn"] = true;
        // line 9
        echo "    ";
        if (twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "user", [], "any", false, false, false, 9)) {
            // line 10
            echo "        ";
            $context["showUserColumn"] = false;
            // line 11
            echo "    ";
        }
        // line 12
        echo "
    <div class=\"row\">
        <div class=\"col-xs-12\">
            <h2 class=\"page-header\">
                ";
        // line 16
        if ( !($context["showUserColumn"] ?? null)) {
            // line 17
            echo "                    ";
            echo twig_call_macro($macros["widgets"], "macro_username", [twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "user", [], "any", false, false, false, 17)], 17, $context, $this->getSourceContext());
            echo ":
                ";
        }
        // line 19
        echo "                ";
        if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "begin", [], "any", false, false, false, 19))) {
            // line 20
            echo "                    ";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "begin", [], "any", false, false, false, 20)), "html", null, true);
            echo "
                ";
        } else {
            // line 22
            echo "                    ";
            $context["last"] = twig_last($this->env, ($context["entries"] ?? null));
            // line 23
            echo "                    ";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, ($context["last"] ?? null), "begin", [], "any", false, false, false, 23)), "html", null, true);
            echo "
                ";
        }
        // line 25
        echo "                &ndash;
                ";
        // line 26
        if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "end", [], "any", false, false, false, 26))) {
            // line 27
            echo "                    ";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "end", [], "any", false, false, false, 27)), "html", null, true);
            echo "
                ";
        } else {
            // line 29
            echo "                    ";
            $context["first"] = twig_first($this->env, ($context["entries"] ?? null));
            // line 30
            echo "                    ";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, ($context["first"] ?? null), "end", [], "any", false, false, false, 30)), "html", null, true);
            echo "
                ";
        }
        // line 32
        echo "            </h2>
        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-xs-12 table-responsive\">
            <table class=\"table\">
                <thead>
                <tr>
                    <th>";
        // line 41
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.date"), "html", null, true);
        echo "</th>
                    ";
        // line 42
        if (($context["showUserColumn"] ?? null)) {
            // line 43
            echo "                        <th>";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.username"), "html", null, true);
            echo "</th>
                    ";
        }
        // line 45
        echo "                    <th>";
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.description"), "html", null, true);
        echo "</th>
                    ";
        // line 46
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["metaColumns"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
            // line 47
            echo "                        <th class=\"text-nowrap\">";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["field"], "label", [], "any", false, false, false, 47)), "html", null, true);
            echo "</th>
                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 49
        echo "                    <th>";
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.hours"), "html", null, true);
        echo "</th>
                </tr>
                </thead>
                <tbody>
                ";
        // line 53
        $context["timeWorked"] = 0;
        // line 54
        echo "                ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["entries"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
            // line 55
            echo "                    ";
            $context["timeWorked"] = (($context["timeWorked"] ?? null) + twig_get_attribute($this->env, $this->source, $context["entry"], "duration", [], "any", false, false, false, 55));
            // line 56
            echo "                    <tr>
                        <td class=\"text-nowrap\">";
            // line 57
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, $context["entry"], "begin", [], "any", false, false, false, 57)), "html", null, true);
            echo "</td>
                        ";
            // line 58
            if (($context["showUserColumn"] ?? null)) {
                // line 59
                echo "                            <td>";
                echo twig_call_macro($macros["widgets"], "macro_username", [twig_get_attribute($this->env, $this->source, $context["entry"], "user", [], "any", false, false, false, 59)], 59, $context, $this->getSourceContext());
                echo "</td>
                        ";
            }
            // line 61
            echo "                        <td>
                            ";
            // line 62
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["entry"], "description", [], "any", false, false, false, 62))) {
                // line 63
                echo "                                <div>
                                    ";
                // line 64
                echo $this->extensions['App\Twig\MarkdownExtension']->timesheetContent(twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "description", [], "any", false, false, false, 64)));
                echo "
                                </div>
                            ";
            }
            // line 67
            echo "                            <span class=\"small\">
                                ";
            // line 68
            if ( !(null === twig_get_attribute($this->env, $this->source, $context["entry"], "activity", [], "any", false, false, false, 68))) {
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.activity"), "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["entry"], "activity", [], "any", false, false, false, 68), "name", [], "any", false, false, false, 68), "html", null, true);
                echo " |";
            }
            // line 69
            echo "                                ";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.project"), "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["entry"], "project", [], "any", false, false, false, 69), "name", [], "any", false, false, false, 69), "html", null, true);
            echo " |
                                ";
            // line 70
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.customer"), "html", null, true);
            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["entry"], "project", [], "any", false, false, false, 70), "customer", [], "any", false, false, false, 70), "name", [], "any", false, false, false, 70), "html", null, true);
            echo "
                            </span>
                        </td>
                        ";
            // line 73
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["metaColumns"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
                // line 74
                echo "                            <td>";
                echo twig_call_macro($macros["tables"], "macro_datatable_meta_column", [$context["entry"], $context["field"]], 74, $context, $this->getSourceContext());
                echo "</td>
                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 76
            echo "                        <td class=\"text-nowrap\">";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(twig_get_attribute($this->env, $this->source, $context["entry"], "duration", [], "any", false, false, false, 76), ($context["decimal"] ?? null)), "html", null, true);
            echo "</td>
                    </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 79
        echo "                </tbody>
                <tfoot>
                <tr>
                    <th></th>
                    ";
        // line 83
        if (($context["showUserColumn"] ?? null)) {
            // line 84
            echo "                        <th></th>
                    ";
        }
        // line 86
        echo "                    ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["metaColumns"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
            // line 87
            echo "                        <th></th>
                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 89
        echo "                    <th>";
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("invoice.total_working_time"), "html", null, true);
        echo "</th>
                    <th class=\"text-nowrap\">";
        // line 90
        echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(($context["timeWorked"] ?? null), ($context["decimal"] ?? null)), "html", null, true);
        echo "</th>
                </tr>
                </tfoot>
            </table>
        </div>
    </div>

";
    }

    // line 99
    public function block_print_button($context, array $blocks = [])
    {
        $macros = $this->macros;
    }

    public function getTemplateName()
    {
        return "timesheet/export.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  308 => 99,  296 => 90,  291 => 89,  284 => 87,  279 => 86,  275 => 84,  273 => 83,  267 => 79,  257 => 76,  248 => 74,  244 => 73,  236 => 70,  229 => 69,  222 => 68,  219 => 67,  213 => 64,  210 => 63,  208 => 62,  205 => 61,  199 => 59,  197 => 58,  193 => 57,  190 => 56,  187 => 55,  182 => 54,  180 => 53,  172 => 49,  163 => 47,  159 => 46,  154 => 45,  148 => 43,  146 => 42,  142 => 41,  131 => 32,  125 => 30,  122 => 29,  116 => 27,  114 => 26,  111 => 25,  105 => 23,  102 => 22,  96 => 20,  93 => 19,  87 => 17,  85 => 16,  79 => 12,  76 => 11,  73 => 10,  70 => 9,  67 => 8,  64 => 7,  60 => 6,  53 => 5,  48 => 3,  46 => 2,  44 => 1,  37 => 3,);
    }

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