<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;

/* plan/activity_list.html.twig */
class __TwigTemplate_684f31c8c840ab42356399aaa5ca9c15 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

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

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

        $this->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_content' => [$this, 'block_page_content'],
            'javascripts' => [$this, 'block_javascripts'],
            'stylesheets' => [$this, 'block_stylesheets'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "@AdminLTE/layout/mesodd-layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "plan/activity_list.html.twig"));

        $this->parent = $this->load("@AdminLTE/layout/mesodd-layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_title"));

        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("activity.title", [], "messages");
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 6
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content"));

        // line 7
        yield "
    ";
        // line 8
        if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DPP"))) {
            // line 9
            yield "            <div class=\"text-right\" style=\"padding-bottom : 15px;\">
                <a href=\"";
            // line 10
            yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_activity_new");
            yield "\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> ";
            // line 11
            yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("activity.add", [], "messages");
            // line 12
            yield "                </a>
            </div>
    ";
        }
        // line 15
        yield "
    ";
        // line 16
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 17
            yield "        <div class=\"card card-default\">
            <div class=\"card-body\">
                ";
            // line 19
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 19, $this->source); })()), 'form_start');
            yield "
                    <div class=\"form-group row\">
                        <div class=\"col-sm-4\">
                            <label class=\"col-form-label\">Type</label>
                            ";
            // line 23
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 23, $this->source); })()), "type", [], "any", false, false, false, 23), 'widget');
            yield "
                        </div>
                        <div class=\"col-sm-8\">
                            <label class=\"col-form-label\">Liste Ministères/Communes</label>
                            ";
            // line 27
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 27, $this->source); })()), "entite", [], "any", false, false, false, 27), 'widget');
            yield "
                        </div>
                    </div>
                ";
            // line 30
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 30, $this->source); })()), 'form_end');
            yield "  
            </div>
        </div>
    ";
        }
        // line 34
        yield "
    ";
        // line 35
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 36
            yield "        <div class=\"card card-default\">
            <div class=\"card-body\">
                ";
            // line 38
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 38, $this->source); })()), 'form_start');
            yield "
                    <div class=\"form-group row\">
                        <div class=\"col-sm-12\">
                            <label class=\"col-form-label\">Communes</label>
                            ";
            // line 42
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 42, $this->source); })()), "entite", [], "any", false, false, false, 42), 'widget');
            yield "
                        </div>
                    </div>
                ";
            // line 45
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 45, $this->source); })()), 'form_end');
            yield "  
            </div>
        </div>
    ";
        }
        // line 49
        yield "
    ";
        // line 50
        if ((($tmp = (isset($context["entite"]) || array_key_exists("entite", $context) ? $context["entite"] : (function () { throw new RuntimeError('Variable "entite" does not exist.', 50, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 51
            yield "        ";
            yield from $this->load("plan/activity_list.html.twig", 51, "2126099634")->unwrap()->yield($context);
            // line 94
            yield "    ";
        } else {
            // line 95
            yield "        <div class=\"alert alert-info\" role=\"alert\">
            ";
            // line 96
            yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Veuillez sélectionner un ministère ou une commune pour afficher ces activités", [], "messages");
            // line 97
            yield "        </div>
    ";
        }
        // line 99
        yield "
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 102
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));

        // line 103
        yield "     <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>
    
        <script src=\"";
        // line 125
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/French.json"), "html", null, true);
        yield "\"></script>
        <script>
            \$(function () {
                \$(\"#activityTable\").DataTable({
                    \"pageLength\": 25,
                    \"language\": {
                        \"url\": \"";
        // line 131
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/French.json"), "html", null, true);
        yield "\"
                    }
                });
            });
        </script>

    <script src=\"";
        // line 137
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/jquery.dataTables.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 138
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables-bs4/js/dataTables.bootstrap4.js"), "html", null, true);
        yield "\"></script>
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 141
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));

        // line 142
        yield "    <link rel=\"stylesheet\" href=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables-bs4/css/dataTables.bootstrap4.css"), "html", null, true);
        yield "\">
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "plan/activity_list.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  276 => 142,  266 => 141,  256 => 138,  252 => 137,  243 => 131,  234 => 125,  210 => 103,  200 => 102,  191 => 99,  187 => 97,  185 => 96,  182 => 95,  179 => 94,  176 => 51,  174 => 50,  171 => 49,  164 => 45,  158 => 42,  151 => 38,  147 => 36,  145 => 35,  142 => 34,  135 => 30,  129 => 27,  122 => 23,  115 => 19,  111 => 17,  109 => 16,  106 => 15,  101 => 12,  99 => 11,  95 => 10,  92 => 9,  90 => 8,  87 => 7,  77 => 6,  60 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}activity.title{% endtrans %}{% endblock %}


