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

/* activity/details.html.twig */
class __TwigTemplate_20f69335045e112ad661270c197eac8105daf5e2d7a506ec181b931d594d14b9 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", "activity/details.html.twig", 2)->unwrap();
        // line 3
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("activity/actions.html.twig", "activity/details.html.twig", 3)->unwrap();
        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", "activity/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_activity.title"), "html", null, true);
    }

    // line 6
    public function block_page_actions($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["actions"], "macro_activity", [($context["activity"] ?? 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["activity"] ?? null));
        // line 10
        echo "    ";
        $context["currency"] = null;
        // line 11
        echo "    ";
        if ( !(null === twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "project", [], "any", false, false, false, 11))) {
            // line 12
            echo "        ";
            $context["currency"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "project", [], "any", false, false, false, 12), "customer", [], "any", false, false, false, 12), "currency", [], "any", false, false, false, 12);
            // line 13
            echo "    ";
        }
        // line 14
        echo "
    ";
        // line 15
        $this->loadTemplate("activity/details.html.twig", "activity/details.html.twig", 15, "1004245253")->display($context);
        // line 79
        echo "
    ";
        // line 80
        if ( !(null === ($context["stats"] ?? null))) {
            // line 81
            echo "        ";
            echo twig_include($this->env, $context, "activity/embed_budget.html.twig", ["activity" => ($context["activity"] ?? null), "stats" => ($context["stats"] ?? null)]);
            echo "
    ";
        }
        // line 83
        echo "
    ";
        // line 84
        if (($context["can_edit"] ?? null)) {
            // line 85
            echo "        ";
            echo twig_include($this->env, $context, "embeds/rates-table.html.twig", ["id" => "activity_rates_box", "entity" => ($context["activity"] ?? null), "create_url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_activity_rate_add", ["id" => twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "id", [], "any", false, false, false, 85)]), "delete_route" => "delete_activity_rate", "currency" => ($context["currency"] ?? null)]);
            echo "
    ";
        }
        // line 87
        echo "
    ";
        // line 88
        if ( !(null === ($context["teams"] ?? null))) {
            // line 89
            echo "        ";
            $context["options"] = ["teams" => ($context["teams"] ?? null), "team" => ($context["team"] ?? null)];
            // line 90
            echo "        ";
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("permissions", ($context["activity"] ?? null))) {
                // line 91
                echo "            ";
                $context["options"] = twig_array_merge(($context["options"] ?? null), ["route_create" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("activity_team_create", ["id" => twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "id", [], "any", false, false, false, 91)]), "route_edit" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_activity_permissions", ["id" => twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "id", [], "any", false, false, false, 91)])]);
                // line 92
                echo "        ";
            }
            // line 93
            echo "        ";
            echo twig_include($this->env, $context, "embeds/teams.html.twig", ($context["options"] ?? null));
            echo "
    ";
        }
        // line 95
        echo "
";
    }

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  146 => 99,  142 => 98,  137 => 95,  131 => 93,  128 => 92,  125 => 91,  122 => 90,  119 => 89,  117 => 88,  114 => 87,  108 => 85,  106 => 84,  103 => 83,  97 => 81,  95 => 80,  92 => 79,  90 => 15,  87 => 14,  84 => 13,  81 => 12,  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("", "activity/details.html.twig", "/var/www/html/kimai2/templates/activity/details.html.twig");
    }
}


