<?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/details.html.twig */
class __TwigTemplate_cca7731a7c61b611a3f606b9fd7f1fed6c8da89042d9a98f366409129c49f35f 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_actions' => [$this, 'block_page_actions'],
            'main' => [$this, 'block_main'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    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", "project/details.html.twig", 2)->unwrap();
        // line 3
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("project/actions.html.twig", "project/details.html.twig", 3)->unwrap();
        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", "project/details.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

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

    // line 6
    public function block_page_actions($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["actions"], "macro_project", [($context["project"] ?? null), "details"], 6, $context, $this->getSourceContext());
    }

    // line 8
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 9
        echo "    ";
        $context["can_edit"] = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", ($context["project"] ?? null));
        // line 10
        echo "
    ";
        // line 11
        $this->loadTemplate("project/details.html.twig", "project/details.html.twig", 11, "57375827")->display($context);
        // line 98
        echo "
    ";
        // line 99
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\ProjectController::activitiesAction", ["project" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 99), "page" => 1]));
        echo "

    ";
        // line 101
        if ( !(null === ($context["stats"] ?? null))) {
            // line 102
            echo "        ";
            echo twig_include($this->env, $context, "project/embed_budget.html.twig", ["project" => ($context["project"] ?? null), "stats" => ($context["stats"] ?? null)]);
            echo "
    ";
        }
        // line 104
        echo "
    ";
        // line 105
        if (($context["can_edit"] ?? null)) {
            // line 106
            echo "        ";
            echo twig_include($this->env, $context, "embeds/rates-table.html.twig", ["id" => "project_rates_box", "entity" => ($context["project"] ?? null), "create_url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_rate_add", ["id" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 106)]), "delete_route" => "delete_project_rate", "currency" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 106), "currency", [], "any", false, false, false, 106)]);
            echo "
    ";
        }
        // line 108
        echo "
    ";
        // line 109
        if ( !(null === ($context["teams"] ?? null))) {
            // line 110
            echo "        ";
            $context["options"] = ["teams" => ($context["teams"] ?? null), "team" => ($context["team"] ?? null)];
            // line 111
            echo "        ";
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("permissions", ($context["project"] ?? null))) {
                // line 112
                echo "            ";
                $context["options"] = twig_array_merge(($context["options"] ?? null), ["route_create" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("project_team_create", ["id" => twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "id", [], "any", false, false, false, 112)]), "route_edit" => $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, 112)])]);
                // line 113
                echo "        ";
            }
            // line 114
            echo "        ";
            if (1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 114), "teams", [], "any", false, false, false, 114)), 0)) {
                // line 115
                echo "            ";
                $context["options"] = twig_array_merge(($context["options"] ?? null), ["empty_message" => "team.project_visibility_inherited"]);
                // line 116
                echo "        ";
            }
            // line 117
            echo "        ";
            echo twig_include($this->env, $context, "embeds/teams.html.twig", ($context["options"] ?? null));
            echo "
    ";
        }
        // line 119
        echo "
    ";
        // line 120
        if ( !(null === ($context["comments"] ?? null))) {
            // line 121
            echo "        ";
            $context["options"] = ["form" => ($context["commentForm"] ?? null), "comments" => ($context["comments"] ?? null)];
            // line 122
            echo "        ";
            if (($context["can_edit"] ?? null)) {
                // line 123
                echo "            ";
                $context["options"] = twig_array_merge(($context["options"] ?? null), ["route_pin" => "project_comment_pin", "route_delete" => "project_comment_delete"]);
                // line 124
                echo "        ";
            }
            // line 125
            echo "        ";
            echo twig_include($this->env, $context, "embeds/comments.html.twig", ($context["options"] ?? null));
            echo "
    ";
        }
        // line 127
        echo "
