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

/* customer/embed_projects.html.twig */
class __TwigTemplate_170a72effbc7494dca1df6c8f3beff4e7907f515b32fa12660c52471857cedcd 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 1
        echo "    ";
        $this->loadTemplate("customer/embed_projects.html.twig", "customer/embed_projects.html.twig", 1, "1821929989")->display(twig_array_merge($context, ["customer" => ($context["customer"] ?? null), "projects" => ($context["projects"] ?? null), "page" => ($context["page"] ?? null)]));
        // line 45
        echo "    <script type=\"text/javascript\">
        ";
        // line 46
        $context["eventName"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 46), "xmlHttpRequest", [], "any", false, false, false, 46)) ? ("kimai.reloadPage") : ("kimai.initialized"));
        // line 47
        echo "        document.addEventListener('";
        echo twig_escape_filter($this->env, ($context["eventName"] ?? null), "html", null, true);
        echo "', function() {
            KimaiPaginatedBoxWidget.create('#project_list_box');
        });
    </script>
";
    }

    public function getTemplateName()
    {
        return "customer/embed_projects.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  45 => 47,  43 => 46,  40 => 45,  37 => 1,);
    }

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


/* customer/embed_projects.html.twig */
class __TwigTemplate_170a72effbc7494dca1df6c8f3beff4e7907f515b32fa12660c52471857cedcd___1821929989 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'box_title' => [$this, 'block_box_title'],
            'box_attributes' => [$this, 'block_box_attributes'],
            'box_tools' => [$this, 'block_box_tools'],
            'box_body_class' => [$this, 'block_box_body_class'],
            'box_tools_attributes' => [$this, 'block_box_tools_attributes'],
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("project/actions.html.twig", "customer/embed_projects.html.twig", 2)->unwrap();
        // line 3
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "customer/embed_projects.html.twig", 3)->unwrap();
        // line 1
        $this->parent = $this->loadTemplate("@AdminLTE/Widgets/box-widget.html.twig", "customer/embed_projects.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

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

    // line 5
    public function block_box_attributes($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 6
        echo "            id=\"project_list_box\"  data-href=\"";
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("customer_projects", ["id" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 6)]), "html", null, true);
        echo "\" data-reload=\"kimai.projectUpdate\"
        ";
    }

    // line 8
    public function block_box_tools($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 9
        echo "            ";
        if ((twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "visible", [], "any", false, false, false, 9) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_project"))) {
            // line 10
            echo "                <a class=\"modal-ajax-form open-edit btn btn-default btn-sm btn-pager\" data-href=\"";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_create_with_customer", ["customer" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 10)]), "html", null, true);
            echo "\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("create"), "html", null, true);
            echo "\"><i class=\"";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\IconExtension']->icon("create"), "html", null, true);
            echo "\"></i></a>
            ";
        }
        // line 12
        echo "            ";
        if (1 === twig_compare(twig_length_filter($this->env, ($context["projects"] ?? null)), 0)) {
            // line 13
            echo "                ";
            echo $this->extensions['App\Twig\PaginationExtension']->renderPagination(($context["projects"] ?? null), ["css_container_class" => "pagination pagination-sm inline", "routeName" => "customer_projects", "routeParams" => ["id" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 13)]]);
            echo "
            ";
        }
        // line 15
        echo "        ";
    }

    // line 16
    public function block_box_body_class($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "no-padding";
    }

    // line 17
    public function block_box_tools_attributes($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "data-page=\"";
        echo twig_escape_filter($this->env, ($context["page"] ?? null), "html", null, true);
        echo "\"";
    }

    // line 18
    public function block_box_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 19
        echo "            ";
        if (0 === twig_compare(twig_length_filter($this->env, ($context["projects"] ?? null)), 0)) {
            // line 20
            echo "                <div class=\"comment\">";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("error.no_entries_found"), "html", null, true);
            echo "</div>
            ";
        } else {
            // line 22
            echo "            <table class=\"table table-hover dataTable\">
                <thead>
                    <tr>
                        <th>";
            // line 25
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.name"), "html", null, true);
            echo "</th>
                        <th class=\"hidden-xs\">";
            // line 26
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.comment"), "html", null, true);
            echo "</th>
                        <th class=\"w-min text-center\">";
            // line 27
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.team"), "html", null, true);
            echo "</th>
                        <th class=\"actions\"></th>
                    </tr>
                </thead>
                <tbody>
                ";
            // line 32
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["projects"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["project"]) {
                // line 33
                echo "                    <tr>
                        <td>";
                // line 34
                echo twig_call_macro($macros["widgets"], "macro_label_project", [$context["project"]], 34, $context, $this->getSourceContext());
                echo "</td>
                        <td class=\"hidden-xs\">";
                // line 35
                echo $this->extensions['App\Twig\MarkdownExtension']->commentContent(twig_get_attribute($this->env, $this->source, $context["project"], "comment", [], "any", false, false, false, 35));
                echo "</td>
                        <td class=\"w-min text-center\">";
                // line 36
                echo twig_call_macro($macros["widgets"], "macro_badge_team_access", [twig_get_attribute($this->env, $this->source, $context["project"], "teams", [], "any", false, false, false, 36)], 36, $context, $this->getSourceContext());
                echo "</td>
                        <td class=\"actions\">";
                // line 37
                echo twig_call_macro($macros["actions"], "macro_project", [$context["project"], "custom"], 37, $context, $this->getSourceContext());
                echo "</td>
                    </tr>
                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['project'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 40
            echo "                </tbody>
            </table>
            ";
        }
        // line 43
        echo "        ";
    }

    public function getTemplateName()
    {
        return "customer/embed_projects.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  248 => 43,  243 => 40,  234 => 37,  230 => 36,  226 => 35,  222 => 34,  219 => 33,  215 => 32,  207 => 27,  203 => 26,  199 => 25,  194 => 22,  188 => 20,  185 => 19,  181 => 18,  172 => 17,  165 => 16,  161 => 15,  155 => 13,  152 => 12,  142 => 10,  139 => 9,  135 => 8,  128 => 6,  124 => 5,  117 => 4,  112 => 1,  110 => 3,  108 => 2,  101 => 1,  45 => 47,  43 => 46,  40 => 45,  37 => 1,);
    }

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