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

/* tags/index.html.twig */
class __TwigTemplate_b53796aba8e5c5242f780e8497fad37da608452b32a6f88c7f01da307428b475 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_search' => [$this, 'block_page_search'],
            'page_actions' => [$this, 'block_page_actions'],
            'main' => [$this, 'block_main'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "tags/index.html.twig", 2)->unwrap();
        // line 3
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("tags/actions.html.twig", "tags/index.html.twig", 3)->unwrap();
        // line 4
        $macros["tables"] = $this->macros["tables"] = $this->loadTemplate("macros/datatables.html.twig", "tags/index.html.twig", 4)->unwrap();
        // line 5
        $macros["toolbar"] = $this->macros["toolbar"] = $this->loadTemplate("macros/toolbar.html.twig", "tags/index.html.twig", 5)->unwrap();
        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", "tags/index.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

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

    // line 8
    public function block_page_search($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["toolbar"], "macro_dropDownSearch", [($context["toolbarForm"] ?? null)], 8, $context, $this->getSourceContext());
    }

    // line 9
    public function block_page_actions($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["actions"], "macro_tags", ["index"], 9, $context, $this->getSourceContext());
    }

    // line 11
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 12
        echo "
    ";
        // line 13
        if (0 === twig_compare(twig_length_filter($this->env, ($context["tags"] ?? null)), 0)) {
            // line 14
            echo "        ";
            echo twig_call_macro($macros["widgets"], "macro_nothing_found", ["kimai.tagUpdate"], 14, $context, $this->getSourceContext());
            echo "
    ";
        } else {
            // line 16
            echo "
        ";
            // line 17
            $context["columns"] = ["id" => ["class" => "alwaysVisible multiCheckbox", "orderBy" => false, "title" => false, "html_before" => twig_call_macro($macros["tables"], "macro_datatable_multiupdate_all", [], 18, $context, $this->getSourceContext())], "name" => ["class" => "alwaysVisible"], "amount" => ["class" => "text-center w-min"], "actions" => ["class" => "actions alwaysVisible"]];
            // line 23
            echo "
        ";
            // line 24
            $context["tableName"] = "admin_tags";
            // line 25
            echo "        ";
            $context["manageAllowed"] = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("manage_tag");
            // line 26
            echo "
        ";
            // line 27
            echo twig_call_macro($macros["tables"], "macro_datatable_header", [($context["tableName"] ?? null), ($context["columns"] ?? null), ($context["query"] ?? null), ["reload" => "kimai.tagUpdate"]], 27, $context, $this->getSourceContext());
            echo "
        ";
            // line 28
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["tags"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
                // line 29
                echo "            ";
                $context["type"] = "primary";
                // line 30
                echo "            ";
                if (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["tag"], "amount", [], "any", false, false, false, 30), 0)) {
                    // line 31
                    echo "                ";
                    $context["type"] = "warning";
                    // line 32
                    echo "            ";
                }
                // line 33
                echo "
            <tr";
                // line 34
                if (($context["manageAllowed"] ?? null)) {
                    echo " class=\"modal-ajax-form open-edit\" data-href=\"";
                    echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tags_edit", ["id" => twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 34)]), "html", null, true);
                    echo "\"";
                }
                echo ">
                <td class=\"text-nowrap\">";
                // line 35
                echo twig_call_macro($macros["tables"], "macro_datatable_multiupdate_row", [twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 35)], 35, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 36
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "name"], 36, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 37
                echo twig_call_macro($macros["widgets"], "macro_label_color_dot", ["tag", true, twig_get_attribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, false, 37), null, ((twig_get_attribute($this->env, $this->source, $context["tag"], "color", [], "any", true, true, false, 37)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["tag"], "color", [], "any", false, false, false, 37), "#00a65a")) : ("#00a65a"))], 37, $context, $this->getSourceContext());
                echo "
                </td>
                <td class=\"";
                // line 39
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "amount"], 39, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_label", [twig_get_attribute($this->env, $this->source, $context["tag"], "amount", [], "any", false, false, false, 39), ($context["type"] ?? null)], 39, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 40
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "actions"], 40, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 41
                echo twig_call_macro($macros["actions"], "macro_tag", [$context["tag"], "index"], 41, $context, $this->getSourceContext());
                echo "
                </td>
            </tr>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 45
            echo "        ";
            echo twig_call_macro($macros["tables"], "macro_data_table_footer", [($context["tags"] ?? null), "tags_paginated", ($context["multiUpdateForm"] ?? null)], 45, $context, $this->getSourceContext());
            echo "

    ";
        }
        // line 48
        echo "
";
    }

    public function getTemplateName()
    {
        return "tags/index.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  181 => 48,  174 => 45,  164 => 41,  160 => 40,  154 => 39,  149 => 37,  145 => 36,  141 => 35,  133 => 34,  130 => 33,  127 => 32,  124 => 31,  121 => 30,  118 => 29,  114 => 28,  110 => 27,  107 => 26,  104 => 25,  102 => 24,  99 => 23,  97 => 17,  94 => 16,  88 => 14,  86 => 13,  83 => 12,  79 => 11,  72 => 9,  65 => 8,  58 => 7,  53 => 1,  51 => 5,  49 => 4,  47 => 3,  45 => 2,  38 => 1,);
    }

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