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

/* user/actions.html.twig */
class __TwigTemplate_d188c1a2da4f7ec6a70ab81935f5bf57b6af2ced015df55fd006cb1898e1aa70 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 33
        echo "
";
        // line 55
        echo "
";
    }

    // line 1
    public function macro_users($__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", "user/actions.html.twig", 2)->unwrap();
            // line 3
            echo "
    ";
            // line 4
            $context["actions"] = ["search" => ["class" => "search-toggle visible-xs-inline"]];
            // line 5
            echo "
    ";
            // line 6
            if (0 === twig_compare(($context["view"] ?? null), "index")) {
                // line 7
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["visibility" => "#modal_user_admin"]);
                // line 8
                echo "    ";
            } else {
                // line 9
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_user")]);
                // line 10
                echo "    ";
            }
            // line 11
            echo "
    ";
            // line 12
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["download" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_export"), "class" => "toolbar-action"]]);
            // line 13
            echo "
    ";
            // line 14
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("role_permissions")) {
                // line 15
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["permissions" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_user_permissions")]);
                // line 16
                echo "    ";
            }
            // line 17
            echo "
    ";
            // line 18
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_user")) {
                // line 19
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_user_create")]);
                // line 20
                echo "    ";
            }
            // line 21
            echo "
    ";
            // line 22
            if (0 === twig_compare(($context["view"] ?? null), "index")) {
                // line 23
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("users.html"), "target" => "_blank"]]);
                // line 24
                echo "    ";
            } elseif (0 === twig_compare(($context["view"] ?? null), "permissions")) {
                // line 25
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("permissions.html"), "target" => "_blank"]]);
                // line 26
                echo "    ";
            }
            // line 27
            echo "
    ";
            // line 28
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("users.html"), "target" => "_blank"]]);
            // line 29
            echo "
    ";
            // line 30
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.users", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 31
            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, 31), "actions", [], "any", false, false, false, 31)], 31, $context, $this->getSourceContext());
            echo "
";

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

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

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 35
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "user/actions.html.twig", 35)->unwrap();
            // line 36
            echo "    ";
            $context["actions"] = [];
            // line 37
            echo "
    ";
            // line 38
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_user")) {
                // line 39
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_user")]);
                // line 40
                echo "    ";
            }
            // line 41
            echo "    
    ";
            // line 42
            if ((0 !== twig_compare(($context["view"] ?? null), "index") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("role_permissions"))) {
                // line 43
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["permissions" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_user_permissions")]);
                // line 44
                echo "    ";
            }
            // line 45
            echo "
    ";
            // line 46
            if ((0 !== twig_compare(($context["view"] ?? null), "role") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("role_permissions"))) {
                // line 47
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["roles" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_user_roles"), "class" => "modal-ajax-form"]]);
                // line 48
                echo "    ";
            }
            // line 49
            echo "
    ";
            // line 50
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("permissions.html"), "target" => "_blank"]]);
            // line 51
            echo "
    ";
            // line 52
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.user_permissions", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 53
            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, 53), "actions", [], "any", false, false, false, 53)], 53, $context, $this->getSourceContext());
            echo "
