<?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/action_list.html.twig */
class __TwigTemplate_fde2f6bc7f086c48a88fbbb30922981e 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/action_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("action.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 "    ";
        if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DPP"))) {
            // line 8
            yield "            <div class=\"text-right\" style=\"padding-bottom : 15px;\">
                <a href=\"";
            // line 9
            yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_action_new");
            yield "\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> ";
            // line 10
            yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("action.add", [], "messages");
            // line 11
            yield "                </a>
            </div>
            ";
        }
        // line 14
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 15
            yield "    <div class=\"card card-default\">
        <div class=\"card-body\">
            ";
            // line 17
            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.', 17, $this->source); })()), 'form_start');
            yield "
                <div class=\"form-group row\">
                    <div class=\"col-sm-4\">
                        <label class=\"col-form-label\">Type</label>
                        ";
            // line 21
            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.', 21, $this->source); })()), "type", [], "any", false, false, false, 21), 'widget');
            yield "
                    </div>
                    <div class=\"col-sm-8\">
                        <label class=\"col-form-label\">Liste Ministères/Communes</label>
                        ";
            // line 25
            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.', 25, $this->source); })()), "entite", [], "any", false, false, false, 25), 'widget');
            yield "
                    </div>
                </div>
            ";
            // line 28
            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.', 28, $this->source); })()), 'form_end');
            yield "  
        </div>
    </div>
";
        }
        // line 32
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 33
            yield "    <div class=\"card card-default\">
        <div class=\"card-body\">
            ";
            // line 35
            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.', 35, $this->source); })()), 'form_start');
            yield "
                <div class=\"form-group row\">
                    <div class=\"col-sm-12\">
                        <label class=\"col-form-label\">Communes</label>
                        ";
            // line 39
            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.', 39, $this->source); })()), "entite", [], "any", false, false, false, 39), 'widget');
            yield "
                    </div>
                </div>
            ";
            // line 42
            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.', 42, $this->source); })()), 'form_end');
            yield "  
        </div>
    </div>
