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

/* communes/ddd_dashboard.html.twig */
class __TwigTemplate_679206610a0fa838f0a328cac07edf80 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 7
        return $this->load(($context["extendedTemplate"] ?? null), 7);
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 1
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 2
            $context["extendedTemplate"] = "@AdminLTE/layout/ddd-layout.html.twig";
        } else {
            // line 4
            $context["extendedTemplate"] = "@AdminLTE/layout/communeodd-layout.html.twig";
        }
        // line 7
        yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 9
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("dashboard.title", [], "messages");
        yield " - ";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["departement"] ?? null), "name", [], "any", false, false, false, 9), "html", null, true);
        yield from [];
    }

    // line 12
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 13
        yield "<div class=\"container-fluid\">
  <section>
    ";
        // line 15
        if (( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") &&  !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_INSTAD"))) {
            // line 16
            yield "    <div class=\"row\">
      <div class=\"col-xl-12 col-sm-12 col-12 mb-4\">
        ";
            // line 18
            if ((($tmp = ($context["fin"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 19
                yield "          <div class=\"alert alert-success\">
            Les communes ont jusqu'au ";
                // line 20
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(($context["fin"] ?? null), "d/m/Y"), "html", null, true);
                yield " pour envoyer les données de votre ministère.
          </div>
        ";
            } else {
                // line 23
                yield "          <div class=\"alert alert-danger\">
            Les communes ne peuvent plus envoyés leurs données. Pour toute modification, elles doivent contacter la DGCS-ODD.
          </div>     
        ";
            }
            // line 27
            yield "        </div>
      </div>
    </div>
    ";
        }
        // line 31
        yield "    <div class=\"row\">
      <div class=\"col-xl-4 col-sm-6 col-12 mb-4\">
        <div class=\"card\">
          <div class=\"card-body\">
            <div class=\"d-flex justify-content-between px-md-1\">
              <div class=\"align-self-center\">
                <i class=\"fas fa-pencil-alt text-info fa-3x\"></i>
              </div>
              <div class=\"text-end\">
                <h3>";
        // line 40
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["odds"] ?? null), "html", null, true);
        yield "</h3>
                <a href=\"";
        // line 41
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_goals");
        yield "\"><p class=\"mb-0\">ODD</p></a>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class=\"col-xl-4 col-sm-6 col-12 mb-4\">
        <div class=\"card\">
          <div class=\"card-body\">
            <div class=\"d-flex justify-content-between px-md-1\">
              <div class=\"align-self-center\">
                <i class=\"far fa-comment-alt text-warning fa-3x\"></i>
              </div>
              <div class=\"text-end\">
                <h3>";
        // line 55
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["cibles"] ?? null), "html", null, true);
        yield "</h3>
                <a href=\"";
        // line 56
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_targets");
        yield "\"><p class=\"mb-0\">Cibles</p></a>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class=\"col-xl-4 col-sm-6 col-12 mb-4\">
        <div class=\"card\">
          <div class=\"card-body\">
            <div class=\"d-flex justify-content-between px-md-1\">
              <div class=\"align-self-center\">
                <i class=\"fas fa-chart-line text-success fa-3x\"></i>
              </div>
              <div class=\"text-end\">
                <h3>";
        // line 70
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["indicateurs"] ?? null), "html", null, true);
        yield "</h3>
                <a href=\"";
        // line 71
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_indicators");
        yield "\"><p class=\"mb-0\">Indicateurs</p></a>
              </div>
            </div>
          </div>
        </div>
      </div>
      
    </div>

    <div class=\"row\">

      <div class=\"col-xl-4 col-sm-6 col-12 mb-4\">
        <div class=\"card\">
          <div class=\"card-body\">
            <div class=\"d-flex justify-content-between px-md-1\">
              <div class=\"align-self-center\">
                <i class=\"fas fa-map-marker-alt text-danger fa-3x\"></i>
              </div>
              <div class=\"text-end\">
                <h3>";
        // line 90
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["indicateurscommunaux"] ?? null), "html", null, true);
        yield "</h3>
                <a href=\"";
        // line 91
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_indicators_renseignables");
        yield "\"><p class=\"mb-0\">Indicateurs communaux</p></a>
              </div>
            </div>
          </div>
        </div>
      </div>

      
      <div class=\"col-xl-4 col-12 mb-4\">
        <div class=\"card\">
          <div class=\"card-body\">
            <div class=\"d-flex justify-content-between px-md-1\">
              <div class=\"text-end\">
                <h3>";
        // line 104
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["communes"] ?? null)), "html", null, true);
        yield "</h3>
                <p class=\"mb-0\">Communes </p>
              </div>
              <div class=\"align-self-center\">
                <i class=\"fas fa-rocket text-danger fa-3x\"></i>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class=\"col-xl-4 col-12 mb-4\">
        <div class=\"card\">
          <div class=\"card-body\">
            <div class=\"d-flex justify-content-between px-md-1\">
              <div class=\"text-end\">
                <h3>";
        // line 120
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["all"] ?? null), "html", null, true);
        yield " communes</h3>
                <p class=\"mb-0\">ont rempli tous les indicateurs</p>
              </div>
              <div class=\"align-self-center\">
                <i class=\"far fa-life-ring text-info fa-3x\"></i>
              </div>
            </div>
          </div>
        </div>
      </div>
    
    </div>