{% block page_content %}

    {% if (is_granted('ROLE_MANAGER') or is_granted('ROLE_DPP')) %}
            <div class=\"text-right\" style=\"padding-bottom : 15px;\">
                <a href=\"{{ path('app_activity_new') }}\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> {% trans %}activity.add{% endtrans %}
                </a>
            </div>
    {% endif %}

    {% if is_granted('ROLE_MANAGER') %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-4\">
                            <label class=\"col-form-label\">Type</label>
                            {{ form_widget(form.type) }}
                        </div>
                        <div class=\"col-sm-8\">
                            <label class=\"col-form-label\">Liste Ministères/Communes</label>
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}

    {% if is_granted('ROLE_DDD') %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-12\">
                            <label class=\"col-form-label\">Communes</label>
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}

    {% if entite %}
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_body %}
                <table id=\"activityTable\" class=\"table table-striped\">
                <thead>
                    <th>{% trans %}basics.code{% endtrans %}</th>
                    <th>{% trans %}basics.name{% endtrans %}</th>
                    <th>{% trans %}basics.action{% endtrans %}</th>
                    <th>{% trans %}basics.programm{% endtrans %}</th>
                    {% if (is_granted('ROLE_MANAGER') or is_granted('ROLE_DPP')) %}
                    <th style=\"width: 100px\"></th>
                    {% endif %}
                </thead>
                <tbody>
                {% for activity in activities %}
                    <tr>
                        <td>{{ activity.code }}</td>
                        <td>{{ activity.name }}</td>
                        <td>{{ activity.action.name }}</td>
                        <td>{{ activity.action.programm.name }}</td>
                        {% if (is_granted('ROLE_MANAGER') or is_granted('ROLE_DPP')) %}
                        <td class=\"text-center\">
                            <div class=\"btn-group\">
                                <a href=\"{{ path('app_activity', { 'id': activity.id }) }}\" class=\"btn btn-sm btn-default\" role=\"button\" aria-pressed=\"true\">{% trans %}basics.update{% endtrans %}</a>
                            </div>
                        </td>
                        {% endif %}
                    </tr>
                {% endfor %}
                </tbody>
                <!--tfoot>
                    <tr>
                        <th>{% trans %}basics.code{% endtrans %}</th>
                        <th>{% trans %}basics.name{% endtrans %}</th>
                        <th>{% trans %}basics.action{% endtrans %}</th>
                        <th>{% trans %}basics.programm{% endtrans %}</th>
                        {% if is_granted('ROLE_MANAGER') %}
                            <td style=\"width: 100px\"></td>
                        {% endif %}
                    </tr>
                </tfoot-->
                </table>
            {% endblock %}    
        {% endembed %}
    {% else %}
        <div class=\"alert alert-info\" role=\"alert\">
            {% trans %}Veuillez sélectionner un ministère ou une commune pour afficher ces activités{% endtrans %}
        </div>
    {% endif %}

{% endblock %}

{% block javascripts %}
     <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>
    
        <script src=\"{{ asset('plugins/datatables/French.json') }}\"></script>
        <script>
            \$(function () {
                \$(\"#activityTable\").DataTable({
                    \"pageLength\": 25,
                    \"language\": {
                        \"url\": \"{{ asset('plugins/datatables/French.json') }}\"
                    }
                });
            });
        </script>

    <script src=\"{{ asset('plugins/datatables/jquery.dataTables.js') }}\"></script>
    <script src=\"{{ asset('plugins/datatables-bs4/js/dataTables.bootstrap4.js') }}\"></script>
{% endblock %}

