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

/* project/actions.html.twig */
class __TwigTemplate_098b78f2b2f775646934365538ee1d631562571b042c556565b3d0922c1151fc 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 17
        echo "
";
    }

    // line 1
    public function macro_projects($__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", "project/actions.html.twig", 2)->unwrap();
            // line 3
            echo "    
    ";
            // line 4
            $context["actions"] = ["search" => ["class" => "search-toggle visible-xs-inline"], "visibility" => "#modal_project_admin"];
            // line 5
            echo "
    ";
            // line 6
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["download" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("project_export"), "class" => "toolbar-action"]]);
            // line 7
            echo "
    ";
            // line 8
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_project")) {
                // line 9
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_create")]);
                // line 10
                echo "    ";
            }
            // line 11
            echo "
    ";
            // line 12
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("project.html"), "target" => "_blank"]]);
            // line 13
            echo "
    ";
            // line 14
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.projects", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 15
            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, 15), "actions", [], "any", false, false, false, 15)], 15, $context, $this->getSourceContext());
            echo "
";

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

    // line 18
    public function macro_project($__project__ = null, $__view__ = null, $__options__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "project" => $__project__,
            "view" => $__view__,
            "options" => $__options__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 19
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "project/actions.html.twig", 19)->unwrap();
            // line 20
            echo "    ";
            $context["actions"] = [];
            // line 21
            echo "
    ";
            // line 22
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 22))) {
                // line 23
                echo "        ";
                if ((0 !== twig_compare(($context["view"] ?? null), "details") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", ($context["project"] ?? null)))) {
                    // line 24
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["details" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("project_details", ["id" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 24)])]);
                    // line 25
                    echo "        ";
                }
                // line 26
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", ($context["project"] ?? null))) {
                    // line 27
                    echo "            ";
                    $context["class"] = "";
                    // line 28
                    echo "            ";
                    if (0 !== twig_compare(($context["view"] ?? null), "edit")) {
                        // line 29
                        echo "                ";
                        $context["class"] = "modal-ajax-form";
                        // line 30
                        echo "            ";
                    }
                    // line 31
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["edit" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_edit", ["id" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 31)]), "class" => ($context["class"] ?? null)]]);
                    // line 32
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["copy" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_duplicate", ["id" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 32)])]]);
                    // line 33
                    echo "        ";
                }
                // line 34
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("permissions", ($context["project"] ?? null))) {
                    // line 35
                    echo "            ";
                    $context["class"] = "";
                    // line 36
                    echo "            ";
                    if (0 !== twig_compare(($context["view"] ?? null), "permissions")) {
                        // line 37
                        echo "                ";
                        $context["class"] = "modal-ajax-form";
                        // line 38
                        echo "            ";
                    }
                    // line 39
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["permissions" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_permissions", ["id" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 39)]), "class" => ($context["class"] ?? null)]]);
                    // line 40
                    echo "        ";
                }
                // line 41
                echo "        ";
                if (1 === twig_compare(twig_length_filter($this->env, ($context["actions"] ?? null)), 0)) {
                    // line 42
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["divider" => null]);
                    // line 43
                    echo "        ";
                }
                // line 44
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_activity")) {
                    // line 45
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["activity" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_activity", ["customers[]" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 45), "id", [], "any", false, false, false, 45), "projects[]" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 45)])]);
                    // line 46
                    echo "        ";
                }
                // line 47
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_other_timesheet")) {
                    // line 48
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["timesheet" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet", ["customers[]" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 48), "id", [], "any", false, false, false, 48), "projects[]" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 48)])]);
                    // line 49
                    echo "        ";
                }
                // line 50
                echo "        ";
                if (((twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "visible", [], "any", false, false, false, 50) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 50), "visible", [], "any", false, false, false, 50)) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_activity"))) {
                    // line 51
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create-activity" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_activity_create_with_project", ["project" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 51)]), "class" => "modal-ajax-form"]]);
                    // line 52
                    echo "        ";
                }
                // line 53
                echo "        ";
                if (((0 === twig_compare(($context["view"] ?? null), "index") || 0 === twig_compare(($context["view"] ?? null), "custom")) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("delete", ($context["project"] ?? null)))) {
                    // line 54
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_delete", ["id" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 54)]), "class" => "modal-ajax-form"]]);
                    // line 55
                    echo "        ";
                }
                // line 56
                echo "    ";
            }
            // line 57
            echo "
    ";
            // line 58
            if ((0 !== twig_compare(($context["view"] ?? null), "index") && 0 !== twig_compare(($context["view"] ?? null), "custom"))) {
                // line 59
                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, 59)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", false, false, false, 59), $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project")))]);
                // line 60
                echo "    ";
            }
            // line 61
            echo "
    ";
            // line 62
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.project", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null), "project" => ($context["project"] ?? null)]);
            // line 63
            echo "    ";
            if ((0 === twig_compare(($context["view"] ?? null), "index") || 0 === twig_compare(($context["view"] ?? null), "custom"))) {
                // line 64
                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, 64), "actions", [], "any", false, false, false, 64)], 64, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 66
                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, 66), "actions", [], "any", false, false, false, 66)], 66, $context, $this->getSourceContext());
                echo "
    ";
            }

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  254 => 66,  248 => 64,  245 => 63,  243 => 62,  240 => 61,  237 => 60,  234 => 59,  232 => 58,  229 => 57,  226 => 56,  223 => 55,  220 => 54,  217 => 53,  214 => 52,  211 => 51,  208 => 50,  205 => 49,  202 => 48,  199 => 47,  196 => 46,  193 => 45,  190 => 44,  187 => 43,  184 => 42,  181 => 41,  178 => 40,  175 => 39,  172 => 38,  169 => 37,  166 => 36,  163 => 35,  160 => 34,  157 => 33,  154 => 32,  151 => 31,  148 => 30,  145 => 29,  142 => 28,  139 => 27,  136 => 26,  133 => 25,  130 => 24,  127 => 23,  125 => 22,  122 => 21,  119 => 20,  116 => 19,  101 => 18,  89 => 15,  87 => 14,  84 => 13,  82 => 12,  79 => 11,  76 => 10,  73 => 9,  71 => 8,  68 => 7,  66 => 6,  63 => 5,  61 => 4,  58 => 3,  55 => 2,  42 => 1,  37 => 17,);
    }

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