<?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/index.html.twig */
class __TwigTemplate_9fdbd041addaac98311df61c4cd5e4ca0b54091d2e6a82e237f8ad5df84a12ef 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_before' => [$this, 'block_main_before'],
            '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["tables"] = $this->macros["tables"] = $this->loadTemplate("macros/datatables.html.twig", "user/index.html.twig", 2)->unwrap();
        // line 3
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "user/index.html.twig", 3)->unwrap();
        // line 4
        $macros["toolbar"] = $this->macros["toolbar"] = $this->loadTemplate("macros/toolbar.html.twig", "user/index.html.twig", 4)->unwrap();
        // line 5
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("user/actions.html.twig", "user/index.html.twig", 5)->unwrap();
        // line 7
        $context["columns"] = ["alias" => ["class" => "alwaysVisible"], "title" => ["class" => "hidden-xs hidden-sm"], "email" => ["class" => "hidden-xs hidden-sm hidden", "orderBy" => false], "lastLogin" => ["class" => "hidden-xs hidden-sm hidden", "orderBy" => false], "roles" => ["class" => "hidden-sm", "orderBy" => false]];
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["preferences"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["pref"]) {
            // line 15
            $context["columns"] = twig_array_merge(($context["columns"] ?? null), [("mf_" . twig_get_attribute($this->env, $this->source,             // line 16
$context["pref"], "name", [], "any", false, false, false, 16)) => ["title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["pref"], "label", [], "any", false, false, false, 16)), "class" => "hidden-xs hidden-sm", "orderBy" => false]]);
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pref'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 19
        $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["team" => ["class" => "text-center hidden-xs w-min", "orderBy" => false], "active" => ["class" => "hidden-xs hidden w-min", "orderBy" => false], "actions" => ["class" => "actions alwaysVisible"]]);
        // line 25
        $context["tableName"] = "user_admin";
        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", "user/index.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 27
    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("admin_user.title"), "html", null, true);
    }

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

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

    // line 31
    public function block_main_before($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 32
        echo "    ";
        echo twig_call_macro($macros["tables"], "macro_data_table_column_modal", [($context["tableName"] ?? null), ($context["columns"] ?? null)], 32, $context, $this->getSourceContext());
        echo "
";
    }

    // line 35
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 36
        echo "
    ";
        // line 37
        if (0 === twig_compare(twig_get_attribute($this->env, $this->source, ($context["entries"] ?? null), "count", [], "any", false, false, false, 37), 0)) {
            // line 38
            echo "        ";
            echo twig_call_macro($macros["widgets"], "macro_nothing_found", ["kimai.userUpdate"], 38, $context, $this->getSourceContext());
            echo "
    ";
        } else {
            // line 40
            echo "        ";
            echo twig_call_macro($macros["tables"], "macro_datatable_header", [($context["tableName"] ?? null), ($context["columns"] ?? null), ($context["query"] ?? null), ["reload" => "kimai.userUpdate"]], 40, $context, $this->getSourceContext());
            echo "

        ";
            // line 42
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["entries"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
                // line 43
                echo "            <tr";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", $context["entry"])) {
                    echo " class=\"open-edit alternative-link\" data-href=\"";
                    echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_profile", ["username" => twig_get_attribute($this->env, $this->source, $context["entry"], "username", [], "any", false, false, false, 43)]), "html", null, true);
                    echo "\"";
                }
                echo ">
                <td class=\"";
                // line 44
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "alias"], 44, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_user_avatar", [$context["entry"]], 44, $context, $this->getSourceContext());
                echo " ";
                echo twig_call_macro($macros["widgets"], "macro_username", [$context["entry"]], 44, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 45
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "title"], 45, $context, $this->getSourceContext());
                echo "\">";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "title", [], "any", false, false, false, 45), "html", null, true);
                echo "</td>
                <td class=\"";
                // line 46
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "email"], 46, $context, $this->getSourceContext());
                echo "\">";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "email", [], "any", false, false, false, 46), "html", null, true);
                echo "</td>
                <td class=\"";
                // line 47
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "lastLogin"], 47, $context, $this->getSourceContext());
                echo "\">";
                if ( !(null === twig_get_attribute($this->env, $this->source, $context["entry"], "lastLogin", [], "any", false, false, false, 47))) {
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateTimeFull(twig_get_attribute($this->env, $this->source, $context["entry"], "lastLogin", [], "any", false, false, false, 47)), "html", null, true);
                }
                echo "</td>
                <td class=\"";
                // line 48
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "roles"], 48, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 49
                $context["showUserRole"] = 0 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "roles", [], "any", false, false, false, 49)), 1);
                // line 50
                echo "                    ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["entry"], "roles", [], "any", false, false, false, 50));
                foreach ($context['_seq'] as $context["_key"] => $context["role"]) {
                    // line 51
                    echo "                        ";
                    if ((($context["showUserRole"] ?? null) || 0 !== twig_compare($context["role"], "ROLE_USER"))) {
                        // line 52
                        echo "                            ";
                        echo twig_call_macro($macros["widgets"], "macro_label_role", [$context["role"]], 52, $context, $this->getSourceContext());
                        echo "
                        ";
                    }
                    // line 54
                    echo "                    ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['role'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 55
                echo "                </td>
                ";
                // line 56
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(($context["preferences"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["pref"]) {
                    // line 57
                    echo "                    <td class=\"";
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), ("mf_" . twig_get_attribute($this->env, $this->source, $context["pref"], "name", [], "any", false, false, false, 57))], 57, $context, $this->getSourceContext());
                    echo "\">
                        ";
                    // line 58
                    $context["metaField"] = twig_get_attribute($this->env, $this->source, $context["entry"], "preference", [0 => twig_get_attribute($this->env, $this->source, $context["pref"], "name", [], "any", false, false, false, 58)], "method", false, false, false, 58);
                    // line 59
                    echo "                        ";
                    if ((( !(null === ($context["metaField"] ?? null)) &&  !(null === twig_get_attribute($this->env, $this->source, ($context["metaField"] ?? null), "value", [], "any", false, false, false, 59))) &&  !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["metaField"] ?? null), "value", [], "any", false, false, false, 59)))) {
                        // line 60
                        echo "                            ";
                        echo twig_call_macro($macros["widgets"], "macro_form_type_value", [twig_get_attribute($this->env, $this->source, $context["pref"], "type", [], "any", false, false, false, 60), twig_get_attribute($this->env, $this->source, ($context["metaField"] ?? null), "value", [], "any", false, false, false, 60), $context["entry"]], 60, $context, $this->getSourceContext());
                        echo "
                        ";
                    }
                    // line 62
                    echo "                    </td>
                ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pref'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 64
                echo "                <td class=\"text-center ";
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "team"], 64, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 65
                if (1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "teams", [], "any", false, false, false, 65)), 0)) {
                    // line 66
                    echo "                        ";
                    echo twig_call_macro($macros["widgets"], "macro_badge_counter", [twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "teams", [], "any", false, false, false, 66))], 66, $context, $this->getSourceContext());
                    echo "
                    ";
                }
                // line 68
                echo "                </td>
                <td class=\"";
                // line 69
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "active"], 69, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_label_visible", [twig_get_attribute($this->env, $this->source, $context["entry"], "enabled", [], "any", false, false, false, 69)], 69, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 70
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "actions"], 70, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["actions"], "macro_user", [$context["entry"], "index"], 70, $context, $this->getSourceContext());
                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 73
            echo "
        ";
            // line 74
            echo twig_call_macro($macros["tables"], "macro_data_table_footer", [($context["entries"] ?? null), "admin_user_paginated"], 74, $context, $this->getSourceContext());
            echo "
    ";
        }
        // line 76
        echo "
";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  267 => 76,  262 => 74,  259 => 73,  248 => 70,  242 => 69,  239 => 68,  233 => 66,  231 => 65,  226 => 64,  219 => 62,  213 => 60,  210 => 59,  208 => 58,  203 => 57,  199 => 56,  196 => 55,  190 => 54,  184 => 52,  181 => 51,  176 => 50,  174 => 49,  170 => 48,  162 => 47,  156 => 46,  150 => 45,  142 => 44,  133 => 43,  129 => 42,  123 => 40,  117 => 38,  115 => 37,  112 => 36,  108 => 35,  101 => 32,  97 => 31,  90 => 29,  83 => 28,  76 => 27,  71 => 1,  69 => 25,  67 => 19,  61 => 16,  60 => 15,  56 => 14,  54 => 7,  52 => 5,  50 => 4,  48 => 3,  46 => 2,  39 => 1,);
    }

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