";
    }

    // line 130
    public function block_javascripts($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 131
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\">
        document.addEventListener('kimai.initialized', function() {
            KimaiReloadPageWidget.create('kimai.customerTeamUpdate kimai.projectTeamUpdate kimai.activityTeamUpdate kimai.projectUpdate kimai.teamUpdate kimai.customerUpdate kimai.rateUpdate');
        });
    </script>
";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  171 => 131,  167 => 130,  162 => 127,  156 => 125,  153 => 124,  150 => 123,  147 => 122,  144 => 121,  142 => 120,  139 => 119,  133 => 117,  130 => 116,  127 => 115,  124 => 114,  121 => 113,  118 => 112,  115 => 111,  112 => 110,  110 => 109,  107 => 108,  101 => 106,  99 => 105,  96 => 104,  90 => 102,  88 => 101,  83 => 99,  80 => 98,  78 => 11,  75 => 10,  72 => 9,  68 => 8,  61 => 6,  54 => 5,  49 => 1,  47 => 3,  45 => 2,  38 => 1,);
    }

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


/* project/details.html.twig */
class __TwigTemplate_cca7731a7c61b611a3f606b9fd7f1fed6c8da89042d9a98f366409129c49f35f___57375827 extends Template
{
    private $source;
    private $macros = [];

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

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

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

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

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

    // line 14
    public function block_box_attributes($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "id=\"project_details_box\"";
    }

