var/cache/dev/twig/c9/c9bd339f773227974efcab913ce239c421eb011df4611632bccab965002e4011.php line 69

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* annuaire/_includes/liste-item-list.html.twig */
  14. class __TwigTemplate_9e30a3722ec5065307dcc73334aa370ddec3f009617232595307c708e613cd57 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""annuaire/_includes/liste-item-list.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""annuaire/_includes/liste-item-list.html.twig"));
  33.         // line 1
  34.         if ( !twig_test_empty((isset($context["etablissements"]) || array_key_exists("etablissements"$context) ? $context["etablissements"] : (function () { throw new RuntimeError('Variable "etablissements" does not exist.'1$this->source); })()))) {
  35.             // line 2
  36.             echo "    ";
  37.             $context['_parent'] = $context;
  38.             $context['_seq'] = twig_ensure_traversable((isset($context["etablissements"]) || array_key_exists("etablissements"$context) ? $context["etablissements"] : (function () { throw new RuntimeError('Variable "etablissements" does not exist.'2$this->source); })()));
  39.             $context['loop'] = [
  40.               'parent' => $context['_parent'],
  41.               'index0' => 0,
  42.               'index'  => 1,
  43.               'first'  => true,
  44.             ];
  45.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  46.                 $length count($context['_seq']);
  47.                 $context['loop']['revindex0'] = $length 1;
  48.                 $context['loop']['revindex'] = $length;
  49.                 $context['loop']['length'] = $length;
  50.                 $context['loop']['last'] = === $length;
  51.             }
  52.             foreach ($context['_seq'] as $context["_key"] => $context["etablissement"]) {
  53.                 // line 3
  54.                 echo "        ";
  55.                 $this->loadTemplate("annuaire/_includes/item-list.html.twig""annuaire/_includes/liste-item-list.html.twig"3)->display(twig_to_array(["etablissement" =>                 // line 4
  56. $context["etablissement"], "parametres" =>                 // line 5
  57. (isset($context["parametres"]) || array_key_exists("parametres"$context) ? $context["parametres"] : (function () { throw new RuntimeError('Variable "parametres" does not exist.'5$this->source); })()), "lieu" =>                 // line 6
  58. (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'6$this->source); })()), "loop" =>                 // line 7
  59. $context["loop"], "itemsInsertions" =>                 // line 8
  60. (isset($context["itemsInsertions"]) || array_key_exists("itemsInsertions"$context) ? $context["itemsInsertions"] : (function () { throw new RuntimeError('Variable "itemsInsertions" does not exist.'8$this->source); })())]));
  61.                 // line 10
  62.                 echo "        ";
  63.                 if (((((-=== twig_compare(twig_get_attribute($this->env$this->source$context["loop"], "length", [], "any"falsefalsefalse10), 3)) && (=== twig_compare(twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse10), twig_get_attribute($this->env$this->source$context["loop"], "length", [], "any"falsefalsefalse10)))) || ((=== twig_compare(twig_get_attribute($this->env$this->source,                 // line 11
  64. $context["loop"], "length", [], "any"falsefalsefalse11), 3)) && (=== twig_compare(twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse11), 3)))) || (=== twig_compare((twig_get_attribute($this->env$this->source,                 // line 12
  65. $context["loop"], "index", [], "any"falsefalsefalse12) % 10), 0)))) {
  66.                     // line 13
  67.                     echo "            <div id=\"mobile-banner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
  68.             ";
  69.                     // line 14
  70.                     $this->loadTemplate("_includes/banners-list.html.twig""annuaire/_includes/liste-item-list.html.twig"14)->display(twig_to_array(["emplacement" => (($this->extensions['App\Twig\BanniereExtension']->onglet2emplacement(twig_get_attribute($this->env$this->source,                     // line 15
  71. (isset($context["quoi"]) || array_key_exists("quoi"$context) ? $context["quoi"] : (function () { throw new RuntimeError('Variable "quoi" does not exist.'15$this->source); })()), "libelle", [], "any"falsefalsefalse15))) ? ($this->extensions['App\Twig\BanniereExtension']->onglet2emplacement(twig_get_attribute($this->env$this->source, (isset($context["quoi"]) || array_key_exists("quoi"$context) ? $context["quoi"] : (function () { throw new RuntimeError('Variable "quoi" does not exist.'15$this->source); })()), "libelle", [], "any"falsefalsefalse15))) : ($this->extensions['App\Twig\BanniereExtension']->fromEtablissements((isset($context["etablissements"]) || array_key_exists("etablissements"$context) ? $context["etablissements"] : (function () { throw new RuntimeError('Variable "etablissements" does not exist.'15$this->source); })())))), "lieu" => twig_get_attribute($this->env$this->source,                     // line 16
  72. (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'16$this->source); })()), "slug", [], "any"falsefalsefalse16), "single" => 1]));
  73.                     // line 19
  74.                     echo "            </div>
  75.         ";
  76.                 }
  77.                 // line 21
  78.                 echo "    ";
  79.                 ++$context['loop']['index0'];
  80.                 ++$context['loop']['index'];
  81.                 $context['loop']['first'] = false;
  82.                 if (isset($context['loop']['length'])) {
  83.                     --$context['loop']['revindex0'];
  84.                     --$context['loop']['revindex'];
  85.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  86.                 }
  87.             }
  88.             $_parent $context['_parent'];
  89.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['etablissement'], $context['_parent'], $context['loop']);
  90.             $context array_intersect_key($context$_parent) + $_parent;
  91.             // line 22
  92.             echo "
  93.     ";
  94.             // line 24
  95.             echo "    <div id=\"mobile-megabanner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
  96.         <ul class=\"banners\">
  97.             <li class=\"long banniere-container\"
  98.                 data-type=\"";
  99.             // line 27
  100.             echo twig_escape_filter($this->envtwig_constant("App\\Entity\\Banniere::MEGA_BANNIERE"), "html"nulltrue);
  101.             echo "\"
  102.                 data-emplacement=\"";
  103.             // line 28
  104.             echo twig_escape_filter($this->env, ((array_key_exists("emplacement"$context)) ? (_twig_default_filter((isset($context["emplacement"]) || array_key_exists("emplacement"$context) ? $context["emplacement"] : (function () { throw new RuntimeError('Variable "emplacement" does not exist.'28$this->source); })()), "")) : ("")), "html"nulltrue);
  105.             echo "\"
  106.                 data-lieu=\"\" data-single=\"0\"></li>
  107.         </ul>
  108.     </div>
  109.         ";
  110.             // line 33
  111.             echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["etablissements"]) || array_key_exists("etablissements"$context) ? $context["etablissements"] : (function () { throw new RuntimeError('Variable "etablissements" does not exist.'33$this->source); })()), "partial/pagination.html.twig");
  112.             echo "
  113.     ";
  114.             // line 36
  115.             echo "    ";
  116.             $this->loadTemplate("annuaire/_includes/autres-etablissements.html.twig""annuaire/_includes/liste-item-list.html.twig"36)->display($context);
  117.             // line 37
  118.             echo "
  119.         ";
  120.             // line 38
  121.             $this->loadTemplate("annuaire/_includes/faq.html.twig""annuaire/_includes/liste-item-list.html.twig"38)->display(twig_to_array(["faqs" => (isset($context["faqs"]) || array_key_exists("faqs"$context) ? $context["faqs"] : (function () { throw new RuntimeError('Variable "faqs" does not exist.'38$this->source); })()), "pageOne" => (isset($context["pageOne"]) || array_key_exists("pageOne"$context) ? $context["pageOne"] : (function () { throw new RuntimeError('Variable "pageOne" does not exist.'38$this->source); })())]));
  122.             // line 39
  123.             echo "
  124.         ";
  125.             // line 41
  126.             echo "        ";
  127.             // line 44
  128.             echo "
  129.         
  130.         ";
  131.             // line 46
  132.             if ((isset($context["pageOne"]) || array_key_exists("pageOne"$context) ? $context["pageOne"] : (function () { throw new RuntimeError('Variable "pageOne" does not exist.'46$this->source); })())) {
  133.                 // line 47
  134.                 echo "            ";
  135.                 if (((isset($context["seoTextePart1"]) || array_key_exists("seoTextePart1"$context) ? $context["seoTextePart1"] : (function () { throw new RuntimeError('Variable "seoTextePart1" does not exist.'47$this->source); })()) && (=== twig_compare(twig_length_filter($this->envtwig_striptags((isset($context["seoTextePart1"]) || array_key_exists("seoTextePart1"$context) ? $context["seoTextePart1"] : (function () { throw new RuntimeError('Variable "seoTextePart1" does not exist.'47$this->source); })()))), 0)))) {
  136.                     // line 48
  137.                     echo "                <h2>";
  138.                     echo twig_replace_filter((isset($context["seoTitre"]) || array_key_exists("seoTitre"$context) ? $context["seoTitre"] : (function () { throw new RuntimeError('Variable "seoTitre" does not exist.'48$this->source); })()), ["[region]" => twig_get_attribute($this->env$this->source, (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'48$this->source); })()), "libelle", [], "any"falsefalsefalse48), "[dept]" => $this->extensions['App\Twig\LieuExtension']->lieuLibelle((isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'48$this->source); })())), "[ville]" => $this->extensions['App\Twig\LieuExtension']->lieuLibelle((isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'48$this->source); })()))]);
  139.                     echo 
  140.                 ";
  141.                     // line 49
  142.                     if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["lieu"] ?? null), "departement", [], "any"falsetruefalse49), "libelle", [], "any"truetruefalse49)) {
  143.                         // line 50
  144.                         echo "                    - ";
  145.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'50$this->source); })()), "departement", [], "any"falsefalsefalse50), "libelle", [], "any"falsefalsefalse50), "html"nulltrue);
  146.                         echo "
  147.                 ";
  148.                     }
  149.                     // line 52
  150.                     echo "                </h2>
  151.                 
  152.                 <div id=\"about-part1\">
  153.                     <div id=\"back-to-top\">⇡</div>
  154.                     ";
  155.                     // line 56
  156.                     echo (isset($context["seoTextePart1"]) || array_key_exists("seoTextePart1"$context) ? $context["seoTextePart1"] : (function () { throw new RuntimeError('Variable "seoTextePart1" does not exist.'56$this->source); })());
  157.                     echo " ";
  158.                     // line 57
  159.                     echo "                    ";
  160.                     echo (isset($context["seoTextePart2"]) || array_key_exists("seoTextePart2"$context) ? $context["seoTextePart2"] : (function () { throw new RuntimeError('Variable "seoTextePart2" does not exist.'57$this->source); })());
  161.                     echo " ";
  162.                     // line 58
  163.                     echo "                </div>
  164.             ";
  165.                 } else {
  166.                     // line 60
  167.                     echo "                <!-- #DEBUG#";
  168.                     echo twig_escape_filter($this->env, (("annuaire/text-desc/" . (isset($context["typeOnglet"]) || array_key_exists("typeOnglet"$context) ? $context["typeOnglet"] : (function () { throw new RuntimeError('Variable "typeOnglet" does not exist.'60$this->source); })())) . ".html.twig"), "html"nulltrue);
  169.                     echo "# -->
  170.                 ";
  171.                     // line 61
  172.                     $this->loadTemplate([=> (("annuaire/text-desc/" .                     // line 62
  173. (isset($context["typeOnglet"]) || array_key_exists("typeOnglet"$context) ? $context["typeOnglet"] : (function () { throw new RuntimeError('Variable "typeOnglet" does not exist.'62$this->source); })())) . ".html.twig"), => "annuaire/text-desc/default.html.twig"], "annuaire/_includes/liste-item-list.html.twig"61)->display(twig_array_merge($context, ["lieu" => $this->extensions['App\Twig\LieuExtension']->lieuLibelle(                    // line 65
  174. (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'65$this->source); })()))]));
  175.                     // line 67
  176.                     echo "
  177.                 ";
  178.                     // line 68
  179.                     if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_REDACTEUR"))) {
  180.                         // line 69
  181.                         echo "                <div class=\"alert alert-dark\">
  182.                 &#x21;&#x21; TEXTE SEO PAR DEFAUT - TEMPLATE : annuaire/text-desc/";
  183.                         // line 70
  184.                         echo twig_escape_filter($this->env, (isset($context["typeOnglet"]) || array_key_exists("typeOnglet"$context) ? $context["typeOnglet"] : (function () { throw new RuntimeError('Variable "typeOnglet" does not exist.'70$this->source); })()), "html"nulltrue);
  185.                         echo ".html.twig
  186.                 
  187.                 <span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
  188.                 </div>
  189.                 ";
  190.                     }
  191.                     // line 75
  192.                     echo "            ";
  193.                 }
  194.                 // line 76
  195.                 echo "
  196.             ";
  197.                 // line 78
  198.                 echo "            ";
  199.                 if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_REDACTEUR"))) {
  200.                     // line 79
  201.                     echo "                ";
  202.                     // line 80
  203.                     echo "                ";
  204.                     if ((array_key_exists("seo_parag_id"$context) && (!== twig_compare((isset($context["seo_parag_id"]) || array_key_exists("seo_parag_id"$context) ? $context["seo_parag_id"] : (function () { throw new RuntimeError('Variable "seo_parag_id" does not exist.'80$this->source); })()), "")))) {
  205.                         echo 
  206.                 <div class=\"alert alert-dark\">
  207.                     <a href=\"";
  208.                         // line 82
  209.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_seo_texte_referencement_diplome_edit", ["id" => (isset($context["seo_parag_id"]) || array_key_exists("seo_parag_id"$context) ? $context["seo_parag_id"] : (function () { throw new RuntimeError('Variable "seo_parag_id" does not exist.'82$this->source); })())]), "html"nulltrue);
  210.                         echo "\" target=\"_blank\">Modifer/Définir le texte SEO</a>
  211.                     
  212.                     <span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
  213.                 </div>
  214.                 ";
  215.                     }
  216.                     // line 87
  217.                     echo "            ";
  218.                 }
  219.                 // line 88
  220.                 echo "        ";
  221.             }
  222.             // line 89
  223.             echo "
  224.         <script>
  225.             // fix - rendre toute la zone cliquable, sauf le bouton \"Contacter l'établissement\" car il pointe vers le formulaire de contact en smoothscroll
  226.             document.addEventListener('DOMContentLoaded', function() {
  227.                 document.querySelectorAll('article.item-fiche-etablissement').forEach(function(article) {
  228.                     article.addEventListener('click', function(event) {
  229.                         // Clic sur une fiche établissement depuis la page de liste
  230.                         dataLayer.push({ ecommerce: null });
  231.                         dataLayer.push({
  232.                         event: \"select_item\",
  233.                         ecommerce: {
  234.                             item_list_id: ";
  235.             // line 101
  236.             echo json_encode(twig_replace_filter(twig_lower_filter($this->env, ((((("annuaire_" . ((array_key_exists("typeOnglet"$context)) ? (_twig_default_filter((isset($context["typeOnglet"]) || array_key_exists("typeOnglet"$context) ? $context["typeOnglet"] : (function () { throw new RuntimeError('Variable "typeOnglet" does not exist.'101$this->source); })()), "")) : (""))) . "_") . ((array_key_exists("niveauOnglet"$context)) ? (_twig_default_filter((isset($context["niveauOnglet"]) || array_key_exists("niveauOnglet"$context) ? $context["niveauOnglet"] : (function () { throw new RuntimeError('Variable "niveauOnglet" does not exist.'101$this->source); })()), "")) : (""))) . "_") . (((!== twig_compare((isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'101$this->source); })()), "DEFAULT"))) ? (twig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'101$this->source); })()), "id", [], "any"falsefalsefalse101), ["-" => "_"])) : ("tous")))), ["-" => "_"]));
  237.             echo ",
  238.                             item_list_name: ";
  239.             // line 102
  240.             echo json_encode(((((("Annuaire - " . ((array_key_exists("typeOnglet"$context)) ? (_twig_default_filter((isset($context["typeOnglet"]) || array_key_exists("typeOnglet"$context) ? $context["typeOnglet"] : (function () { throw new RuntimeError('Variable "typeOnglet" does not exist.'102$this->source); })()), "")) : (""))) . " - ") . ((array_key_exists("niveauOnglet"$context)) ? (_twig_default_filter((isset($context["niveauOnglet"]) || array_key_exists("niveauOnglet"$context) ? $context["niveauOnglet"] : (function () { throw new RuntimeError('Variable "niveauOnglet" does not exist.'102$this->source); })()), "")) : (""))) . " - ") . (((!== twig_compare((isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'102$this->source); })()), "DEFAULT"))) ? (twig_get_attribute($this->env$this->source, (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'102$this->source); })()), "libelle", [], "any"falsefalsefalse102)) : ("tous"))), twig_constant("JSON_UNESCAPED_UNICODE"));
  241.             echo ",
  242.                             items: [
  243.                             {
  244.                                 item_id: article.getAttribute('data-etablissement-id'),
  245.                                 item_name: article.getAttribute('data-etablissement-denomination'),
  246.                                 item_category: \"etablissement\",
  247.                                 item_category2: article.getAttribute('data-etablissement-type'),
  248.                                 item_category3: null,
  249.                                 item_category4: article.getAttribute('data-etablissement-sous-contrat'),
  250.                                 location_id: article.getAttribute('data-etablissement-location-id'),
  251.                                 etablissement_segment: \"client\",
  252.                                 index: article.getAttribute('data-index')
  253.                             }
  254.                             ]
  255.                         }
  256.                         });
  257.                         // Prevent triggering the click if the user clicks on a link, button, or li.item-fiche-contact inside the article
  258.                         if (!event.target.closest('a, button, li.item-fiche-contact')) {
  259.                             const link = article.querySelector('a.url-fiche');
  260.                             if (link) {
  261.                                 link.click();
  262.                             }
  263.                         }
  264.                     });
  265.                 });
  266.             });
  267.         </script>
  268. ";
  269.         } else {
  270.             // line 132
  271.             echo "    <hr>
  272.     <p style=\"text-align: center;\">
  273.         Nous n'avons pas trouvé d'établissement correspondant à votre recherche.
  274.     </p>
  275. ";
  276.         }
  277.         
  278.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  279.         
  280.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  281.     }
  282.     public function getTemplateName()
  283.     {
  284.         return "annuaire/_includes/liste-item-list.html.twig";
  285.     }
  286.     public function isTraitable()
  287.     {
  288.         return false;
  289.     }
  290.     public function getDebugInfo()
  291.     {
  292.         return array (  285 => 132,  252 => 102,  248 => 101,  234 => 89,  231 => 88,  228 => 87,  220 => 82,  214 => 80,  212 => 79,  209 => 78,  206 => 76,  203 => 75,  195 => 70,  192 => 69,  190 => 68,  187 => 67,  185 => 65,  184 => 62,  183 => 61,  178 => 60,  174 => 58,  170 => 57,  167 => 56,  161 => 52,  155 => 50,  153 => 49,  148 => 48,  145 => 47,  143 => 46,  139 => 44,  137 => 41,  134 => 39,  132 => 38,  129 => 37,  126 => 36,  121 => 33,  113 => 28,  109 => 27,  104 => 24,  101 => 22,  87 => 21,  83 => 19,  81 => 16,  80 => 15,  79 => 14,  76 => 13,  74 => 12,  73 => 11,  71 => 10,  69 => 8,  68 => 7,  67 => 6,  66 => 5,  65 => 4,  63 => 3,  45 => 2,  43 => 1,);
  293.     }
  294.     public function getSourceContext()
  295.     {
  296.         return new Source("{% if etablissements is not empty %}
  297.     {% for etablissement in etablissements %}
  298.         {% include 'annuaire/_includes/item-list.html.twig' with {
  299.             'etablissement': etablissement,
  300.             'parametres': parametres,
  301.             'lieu': lieu,
  302.             'loop': loop,
  303.             'itemsInsertions' : itemsInsertions,
  304.         } only %}
  305.         {% if (loop.length < 3 and loop.index > loop.length) or 
  306.                 (loop.length > 3 and loop.index == 3) or 
  307.                 loop.index % 10 == 0 %}
  308.             <div id=\"mobile-banner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
  309.             {% include '_includes/banners-list.html.twig' with {
  310.                 'emplacement': onglet2banniereEmplacement(quoi.libelle) ?: etablissements2banniereEmplacement(etablissements),
  311.                 'lieu': lieu.slug,
  312.                 'single': 1,
  313.             } only %}
  314.             </div>
  315.         {% endif %}
  316.     {% endfor %}
  317.     {# mega bannière mobile en bas de la liste #}
  318.     <div id=\"mobile-megabanner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
  319.         <ul class=\"banners\">
  320.             <li class=\"long banniere-container\"
  321.                 data-type=\"{{ constant('App\\\\Entity\\\\Banniere::MEGA_BANNIERE') }}\"
  322.                 data-emplacement=\"{{ emplacement | default('') }}\"
  323.                 data-lieu=\"\" data-single=\"0\"></li>
  324.         </ul>
  325.     </div>
  326.         {{ knp_pagination_render(etablissements, 'partial/pagination.html.twig') }}
  327.     {# SEO - maillage - Liste niveau d’enseignement Vs Liste tous niveaux #}
  328.     {% include \"annuaire/_includes/autres-etablissements.html.twig\" %}
  329.         {% include 'annuaire/_includes/faq.html.twig' with {'faqs': faqs, 'pageOne': pageOne} only %}
  330.         {# SEO - Aide au choix Diplômes - dernière étape sans choix #}
  331.         {#% if currentRoute in ['annuaire_liste_par_onglet', 'annuaire_liste_par_onglet_sup'] and typeOnglet in ['lycee', 'professionnel', 'superieur'] %}
  332.             <div class=\"mt-4\">{% include \"annuaire/_includes/aide-au-choix-diplomes_\"~typeOnglet~\".html.twig\" with {'position': 'footer'} %}</div>
  333.         {% endif %#}
  334.         
  335.         {% if pageOne %}
  336.             {% if seoTextePart1 and seoTextePart1 | striptags | length > 0 %}
  337.                 <h2>{{ seoTitre | replace({'[region]': lieu.libelle, '[dept]': lieu | lieuLibelle, '[ville]': lieu | lieuLibelle }) | raw }} 
  338.                 {% if lieu.departement.libelle is defined %}
  339.                     - {{ lieu.departement.libelle }}
  340.                 {% endif %}
  341.                 </h2>
  342.                 
  343.                 <div id=\"about-part1\">
  344.                     <div id=\"back-to-top\">⇡</div>
  345.                     {{ seoTextePart1 | raw }} {# 1ère partie du texte SEO #}
  346.                     {{ seoTextePart2 | raw }} {# 2ème partie du texte SEO #}
  347.                 </div>
  348.             {% else %}
  349.                 <!-- #DEBUG#{{'annuaire/text-desc/' ~ typeOnglet ~ '.html.twig'}}# -->
  350.                 {% include  [
  351.                     ('annuaire/text-desc/' ~ typeOnglet ~ '.html.twig'),
  352.                     'annuaire/text-desc/default.html.twig'
  353.                     ]
  354.                     with {'lieu' : lieu | lieuLibelle } 
  355.                 %}
  356.                 {% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_REDACTEUR')) %}
  357.                 <div class=\"alert alert-dark\">
  358.                 &#x21;&#x21; TEXTE SEO PAR DEFAUT - TEMPLATE : annuaire/text-desc/{{typeOnglet}}.html.twig
  359.                 
  360.                 <span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
  361.                 </div>
  362.                 {% endif %}
  363.             {% endif %}
  364.             {# Console ADMIN #}
  365.             {% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_REDACTEUR')) %}
  366.                 {# pour éviter d'avoir des bugs por l'internaute  #}
  367.                 {% if seo_parag_id is defined and seo_parag_id != \"\" %} 
  368.                 <div class=\"alert alert-dark\">
  369.                     <a href=\"{{ path('admin_seo_texte_referencement_diplome_edit', {'id': seo_parag_id}) }}\" target=\"_blank\">Modifer/Définir le texte SEO</a>
  370.                     
  371.                     <span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
  372.                 </div>
  373.                 {% endif %}
  374.             {% endif %}
  375.         {% endif %}
  376.         <script>
  377.             // fix - rendre toute la zone cliquable, sauf le bouton \"Contacter l'établissement\" car il pointe vers le formulaire de contact en smoothscroll
  378.             document.addEventListener('DOMContentLoaded', function() {
  379.                 document.querySelectorAll('article.item-fiche-etablissement').forEach(function(article) {
  380.                     article.addEventListener('click', function(event) {
  381.                         // Clic sur une fiche établissement depuis la page de liste
  382.                         dataLayer.push({ ecommerce: null });
  383.                         dataLayer.push({
  384.                         event: \"select_item\",
  385.                         ecommerce: {
  386.                             item_list_id: {{ ('annuaire_' ~ (typeOnglet | default('')) ~ '_' ~ (niveauOnglet | default('')) ~ '_' ~ (lieu != 'DEFAULT' ? lieu.id | replace({'-': '_'}) : 'tous')) | lower | replace({'-': '_'}) | json_encode | raw }},
  387.                             item_list_name: {{ ('Annuaire - ' ~ (typeOnglet | default('')) ~ ' - ' ~ (niveauOnglet | default('')) ~ ' - ' ~ (lieu != 'DEFAULT' ? lieu.libelle : 'tous')) | json_encode(constant('JSON_UNESCAPED_UNICODE')) | raw }},
  388.                             items: [
  389.                             {
  390.                                 item_id: article.getAttribute('data-etablissement-id'),
  391.                                 item_name: article.getAttribute('data-etablissement-denomination'),
  392.                                 item_category: \"etablissement\",
  393.                                 item_category2: article.getAttribute('data-etablissement-type'),
  394.                                 item_category3: null,
  395.                                 item_category4: article.getAttribute('data-etablissement-sous-contrat'),
  396.                                 location_id: article.getAttribute('data-etablissement-location-id'),
  397.                                 etablissement_segment: \"client\",
  398.                                 index: article.getAttribute('data-index')
  399.                             }
  400.                             ]
  401.                         }
  402.                         });
  403.                         // Prevent triggering the click if the user clicks on a link, button, or li.item-fiche-contact inside the article
  404.                         if (!event.target.closest('a, button, li.item-fiche-contact')) {
  405.                             const link = article.querySelector('a.url-fiche');
  406.                             if (link) {
  407.                                 link.click();
  408.                             }
  409.                         }
  410.                     });
  411.                 });
  412.             });
  413.         </script>
  414. {% else %}
  415.     <hr>
  416.     <p style=\"text-align: center;\">
  417.         Nous n'avons pas trouvé d'établissement correspondant à votre recherche.
  418.     </p>
  419. {% endif %}
  420. ""annuaire/_includes/liste-item-list.html.twig""/app/templates/annuaire/_includes/liste-item-list.html.twig");
  421.     }
  422. }