";
        }
        // line 46
        yield "    
    ";
        // line 47
        if ((($tmp = (isset($context["entite"]) || array_key_exists("entite", $context) ? $context["entite"] : (function () { throw new RuntimeError('Variable "entite" does not exist.', 47, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 48
            yield "    ";
            yield from $this->load("plan/action_list.html.twig", 48, "1158509169")->unwrap()->yield($context);
            // line 88
            yield "
    ";
        } else {
            // line 90
            yield "    <div class=\"alert alert-info\" role=\"alert\">
        ";
            // line 91
            yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Veuillez sélectionner un ministère ou une commune pour afficher ces actions", [], "messages");
            // line 92
            yield "    </div>
    ";
        }
        // line 94
        yield "
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 97
    /**
     * @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 98
        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 121
        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 () {
            \$(\"#actionTable\").DataTable({
                \"pageLength\": 25,
                \"language\": {
                        \"url\": \"";
        // line 128
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/French.json"), "html", null, true);
        yield "\"
                    }
            });
        });
        /*\$(function () {
            //\$(\"#actionTable\").DataTable({
            //});

            // Setup - add a text input to each footer cell
            \$('#actionTable tfoot th').each( function () {
                var title = \$(this).text();
                \$(this).html( '<input type=\"text\" placeholder=\"'+title+'\" />' );
            } );

            // DataTable
            var actionTable = \$('#actionTable').DataTable();

            actionTable.pageLength = 25
        
            // Apply the search
            actionTable.columns().every( function () {
                var that = this;
        
                \$( 'input', this.footer() ).on( 'keyup change clear', function () {
                    if ( that.search() !== this.value ) {
                        that
                            .search( this.value )
                            .draw();
                    }
                } );
            } );

        });*/
    </script>

    <script src=\"";
        // line 163
        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 164
        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 167
    /**
     * @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 168
        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/action_list.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  300 => 168,  290 => 167,  280 => 164,  276 => 163,  238 => 128,  228 => 121,  203 => 98,  193 => 97,  184 => 94,  180 => 92,  178 => 91,  175 => 90,  171 => 88,  168 => 48,  166 => 47,  163 => 46,  156 => 42,  150 => 39,  143 => 35,  139 => 33,  137 => 32,  130 => 28,  124 => 25,  117 => 21,  110 => 17,  106 => 15,  104 => 14,  99 => 11,  97 => 10,  93 => 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 %}action.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_action_new') }}\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> {% trans %}action.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=\"actionTable\" class=\"table table-striped\">
            <thead>
                <th style=\"width: 100px\">{% trans %}basics.code{% endtrans %}</th>
                <th>{% trans %}basics.name{% 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 action in actions %}
                <tr>
                    <td>{{ action.code }}</td>
                    <td>{{ action.name }}</td>
                    <td>{{ 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_action', { 'id': action.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.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 actions{% 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 () {
            \$(\"#actionTable\").DataTable({
                \"pageLength\": 25,
                \"language\": {
                        \"url\": \"{{ asset('plugins/datatables/French.json') }}\"
                    }
            });
        });
        /*\$(function () {
            //\$(\"#actionTable\").DataTable({
            //});

            // Setup - add a text input to each footer cell
            \$('#actionTable tfoot th').each( function () {
                var title = \$(this).text();
                \$(this).html( '<input type=\"text\" placeholder=\"'+title+'\" />' );
            } );

            // DataTable
            var actionTable = \$('#actionTable').DataTable();

            actionTable.pageLength = 25
        
            // Apply the search
            actionTable.columns().every( function () {
                var that = this;
        
                \$( 'input', this.footer() ).on( 'keyup change clear', function () {
                    if ( that.search() !== this.value ) {
                        that
                            .search( this.value )
                            .draw();
                    }
                } );
            } );

        });*/
    </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/action_list.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/plan/action_list.html.twig");
    }
}


/* plan/action_list.html.twig */
class __TwigTemplate_fde2f6bc7f086c48a88fbbb30922981e___1158509169 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 48
        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/action_list.html.twig"));

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

    }

    // line 49
    /**
     * @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 50
        yield "            <table id=\"actionTable\" class=\"table table-striped\">
            <thead>
                <th style=\"width: 100px\">";
        // line 52
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.code", [], "messages");
        yield "</th>
                <th>";
        // line 53
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.name", [], "messages");
        yield "</th>
                <th>";
        // line 54
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.programm", [], "messages");
        yield "</th>
                ";
        // line 55
        if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DPP"))) {
            // line 56
            yield "                <th style=\"width: 100px\"></th>
                ";
        }
        // line 58
        yield "            </thead>
            <tbody>
            ";
        // line 60
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["actions"]) || array_key_exists("actions", $context) ? $context["actions"] : (function () { throw new RuntimeError('Variable "actions" does not exist.', 60, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["action"]) {
            // line 61
            yield "                <tr>
                    <td>";
            // line 62
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["action"], "code", [], "any", false, false, false, 62), "html", null, true);
            yield "</td>
                    <td>";
            // line 63
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["action"], "name", [], "any", false, false, false, 63), "html", null, true);
            yield "</td>
                    <td>";
            // line 64
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["action"], "programm", [], "any", false, false, false, 64), "name", [], "any", false, false, false, 64), "html", null, true);
            yield "</td>
                    ";
            // line 65
            if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DPP"))) {
                // line 66
                yield "                    <td class=\"text-center\">
                        <div class=\"btn-group\">
                            <a href=\"";
                // line 68
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_action", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["action"], "id", [], "any", false, false, false, 68)]), "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 72
            yield "                </tr>
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['action'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 74
        yield "            </tbody>
            <!--tfoot>
                <tr>
                    <th>";
        // line 77
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.code", [], "messages");
        yield "</th>
                    <th>";
        // line 78
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.name", [], "messages");
        yield "</th>
                    <th>";
        // line 79
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.programm", [], "messages");
        yield "</th>
                    ";
        // line 80
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 81
            yield "                        <td style=\"width: 100px\"></td>
                    ";
        }
        // line 83
        yield "                </tr>
            </tfoot-->
            </table>
        ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  649 => 83,  645 => 81,  643 => 80,  639 => 79,  635 => 78,  631 => 77,  626 => 74,  619 => 72,  610 => 68,  606 => 66,  604 => 65,  600 => 64,  596 => 63,  592 => 62,  589 => 61,  585 => 60,  581 => 58,  577 => 56,  575 => 55,  571 => 54,  567 => 53,  563 => 52,  559 => 50,  549 => 49,  532 => 48,  300 => 168,  290 => 167,  280 => 164,  276 => 163,  238 => 128,  228 => 121,  203 => 98,  193 => 97,  184 => 94,  180 => 92,  178 => 91,  175 => 90,  171 => 88,  168 => 48,  166 => 47,  163 => 46,  156 => 42,  150 => 39,  143 => 35,  139 => 33,  137 => 32,  130 => 28,  124 => 25,  117 => 21,  110 => 17,  106 => 15,  104 => 14,  99 => 11,  97 => 10,  93 => 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 %}action.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_action_new') }}\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> {% trans %}action.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=\"actionTable\" class=\"table table-striped\">
            <thead>
                <th style=\"width: 100px\">{% trans %}basics.code{% endtrans %}</th>
                <th>{% trans %}basics.name{% 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 action in actions %}
                <tr>
                    <td>{{ action.code }}</td>
                    <td>{{ action.name }}</td>
                    <td>{{ 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_action', { 'id': action.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.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 actions{% 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 () {
            \$(\"#actionTable\").DataTable({
                \"pageLength\": 25,
                \"language\": {
                        \"url\": \"{{ asset('plugins/datatables/French.json') }}\"
                    }
            });
        });
        /*\$(function () {
            //\$(\"#actionTable\").DataTable({
            //});

            // Setup - add a text input to each footer cell
            \$('#actionTable tfoot th').each( function () {
                var title = \$(this).text();
                \$(this).html( '<input type=\"text\" placeholder=\"'+title+'\" />' );
            } );

            // DataTable
            var actionTable = \$('#actionTable').DataTable();

            actionTable.pageLength = 25
        
            // Apply the search
            actionTable.columns().every( function () {
                var that = this;
        
                \$( 'input', this.footer() ).on( 'keyup change clear', function () {
                    if ( that.search() !== this.value ) {
                        that
                            .search( this.value )
                            .draw();
                    }
                } );
            } );

        });*/
    </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/action_list.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/plan/action_list.html.twig");
    }
}