/* activity/details.html.twig */
class __TwigTemplate_20f69335045e112ad661270c197eac8105daf5e2d7a506ec181b931d594d14b9___1004245253 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_title' => [$this, 'block_box_title'],
            'box_tools' => [$this, 'block_box_tools'],
            'box_body_class' => [$this, 'block_box_body_class'],
            'box_body' => [$this, 'block_box_body'],
        ];
    }

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

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

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

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

    // line 23
    public function block_box_tools($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 24
        echo "            ";
        if (($context["can_edit"] ?? null)) {
            // line 25
            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_activity_edit", ["id" => twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "id", [], "any", false, false, false, 25)]), "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 27
        echo "        ";
    }

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

    // line 29
    public function block_box_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 30
        echo "            ";
        if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "comment", [], "any", false, false, false, 30))) {
            // line 31
            echo "                <div class=\"comment\">
                    ";
            // line 32
            echo $this->extensions['App\Twig\MarkdownExtension']->commentContent(twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "comment", [], "any", false, false, false, 32), true);
            echo "
                </div>
            ";
        }
        // line 35
        echo "            <table class=\"table table-hover dataTable\">
                ";
        // line 36
        if ( !twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "visible", [], "any", false, false, false, 36)) {
            // line 37
            echo "                    <tr>
                        <th>";
            // line 38
            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 40
            echo twig_call_macro($macros["widgets"], "macro_label_boolean", [twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "visible", [], "any", false, false, false, 40)], 40, $context, $this->getSourceContext());
            echo "
                        </td>
                    </tr>
                ";
        }
        // line 44
        echo "                ";
        if ( !twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "global", [], "any", false, false, false, 44)) {
            // line 45
            echo "                    <tr>
                        <th>";
            // line 46
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.customer"), "html", null, true);
            echo "</th>
                        <td>
                            ";
            // line 48
            echo twig_call_macro($macros["widgets"], "macro_label_customer", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "project", [], "any", false, false, false, 48), "customer", [], "any", false, false, false, 48)], 48, $context, $this->getSourceContext());
            echo "
                        </td>
                        <td class=\"w-min\">
                            ";
            // line 51
            echo twig_call_macro($macros["widgets"], "macro_badge_team_access", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "project", [], "any", false, false, false, 51), "customer", [], "any", false, false, false, 51), "teams", [], "any", false, false, false, 51)], 51, $context, $this->getSourceContext());
            echo "
                        </td>
                        <td class=\"actions\">
                            ";
            // line 54
            echo twig_call_macro($macros["customerActions"], "macro_customer", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "project", [], "any", false, false, false, 54), "customer", [], "any", false, false, false, 54), "custom"], 54, $context, $this->getSourceContext());
            echo "
                        </td>
                    </tr>
                    <tr>
                        <th>";
            // line 58
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.project"), "html", null, true);
            echo "</th>
                        <td>
                            ";
            // line 60
            echo twig_call_macro($macros["widgets"], "macro_label_project", [twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "project", [], "any", false, false, false, 60)], 60, $context, $this->getSourceContext());
            echo "
                        </td>
                        <td class=\"w-min\">
                            ";
            // line 63
            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["activity"] ?? null), "project", [], "any", false, false, false, 63), "teams", [], "any", false, false, false, 63)], 63, $context, $this->getSourceContext());
            echo "
                        </td>
                        <td class=\"actions\">
                            ";
            // line 66
            echo twig_call_macro($macros["projectActions"], "macro_project", [twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "project", [], "any", false, false, false, 66), "custom"], 66, $context, $this->getSourceContext());
            echo "
                        </td>
                    </tr>
                ";
        }
        // line 70
        echo "                ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(twig_sort_filter(twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "visibleMetaFields", [], "any", false, false, false, 70), 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, 70) <=> twig_get_attribute($this->env, $this->source, ($context["b"] ?? null), "order", [], "any", false, false, false, 70)); }));
        foreach ($context['_seq'] as $context["_key"] => $context["metaField"]) {
            // line 71
            echo "                    <tr>
                        <th>";
            // line 72
            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, 72)), "html", null, true);
            echo "</th>
                        <td colspan=\"3\">";
            // line 73
            echo twig_call_macro($macros["widgets"], "macro_form_type_value", [twig_get_attribute($this->env, $this->source, $context["metaField"], "type", [], "any", false, false, false, 73), twig_get_attribute($this->env, $this->source, $context["metaField"], "value", [], "any", false, false, false, 73), ($context["activity"] ?? null)], 73, $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 76
        echo "            </table>
        ";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  378 => 76,  369 => 73,  365 => 72,  362 => 71,  357 => 70,  350 => 66,  344 => 63,  338 => 60,  333 => 58,  326 => 54,  320 => 51,  314 => 48,  309 => 46,  306 => 45,  303 => 44,  296 => 40,  291 => 38,  288 => 37,  286 => 36,  283 => 35,  277 => 32,  274 => 31,  271 => 30,  267 => 29,  260 => 28,  256 => 27,  246 => 25,  243 => 24,  239 => 23,  232 => 21,  228 => 20,  221 => 19,  216 => 15,  214 => 18,  212 => 17,  210 => 16,  203 => 15,  146 => 99,  142 => 98,  137 => 95,  131 => 93,  128 => 92,  125 => 91,  122 => 90,  119 => 89,  117 => 88,  114 => 87,  108 => 85,  106 => 84,  103 => 83,  97 => 81,  95 => 80,  92 => 79,  90 => 15,  87 => 14,  84 => 13,  81 => 12,  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("", "activity/details.html.twig", "/var/www/html/kimai2/templates/activity/details.html.twig");
    }
}