{% block stylesheets %}
    <link rel=\"stylesheet\" href=\"{{ asset('plugins/datatables-bs4/css/dataTables.bootstrap4.css') }}\">
{% endblock %}", "plan/activity_list.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/plan/activity_list.html.twig");
    }
}


/* plan/activity_list.html.twig */
class __TwigTemplate_684f31c8c840ab42356399aaa5ca9c15___2126099634 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

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

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

        $this->blocks = [
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 51
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "plan/activity_list.html.twig"));

        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 51);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 52
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "box_body"));

        // line 53
        yield "                <table id=\"activityTable\" class=\"table table-striped\">
                <thead>
                    <th>";
        // line 55
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.code", [], "messages");
        yield "</th>
                    <th>";
        // line 56
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.name", [], "messages");
        yield "</th>
                    <th>";
        // line 57
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.action", [], "messages");
        yield "</th>
                    <th>";
        // line 58
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.programm", [], "messages");
        yield "</th>
                    ";
        // line 59
        if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DPP"))) {
            // line 60
            yield "                    <th style=\"width: 100px\"></th>
                    ";
        }
        // line 62
        yield "                </thead>
                <tbody>
                ";
        // line 64
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["activities"]) || array_key_exists("activities", $context) ? $context["activities"] : (function () { throw new RuntimeError('Variable "activities" does not exist.', 64, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["activity"]) {
            // line 65
            yield "                    <tr>
                        <td>";
            // line 66
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["activity"], "code", [], "any", false, false, false, 66), "html", null, true);
            yield "</td>
                        <td>";
            // line 67
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["activity"], "name", [], "any", false, false, false, 67), "html", null, true);
            yield "</td>
                        <td>";
            // line 68
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["activity"], "action", [], "any", false, false, false, 68), "name", [], "any", false, false, false, 68), "html", null, true);
            yield "</td>
                        <td>";
            // line 69
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["activity"], "action", [], "any", false, false, false, 69), "programm", [], "any", false, false, false, 69), "name", [], "any", false, false, false, 69), "html", null, true);
            yield "</td>
                        ";
            // line 70
            if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DPP"))) {
                // line 71
                yield "                        <td class=\"text-center\">
                            <div class=\"btn-group\">
                                <a href=\"";
                // line 73
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_activity", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["activity"], "id", [], "any", false, false, false, 73)]), "html", null, true);
                yield "\" class=\"btn btn-sm btn-default\" role=\"button\" aria-pressed=\"true\">";
                yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.update", [], "messages");
                yield "</a>
                            </div>
                        </td>
                        ";
            }
            // line 77
            yield "                    </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['activity'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 79
        yield "                </tbody>
                <!--tfoot>
                    <tr>
                        <th>";
        // line 82
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.code", [], "messages");
        yield "</th>
                        <th>";
        // line 83
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.name", [], "messages");
        yield "</th>
                        <th>";
        // line 84
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.action", [], "messages");
        yield "</th>
                        <th>";
        // line 85
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.programm", [], "messages");
        yield "</th>
                        ";
        // line 86
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 87
            yield "                            <td style=\"width: 100px\"></td>
                        ";
        }
        // line 89
        yield "                    </tr>
                </tfoot-->
                </table>
            ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "plan/activity_list.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  611 => 89,  607 => 87,  605 => 86,  601 => 85,  597 => 84,  593 => 83,  589 => 82,  584 => 79,  577 => 77,  568 => 73,  564 => 71,  562 => 70,  558 => 69,  554 => 68,  550 => 67,  546 => 66,  543 => 65,  539 => 64,  535 => 62,  531 => 60,  529 => 59,  525 => 58,  521 => 57,  517 => 56,  513 => 55,  509 => 53,  499 => 52,  482 => 51,  276 => 142,  266 => 141,  256 => 138,  252 => 137,  243 => 131,  234 => 125,  210 => 103,  200 => 102,  191 => 99,  187 => 97,  185 => 96,  182 => 95,  179 => 94,  176 => 51,  174 => 50,  171 => 49,  164 => 45,  158 => 42,  151 => 38,  147 => 36,  145 => 35,  142 => 34,  135 => 30,  129 => 27,  122 => 23,  115 => 19,  111 => 17,  109 => 16,  106 => 15,  101 => 12,  99 => 11,  95 => 10,  92 => 9,  90 => 8,  87 => 7,  77 => 6,  60 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}activity.title{% endtrans %}{% endblock %}