    // line 15
    public function block_box_tools($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 16
        echo "            ";
        if (($context["can_edit"] ?? null)) {
            // line 17
            echo "                <a class=\"modal-ajax-form open-edit btn btn-default btn-sm\" data-href=\"";
            echo twig_escape_filter($this->env, $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, 17)]), "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("action.edit"), "html", null, true);
            echo "\"><i class=\"";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\IconExtension']->icon("edit"), "html", null, true);
            echo "\"></i></a>
            ";
        }
        // line 19
        echo "        ";
    }

    // line 20
    public function block_box_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 21
        echo "            ";
        echo twig_call_macro($macros["widgets"], "macro_label_project", [($context["project"] ?? null)], 21, $context, $this->getSourceContext());
        echo "
        ";
    }

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

    // line 24
    public function block_box_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 25
        echo "            ";
        if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "comment", [], "any", false, false, false, 25))) {
            // line 26
            echo "                <div class=\"comment\">
                    ";
            // line 27
            echo $this->extensions['App\Twig\MarkdownExtension']->commentContent(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "comment", [], "any", false, false, false, 27), true);
            echo "
                </div>
            ";
        }
        // line 30
        echo "            <table class=\"table table-hover dataTable\">
                ";
        // line 31
        if ( !twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "visible", [], "any", false, false, false, 31)) {
            // line 32
            echo "                    <tr>
                        <th>";
            // line 33
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.visible"), "html", null, true);
            echo "</th>
                        <td colspan=\"3\">
                            ";
            // line 35
            echo twig_call_macro($macros["widgets"], "macro_label_boolean", [twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "visible", [], "any", false, false, false, 35)], 35, $context, $this->getSourceContext());
            echo "
                        </td>
                    </tr>
                ";
        }
        // line 39
        echo "                <tr>
                    <th>";
        // line 40
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.customer"), "html", null, true);
        echo "</th>
                    <td>
                        ";
        // line 42
        echo twig_call_macro($macros["widgets"], "macro_label_customer", [twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 42)], 42, $context, $this->getSourceContext());
        echo "
                    </td>
                    <td class=\"w-min\">
                        ";
        // line 45
        echo twig_call_macro($macros["widgets"], "macro_badge_team_access", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 45), "teams", [], "any", false, false, false, 45)], 45, $context, $this->getSourceContext());
        echo "
                    </td>
                    <td class=\"actions\">
                        ";
        // line 48
        echo twig_call_macro($macros["customerActions"], "macro_customer", [twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "customer", [], "any", false, false, false, 48), "custom"], 48, $context, $this->getSourceContext());
        echo "
                    </td>
                </tr>
                ";
        // line 51
        if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("details", ($context["project"] ?? null))) {
            // line 52
            echo "                    <tr>
                        <th>";
            // line 53
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.orderNumber"), "html", null, true);
            echo "</th>
                        <td colspan=\"3\">
                            ";
            // line 55
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "orderNumber", [], "any", false, false, false, 55), "html", null, true);
            echo "
                        </td>
                    </tr>
                    <tr>
                        <th>";
            // line 59
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.orderDate"), "html", null, true);
            echo "</th>
                        <td colspan=\"3\">
                            ";
            // line 61
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "orderDate", [], "any", false, false, false, 61))) {
                // line 62
                echo "                                ";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateTimeFull(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "orderDate", [], "any", false, false, false, 62)), "html", null, true);
                echo "
                            ";
            } else {
                // line 64
                echo "                                &ndash;
                            ";
            }
            // line 66
            echo "                        </td>
                    </tr>
                    <tr>
                        <th>";
            // line 69
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.project_start"), "html", null, true);
            echo "</th>
                        <td colspan=\"3\">
                            ";
            // line 71
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "start", [], "any", false, false, false, 71))) {
                // line 72
                echo "                                ";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateTimeFull(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "start", [], "any", false, false, false, 72)), "html", null, true);
                echo "
                            ";
            } else {
                // line 74
                echo "                                &ndash;
                            ";
            }
            // line 76
            echo "                        </td>
                    </tr>
                    <tr>
                        <th>";
            // line 79
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.project_end"), "html", null, true);
            echo "</th>
                        <td colspan=\"3\">
                            ";
            // line 81
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "end", [], "any", false, false, false, 81))) {
                // line 82
                echo "                                ";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateTimeFull(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "end", [], "any", false, false, false, 82)), "html", null, true);
                echo "
                            ";
            } else {
                // line 84
                echo "                                &ndash;
                            ";
            }
            // line 86
            echo "                        </td>
                    </tr>
                ";
        }
        // line 89
        echo "                ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(twig_sort_filter(twig_get_attribute($this->env, $this->source, ($context["project"] ?? null), "visibleMetaFields", [], "any", false, false, false, 89), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, ($context["a"] ?? null), "order", [], "any", false, false, false, 89) <=> twig_get_attribute($this->env, $this->source, ($context["b"] ?? null), "order", [], "any", false, false, false, 89)); }));
        foreach ($context['_seq'] as $context["_key"] => $context["metaField"]) {
            // line 90
            echo "                    <tr>
                        <th>";
            // line 91
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["metaField"], "label", [], "any", false, false, false, 91)), "html", null, true);
            echo "</th>
                        <td colspan=\"3\">";
            // line 92
            echo twig_call_macro($macros["widgets"], "macro_form_type_value", [twig_get_attribute($this->env, $this->source, $context["metaField"], "type", [], "any", false, false, false, 92), twig_get_attribute($this->env, $this->source, $context["metaField"], "value", [], "any", false, false, false, 92), ($context["project"] ?? null)], 92, $context, $this->getSourceContext());
            echo "</td>
                    </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['metaField'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 95
        echo "            </table>
        ";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  456 => 95,  447 => 92,  443 => 91,  440 => 90,  435 => 89,  430 => 86,  426 => 84,  420 => 82,  418 => 81,  413 => 79,  408 => 76,  404 => 74,  398 => 72,  396 => 71,  391 => 69,  386 => 66,  382 => 64,  376 => 62,  374 => 61,  369 => 59,  362 => 55,  357 => 53,  354 => 52,  352 => 51,  346 => 48,  340 => 45,  334 => 42,  329 => 40,  326 => 39,  319 => 35,  314 => 33,  311 => 32,  309 => 31,  306 => 30,  300 => 27,  297 => 26,  294 => 25,  290 => 24,  283 => 23,  276 => 21,  272 => 20,  268 => 19,  258 => 17,  255 => 16,  251 => 15,  244 => 14,  239 => 11,  237 => 13,  235 => 12,  228 => 11,  171 => 131,  167 => 130,  162 => 127,  156 => 125,  153 => 124,  150 => 123,  147 => 122,  144 => 121,  142 => 120,  139 => 119,  133 => 117,  130 => 116,  127 => 115,  124 => 114,  121 => 113,  118 => 112,  115 => 111,  112 => 110,  110 => 109,  107 => 108,  101 => 106,  99 => 105,  96 => 104,  90 => 102,  88 => 101,  83 => 99,  80 => 98,  78 => 11,  75 => 10,  72 => 9,  68 => 8,  61 => 6,  54 => 5,  49 => 1,  47 => 3,  45 => 2,  38 => 1,);
    }

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