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

/* team/index.html.twig */
class __TwigTemplate_afd81f6227afa821e9a28367ca23a3663e390846317c9827f9464b3bb1167bed 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", "team/index.html.twig", 2)->unwrap();
        // line 3
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("team/actions.html.twig", "team/index.html.twig", 3)->unwrap();
        // line 4
        $macros["tables"] = $this->macros["tables"] = $this->loadTemplate("macros/datatables.html.twig", "team/index.html.twig", 4)->unwrap();
        // line 5
        $macros["toolbar"] = $this->macros["toolbar"] = $this->loadTemplate("macros/toolbar.html.twig", "team/index.html.twig", 5)->unwrap();
        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", "team/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("teams.title", [], "teams"), "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_teams", ["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["teams"] ?? null)), 0)) {
            // line 14
            echo "        ";
            echo twig_call_macro($macros["widgets"], "macro_nothing_found", ["kimai.teamUpdate"], 14, $context, $this->getSourceContext());
            echo "
    ";
        } else {
            // line 16
            echo "
        ";
            // line 17
            $context["columns"] = ["name" => ["class" => ""], "teamlead" => ["class" => ""], "user" => ["class" => "hidden-xs", "orderBy" => false], "actions" => ["class" => "actions alwaysVisible"]];
            // line 23
            echo "
        ";
            // line 24
            $context["tableName"] = "admin_teams";
            // line 25
            echo "
        ";
            // line 26
            echo twig_call_macro($macros["tables"], "macro_datatable_header", [($context["tableName"] ?? null), ($context["columns"] ?? null), ($context["query"] ?? null), ["reload" => "kimai.teamUpdate"]], 26, $context, $this->getSourceContext());
            echo "
        ";
            // line 27
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["teams"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["team"]) {
                // line 28
                echo "            <tr";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", $context["team"])) {
                    echo " class=\"open-edit alternative-link\" data-href=\"";
                    echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_team_edit", ["id" => twig_get_attribute($this->env, $this->source, $context["team"], "id", [], "any", false, false, false, 28)]), "html", null, true);
                    echo "\"";
                }
                echo ">
                <td class=\"";
                // line 29
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "name"], 29, $context, $this->getSourceContext());
                echo "\">";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["team"], "name", [], "any", false, false, false, 29), "html", null, true);
                echo "</td>
                <td class=\"";
                // line 30
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "teamlead"], 30, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_label_user", [twig_get_attribute($this->env, $this->source, $context["team"], "teamlead", [], "any", false, false, false, 30)], 30, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 31
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "user"], 31, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 32
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["team"], "users", [], "any", false, false, false, 32));
                foreach ($context['_seq'] as $context["_key"] => $context["user"]) {
                    // line 33
                    echo "                        ";
                    echo twig_call_macro($macros["widgets"], "macro_label_user", [$context["user"]], 33, $context, $this->getSourceContext());
                    echo "&nbsp;
                    ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['user'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 35
                echo "                </td>
                <td class=\"";
                // line 36
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "actions"], 36, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 37
                echo twig_call_macro($macros["actions"], "macro_team", [$context["team"], "index"], 37, $context, $this->getSourceContext());
                echo "
                </td>
            </tr>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['team'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 41
            echo "        ";
            echo twig_call_macro($macros["tables"], "macro_data_table_footer", [($context["teams"] ?? null), "admin_team_paginated"], 41, $context, $this->getSourceContext());
            echo "

    ";
        }
        // line 44
        echo "
";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  177 => 44,  170 => 41,  160 => 37,  156 => 36,  153 => 35,  144 => 33,  140 => 32,  136 => 31,  130 => 30,  124 => 29,  115 => 28,  111 => 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("", "team/index.html.twig", "/var/www/html/kimai2/templates/team/index.html.twig");
    }
}