{% block page_content %}

    {% if (is_granted('ROLE_MANAGER') or is_granted('ROLE_DPP')) %}
            <div class=\"text-right\" style=\"padding-bottom : 15px;\">
                <a href=\"{{ path('app_activity_new') }}\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> {% trans %}activity.add{% endtrans %}
                </a>
            </div>
    {% endif %}

    {% if is_granted('ROLE_MANAGER') %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-4\">
                            <label class=\"col-form-label\">Type</label>
                            {{ form_widget(form.type) }}
                        </div>
                        <div class=\"col-sm-8\">
                            <label class=\"col-form-label\">Liste Ministères/Communes</label>
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}

    {% if is_granted('ROLE_DDD') %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-12\">
                            <label class=\"col-form-label\">Communes</label>
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}

    {% if entite %}
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_body %}
                <table id=\"activityTable\" class=\"table table-striped\">
                <thead>
                    <th>{% trans %}basics.code{% endtrans %}</th>
                    <th>{% trans %}basics.name{% endtrans %}</th>
                    <th>{% trans %}basics.action{% endtrans %}</th>
                    <th>{% trans %}basics.programm{% endtrans %}</th>
                    {% if (is_granted('ROLE_MANAGER') or is_granted('ROLE_DPP')) %}
                    <th style=\"width: 100px\"></th>
                    {% endif %}
                </thead>
                <tbody>
                {% for activity in activities %}
                    <tr>
                        <td>{{ activity.code }}</td>
                        <td>{{ activity.name }}</td>
                        <td>{{ activity.action.name }}</td>
                        <td>{{ activity.action.programm.name }}</td>
                        {% if (is_granted('ROLE_MANAGER') or is_granted('ROLE_DPP')) %}
                        <td class=\"text-center\">
                            <div class=\"btn-group\">
                                <a href=\"{{ path('app_activity', { 'id': activity.id }) }}\" class=\"btn btn-sm btn-default\" role=\"button\" aria-pressed=\"true\">{% trans %}basics.update{% endtrans %}</a>
                            </div>
                        </td>
                        {% endif %}
                    </tr>
                {% endfor %}
                </tbody>
                <!--tfoot>
                    <tr>
                        <th>{% trans %}basics.code{% endtrans %}</th>
                        <th>{% trans %}basics.name{% endtrans %}</th>
                        <th>{% trans %}basics.action{% endtrans %}</th>
                        <th>{% trans %}basics.programm{% endtrans %}</th>
                        {% if is_granted('ROLE_MANAGER') %}
                            <td style=\"width: 100px\"></td>
                        {% endif %}
                    </tr>
                </tfoot-->
                </table>
            {% endblock %}    
        {% endembed %}
    {% else %}
        <div class=\"alert alert-info\" role=\"alert\">
            {% trans %}Veuillez sélectionner un ministère ou une commune pour afficher ces activités{% endtrans %}
        </div>
    {% endif %}

{% endblock %}

{% block javascripts %}
     <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>
    
        <script src=\"{{ asset('plugins/datatables/French.json') }}\"></script>
        <script>
            \$(function () {
                \$(\"#activityTable\").DataTable({
                    \"pageLength\": 25,
                    \"language\": {
                        \"url\": \"{{ asset('plugins/datatables/French.json') }}\"
                    }
                });
            });
        </script>

    <script src=\"{{ asset('plugins/datatables/jquery.dataTables.js') }}\"></script>
    <script src=\"{{ asset('plugins/datatables-bs4/js/dataTables.bootstrap4.js') }}\"></script>
{% endblock %}

{% block stylesheets %}
    <link rel=\"stylesheet\" href=\"{{ asset('plugins/datatables-bs4/css/dataTables.bootstrap4.css') }}\">
{% endblock %}", "plan/activity_list.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/plan/activity_list.html.twig");
    }
}