<div class=\"row\">
        <div class=\"col-sm-12\">
            <div class=\"text-right\">
                  <a href=\"";
        // line 136
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("all_data_communes", ["id" => CoreExtension::getAttribute($this->env, $this->source, ($context["departement"] ?? null), "id", [], "any", false, false, false, 136)]), "html", null, true);
        yield "\" class=\"mb-2 mr-2 btn-shadow  btn btn-info text-right\">
                      <i class=\"fa fa-plus\"></i> Télécharger toutes les données du département
                  </a>
            </div>
        </div>
    </div>

";
        // line 143
        yield from $this->load("communes/ddd_dashboard.html.twig", 143, 400319274)->unwrap()->yield($context);
        // line 196
        yield "  </section>
</div>
";
        yield from [];
    }

    // line 200
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 201
        yield "    <script>
        \$(function () {
            \$(\"#ministereTable\").DataTable({
                \"pageLength\": 10
            });
        });
    </script>

    <script>
        \$(function () {
            \$(\"#ptaTable\").DataTable({
                \"pageLength\": 10
            });
        });
    </script>

    <script>
        \$(function () {
            \$(\"#communeTable\").DataTable({
                \"pageLength\": 10
            });
        });
    </script>

    <script src=\"";
        // line 225
        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 226
        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>
";
        yield from [];
    }

    // line 229
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 230
        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 "\">
    <link rel=\"stylesheet\" href=\"";
        // line 231
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/dashboard/css/mdb.min.css"), "html", null, true);
        yield "\">
    <link rel=\"stylesheet\" href=\"";
        // line 232
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/dashboard/css/style.css"), "html", null, true);
        yield "\">
";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  331 => 232,  327 => 231,  322 => 230,  315 => 229,  308 => 226,  304 => 225,  278 => 201,  271 => 200,  264 => 196,  262 => 143,  252 => 136,  233 => 120,  214 => 104,  198 => 91,  194 => 90,  172 => 71,  168 => 70,  151 => 56,  147 => 55,  130 => 41,  126 => 40,  115 => 31,  109 => 27,  103 => 23,  97 => 20,  94 => 19,  92 => 18,  88 => 16,  86 => 15,  82 => 13,  75 => 12,  62 => 9,  58 => 7,  55 => 4,  52 => 2,  50 => 1,  43 => 7,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "communes/ddd_dashboard.html.twig", "/var/www/html/templates/communes/ddd_dashboard.html.twig");
    }
}