";

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

    // line 56
    public function macro_user($__user__ = null, $__view__ = null, $__options__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "user" => $__user__,
            "view" => $__view__,
            "options" => $__options__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 57
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "user/actions.html.twig", 57)->unwrap();
            // line 58
            echo "    ";
            $context["actions"] = [];
            // line 59
            echo "
    ";
            // line 60
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "id", [], "any", false, false, false, 60))) {
                // line 61
                echo "        ";
                $context["view_other"] = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_other_timesheet");
                // line 62
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", ($context["user"] ?? null))) {
                    // line 63
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["profile-stats" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_profile", ["username" => twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "username", [], "any", false, false, false, 63)])]]);
                    // line 64
                    echo "        ";
                }
                // line 65
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", ($context["user"] ?? null))) {
                    // line 66
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["edit" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_profile_edit", ["username" => twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "username", [], "any", false, false, false, 66)])]);
                    // line 67
                    echo "        ";
                }
                // line 68
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("preferences", ($context["user"] ?? null))) {
                    // line 69
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["settings" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_profile_preferences", ["username" => twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "username", [], "any", false, false, false, 69)])]]);
                    // line 70
                    echo "        ";
                }
                // line 71
                echo "        ";
                if (1 === twig_compare(twig_length_filter($this->env, ($context["actions"] ?? null)), 0)) {
                    // line 72
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["divider" => null]);
                    // line 73
                    echo "        ";
                }
                // line 74
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_reporting")) {
                    // line 75
                    echo "            ";
                    if ((($context["view_other"] ?? null) || 0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, false, false, 75), "id", [], "any", false, false, false, 75), twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "id", [], "any", false, false, false, 75)))) {
                        // line 76
                        echo "                ";
                        $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["report" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("report_user_month", ["user" => twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "id", [], "any", false, false, false, 76)])]);
                        // line 77
                        echo "            ";
                    }
                    // line 78
                    echo "        ";
                }
                // line 79
                echo "        ";
                if ((($context["view_other"] ?? null) && twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "enabled", [], "any", false, false, false, 79))) {
                    // line 80
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["timesheet" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet", ["users" => [0 => twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "id", [], "any", false, false, false, 80)]])]);
                    // line 81
                    echo "        ";
                }
                // line 82
                echo "        ";
                if ((0 === twig_compare(($context["view"] ?? null), "index") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("delete", ($context["user"] ?? null)))) {
                    // line 83
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_user_delete", ["id" => twig_get_attribute($this->env, $this->source, ($context["user"] ?? null), "id", [], "any", false, false, false, 83)]), "class" => "modal-ajax-form"]]);
                    // line 84
                    echo "        ";
                }
                // line 85
                echo "    ";
            }
            // line 86
            echo "
    ";
            // line 87
            if (twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", true, true, false, 87)) {
                // line 88
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", false, false, false, 88)]);
                // line 89
                echo "    ";
            }
            // line 90
            echo "
    ";
            // line 91
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.user", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null), "user" => ($context["user"] ?? null)]);
            // line 92
            echo "    ";
            if (0 === twig_compare(($context["view"] ?? null), "index")) {
                // line 93
                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, 93), "actions", [], "any", false, false, false, 93)], 93, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 95
                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, 95), "actions", [], "any", false, false, false, 95)], 95, $context, $this->getSourceContext());
                echo "
    ";
            }

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

    public function getTemplateName()
    {
        return "user/actions.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  349 => 95,  343 => 93,  340 => 92,  338 => 91,  335 => 90,  332 => 89,  329 => 88,  327 => 87,  324 => 86,  321 => 85,  318 => 84,  315 => 83,  312 => 82,  309 => 81,  306 => 80,  303 => 79,  300 => 78,  297 => 77,  294 => 76,  291 => 75,  288 => 74,  285 => 73,  282 => 72,  279 => 71,  276 => 70,  273 => 69,  270 => 68,  267 => 67,  264 => 66,  261 => 65,  258 => 64,  255 => 63,  252 => 62,  249 => 61,  247 => 60,  244 => 59,  241 => 58,  238 => 57,  223 => 56,  211 => 53,  209 => 52,  206 => 51,  204 => 50,  201 => 49,  198 => 48,  195 => 47,  193 => 46,  190 => 45,  187 => 44,  184 => 43,  182 => 42,  179 => 41,  176 => 40,  173 => 39,  171 => 38,  168 => 37,  165 => 36,  162 => 35,  149 => 34,  137 => 31,  135 => 30,  132 => 29,  130 => 28,  127 => 27,  124 => 26,  121 => 25,  118 => 24,  115 => 23,  113 => 22,  110 => 21,  107 => 20,  104 => 19,  102 => 18,  99 => 17,  96 => 16,  93 => 15,  91 => 14,  88 => 13,  86 => 12,  83 => 11,  80 => 10,  77 => 9,  74 => 8,  71 => 7,  69 => 6,  66 => 5,  64 => 4,  61 => 3,  58 => 2,  45 => 1,  40 => 55,  37 => 33,);
    }

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