<?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-team/actions.html.twig */
class __TwigTemplate_56bcbf97b86fd29bc7c200b453ddb5caa49ac53046f154c573ba0581f5db3d8b extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 27
        echo "
";
        // line 73
        echo "
";
    }

    // line 1
    public function macro_timesheets_team($__view__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "view" => $__view__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 2
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "timesheet-team/actions.html.twig", 2)->unwrap();
            // line 3
            echo "
    ";
            // line 4
            $context["actions"] = ["search" => ["class" => "search-toggle visible-xs-inline"]];
            // line 5
            echo "    ";
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("export_own_timesheet")) {
                // line 6
                echo "        ";
                $context["exporterIds"] = $this->extensions['App\Twig\TimesheetExtension']->getTimesheetExporter();
                // line 7
                echo "        ";
                if (0 === twig_compare(twig_length_filter($this->env, ($context["exporterIds"] ?? null)), 1)) {
                    // line 8
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["download" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet_export", ["exporter" => twig_get_attribute($this->env, $this->source, ($context["exporterIds"] ?? null), 0, [], "any", false, false, false, 8)]), "class" => "toolbar-action"]]);
                    // line 9
                    echo "        ";
                } elseif (1 === twig_compare(twig_length_filter($this->env, ($context["exporterIds"] ?? null)), 1)) {
                    // line 10
                    echo "            ";
                    $context["children"] = [];
                    // line 11
                    echo "            ";
                    $context['_parent'] = $context;
                    $context['_seq'] = twig_ensure_traversable(($context["exporterIds"] ?? null));
                    foreach ($context['_seq'] as $context["_key"] => $context["exporter"]) {
                        // line 12
                        echo "                ";
                        $context["children"] = twig_array_merge(($context["children"] ?? null), [$context["exporter"] => ["title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(("button." . $context["exporter"])), "url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet_export", ["exporter" => $context["exporter"]]), "class" => ("toolbar-action exporter-" . $context["exporter"])]]);
                        // line 13
                        echo "            ";
                    }
                    $_parent = $context['_parent'];
                    unset($context['_seq'], $context['_iterated'], $context['_key'], $context['exporter'], $context['_parent'], $context['loop']);
                    $context = array_intersect_key($context, $_parent) + $_parent;
                    // line 14
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["download" => ["children" => ($context["children"] ?? null)]]);
                    // line 15
                    echo "        ";
                }
                // line 16
                echo "    ";
            }
            // line 17
            echo "    ";
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["visibility" => "#modal_timesheet_admin"]);
            // line 18
            echo "    ";
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_other_timesheet")) {
                // line 19
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create" => ["children" => ["single" => ["title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("create"), "url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet_create"), "class" => "create-ts modal-ajax-form"], "multi-user" => ["title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("create-timesheet-multiuser", [], "actions"), "url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet_create_multiuser"), "class" => "create-ts-mu modal-ajax-form"]]]]);
                // line 20
                echo "    ";
            }
            // line 21
            echo "
    ";
            // line 22
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("timesheet.html"), "target" => "_blank"]]);
            // line 23
            echo "
    ";
            // line 24
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.timesheets_team", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 25
            echo "    ";
            echo twig_call_macro($macros["widgets"], "macro_page_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 25), "actions", [], "any", false, false, false, 25)], 25, $context, $this->getSourceContext());
            echo "
";

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    // line 28
    public function macro_timesheet_team($__timesheet__ = null, $__view__ = null, $__options__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "timesheet" => $__timesheet__,
            "view" => $__view__,
            "options" => $__options__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 29
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "timesheet-team/actions.html.twig", 29)->unwrap();
            // line 30
            echo "    ";
            $context["actions"] = [];
            // line 31
            echo "
    ";
            // line 32
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "id", [], "any", false, false, false, 32))) {
                // line 33
                echo "        ";
                if (( !twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "end", [], "any", false, false, false, 33) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("stop", ($context["timesheet"] ?? null)))) {
                    // line 34
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["stop" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("stop_timesheet", ["id" => twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "id", [], "any", false, false, false, 34)]), "class" => "api-link", "attr" => ["data-event" => "kimai.timesheetStop kimai.timesheetUpdate", "data-method" => "PATCH", "data-msg-error" => "timesheet.stop.error", "data-msg-success" => "timesheet.stop.success"]]]);
                    // line 35
                    echo "        ";
                }
                // line 36
                echo "
        ";
                // line 37
                if ((twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "end", [], "any", false, false, false, 37) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("start", ($context["timesheet"] ?? null)))) {
                    // line 38
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["repeat" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("restart_timesheet", ["id" => twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "id", [], "any", false, false, false, 38)]), "class" => "api-link", "attr" => ["data-payload" => "{\"copy\": \"all\"}", "data-event" => "kimai.timesheetStart kimai.timesheetUpdate", "data-method" => "PATCH", "data-msg-error" => "timesheet.start.error", "data-msg-success" => "timesheet.start.success"]]]);
                    // line 39
                    echo "        ";
                }
                // line 40
                echo "
        ";
                // line 41
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("duplicate", ($context["timesheet"] ?? null))) {
                    // line 42
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["copy" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("duplicate_timesheet", ["id" => twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "id", [], "any", false, false, false, 42)]), "class" => "api-link", "attr" => ["data-payload" => "{\"copy\": \"all\"}", "data-event" => "kimai.timesheetStart kimai.timesheetUpdate", "data-method" => "PATCH", "data-msg-error" => "action.update.error", "data-msg-success" => "action.update.success"]]]);
                    // line 43
                    echo "        ";
                }
                // line 44
                echo "
        ";
                // line 45
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", ($context["timesheet"] ?? null))) {
                    // line 46
                    echo "            ";
                    $context["class"] = "";
                    // line 47
                    echo "            ";
                    if (0 !== twig_compare(($context["view"] ?? null), "edit")) {
                        // line 48
                        echo "                ";
                        $context["class"] = "modal-ajax-form";
                        // line 49
                        echo "            ";
                    }
                    // line 50
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["edit" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet_edit", ["id" => twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "id", [], "any", false, false, false, 50)]), "class" => ($context["class"] ?? null)]]);
                    // line 51
                    echo "        ";
                }
                // line 52
                echo "
        ";
                // line 53
                if (1 === twig_compare(twig_length_filter($this->env, ($context["actions"] ?? null)), 0)) {
                    // line 54
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["divider" => null]);
                    // line 55
                    echo "        ";
                }
                // line 56
                echo "
        ";
                // line 57
                if ((0 === twig_compare(($context["view"] ?? null), "index") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("delete", ($context["timesheet"] ?? null)))) {
                    // line 58
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("delete_timesheet", ["id" => twig_get_attribute($this->env, $this->source, ($context["timesheet"] ?? null), "id", [], "any", false, false, false, 58)]), "class" => "api-link", "attr" => ["data-event" => "kimai.timesheetDelete kimai.timesheetUpdate", "data-method" => "DELETE", "data-question" => "confirm.delete", "data-msg-error" => "action.delete.error", "data-msg-success" => "action.delete.success"]]]);
                    // line 59
                    echo "        ";
                }
                // line 60
                echo "    ";
            }
            // line 61
            echo "
    ";
            // line 62
            if (0 !== twig_compare(($context["view"] ?? null), "index")) {
                // line 63
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => ((twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", true, true, false, 63)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", false, false, false, 63), $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet")))]);
                // line 64
                echo "    ";
            }
            // line 65
            echo "
    ";
            // line 66
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.timesheet_team", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null), "timesheet" => ($context["timesheet"] ?? null)]);
            // line 67
            echo "    ";
            if (0 === twig_compare(($context["view"] ?? null), "index")) {
                // line 68
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_table_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 68), "actions", [], "any", false, false, false, 68)], 68, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 70
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_entity_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 70), "actions", [], "any", false, false, false, 70)], 70, $context, $this->getSourceContext());
                echo "
    ";
            }

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    // line 74
    public function macro_timesheets_team_multi_update($__view__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "view" => $__view__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 75
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "timesheet-team/actions.html.twig", 75)->unwrap();
            // line 76
            echo "
    ";
            // line 77
            $context["actions"] = [];
            // line 78
            echo "    ";
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet")]);
            // line 79
            echo "    ";
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("timesheet.html"), "target" => "_blank"]]);
            // line 80
            echo "
    ";
            // line 81
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.timesheets_team_multi_update", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 82
            echo "    ";
            echo twig_call_macro($macros["widgets"], "macro_page_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 82), "actions", [], "any", false, false, false, 82)], 82, $context, $this->getSourceContext());
            echo "
";

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    public function getTemplateName()
    {
        return "timesheet-team/actions.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  316 => 82,  314 => 81,  311 => 80,  308 => 79,  305 => 78,  303 => 77,  300 => 76,  297 => 75,  284 => 74,  271 => 70,  265 => 68,  262 => 67,  260 => 66,  257 => 65,  254 => 64,  251 => 63,  249 => 62,  246 => 61,  243 => 60,  240 => 59,  237 => 58,  235 => 57,  232 => 56,  229 => 55,  226 => 54,  224 => 53,  221 => 52,  218 => 51,  215 => 50,  212 => 49,  209 => 48,  206 => 47,  203 => 46,  201 => 45,  198 => 44,  195 => 43,  192 => 42,  190 => 41,  187 => 40,  184 => 39,  181 => 38,  179 => 37,  176 => 36,  173 => 35,  170 => 34,  167 => 33,  165 => 32,  162 => 31,  159 => 30,  156 => 29,  141 => 28,  129 => 25,  127 => 24,  124 => 23,  122 => 22,  119 => 21,  116 => 20,  113 => 19,  110 => 18,  107 => 17,  104 => 16,  101 => 15,  98 => 14,  92 => 13,  89 => 12,  84 => 11,  81 => 10,  78 => 9,  75 => 8,  72 => 7,  69 => 6,  66 => 5,  64 => 4,  61 => 3,  58 => 2,  45 => 1,  40 => 73,  37 => 27,);
    }

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