/* communes/ddd_dashboard.html.twig */
class __TwigTemplate_679206610a0fa838f0a328cac07edf80___400319274 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 143
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 143);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 144
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 145
        yield "
    <h2 class=\"m-0 text-dark\" style=\"margin-top : 20px;\">
        Points du renseignement des communes du département
    </h2>

    <table id=\"communeTable\" class=\"table table-striped\">
                <thead>
                    <tr>
                            <th>Commune</th>
                            <th>Nombre</th>
                            <th>Renseignés</th>
                            <th>Reste</th>
                            <th>Etat</th>
                            <th>Avis</th>
                            <th>Observation</th>
                            <th>Actions</th>
                    </tr>
                </thead>

                ";
        // line 164
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["communes"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["commune"]) {
            // line 165
            yield "
                ";
            // line 166
            $context["structure"] = CoreExtension::getAttribute($this->env, $this->source, ($context["settingsManager"] ?? null), "getStructureYear", [CoreExtension::getAttribute($this->env, $this->source, ($context["year"] ?? null), "name", [], "any", false, false, false, 166), null, $context["commune"]], "method", false, false, false, 166);
            // line 167
            yield "                <tr>
                            <td>";
            // line 168
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["commune"], "name", [], "any", false, false, false, 168), "html", null, true);
            yield "</td>
                            <td>";
            // line 169
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["indicateurscommunaux"] ?? null), "html", null, true);
            yield "</td>
                            <td>";
            // line 170
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["settingsManager"] ?? null), "getRIndicateursByCommune", [($context["year"] ?? null), $context["commune"]], "method", false, false, false, 170), "html", null, true);
            yield "</td>
                            <td><strong>";
            // line 171
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, ($context["settingsManager"] ?? null), "getNoIndicateursByCommune", [($context["year"] ?? null), $context["commune"]], "method", false, false, false, 171)), "html", null, true);
            yield "</strong></td>
                            
                            ";
            // line 173
            if ((($context["structure"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["structure"] ?? null), "dpp2", [], "any", false, false, false, 173))) {
                // line 174
                yield "                                <td><span class=\"float-center badge\" style=\"color: white; background-color: green;\">Validé</span></td>
                            ";
            } else {
                // line 176
                yield "                                <td><span class=\"float-center badge\" style=\"color: white; background-color: red;\">Non Validé</span></td>
                            ";
            }
            // line 178
            yield "
                            <td>";
            // line 179
            yield (((($tmp = ($context["structure"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["structure"] ?? null), "avis", [], "any", false, false, false, 179), "html", null, true)) : (""));
            yield "</td>
                            <td>";
            // line 180
            yield (((($tmp = ($context["structure"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["structure"] ?? null), "observation", [], "any", false, false, false, 180), "html", null, true)) : (""));
            yield "</td>

                            <td>
                                <a  class=\"btn btn-sm btn-success\" href=\"";
            // line 183
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("annoter_commune", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["commune"], "id", [], "any", false, false, false, 183)]), "html", null, true);
            yield "\" style=\"color : #ffffff !important;\">Annoter</a>
                                ";
            // line 184
            if ((($context["structure"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["structure"] ?? null), "dpp2", [], "any", false, false, false, 184))) {
                // line 185
                yield "                                  <a  class=\"btn btn-sm btn-primary\" href=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("export_commune", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["commune"], "id", [], "any", false, false, false, 185)]), "html", null, true);
                yield "\">Télécharger</a>
                                ";
            }
            // line 187
            yield "                            </td>
                </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['commune'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 190
        yield "                </table>

                
        ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  502 => 190,  494 => 187,  488 => 185,  486 => 184,  482 => 183,  476 => 180,  472 => 179,  469 => 178,  465 => 176,  461 => 174,  459 => 173,  454 => 171,  450 => 170,  446 => 169,  442 => 168,  439 => 167,  437 => 166,  434 => 165,  430 => 164,  409 => 145,  402 => 144,  391 => 143,  331 => 232,  327 => 231,  322 => 230,  315 => 229,  308 => 226,  304 => 225,  278 => 201,  271 => 200,  264 => 196,  262 => 143,  252 => 136,  233 => 120,  214 => 104,  198 => 91,  194 => 90,  172 => 71,  168 => 70,  151 => 56,  147 => 55,  130 => 41,  126 => 40,  115 => 31,  109 => 27,  103 => 23,  97 => 20,  94 => 19,  92 => 18,  88 => 16,  86 => 15,  82 => 13,  75 => 12,  62 => 9,  58 => 7,  55 => 4,  52 => 2,  50 => 1,  43 => 7,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "communes/ddd_dashboard.html.twig", "/var/www/html/templates/communes/ddd_dashboard.html.twig");
    }
}
