<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* annuaire/_includes/liste-item-list.html.twig */
class __TwigTemplate_9e30a3722ec5065307dcc73334aa370ddec3f009617232595307c708e613cd57 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "annuaire/_includes/liste-item-list.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "annuaire/_includes/liste-item-list.html.twig"));
// line 1
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); })()))) {
// line 2
echo " ";
$context['_parent'] = $context;
$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); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["etablissement"]) {
// line 3
echo " ";
$this->loadTemplate("annuaire/_includes/item-list.html.twig", "annuaire/_includes/liste-item-list.html.twig", 3)->display(twig_to_array(["etablissement" => // line 4
$context["etablissement"], "parametres" => // line 5
(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
(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
$context["loop"], "itemsInsertions" => // line 8
(isset($context["itemsInsertions"]) || array_key_exists("itemsInsertions", $context) ? $context["itemsInsertions"] : (function () { throw new RuntimeError('Variable "itemsInsertions" does not exist.', 8, $this->source); })())]));
// line 10
echo " ";
if (((((-1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["loop"], "length", [], "any", false, false, false, 10), 3)) && (1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 10), twig_get_attribute($this->env, $this->source, $context["loop"], "length", [], "any", false, false, false, 10)))) || ((1 === twig_compare(twig_get_attribute($this->env, $this->source, // line 11
$context["loop"], "length", [], "any", false, false, false, 11), 3)) && (0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 11), 3)))) || (0 === twig_compare((twig_get_attribute($this->env, $this->source, // line 12
$context["loop"], "index", [], "any", false, false, false, 12) % 10), 0)))) {
// line 13
echo " <div id=\"mobile-banner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
";
// line 14
$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
(isset($context["quoi"]) || array_key_exists("quoi", $context) ? $context["quoi"] : (function () { throw new RuntimeError('Variable "quoi" does not exist.', 15, $this->source); })()), "libelle", [], "any", false, false, false, 15))) ? ($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", false, false, false, 15))) : ($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
(isset($context["lieu"]) || array_key_exists("lieu", $context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.', 16, $this->source); })()), "slug", [], "any", false, false, false, 16), "single" => 1]));
// line 19
echo " </div>
";
}
// line 21
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['etablissement'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
echo "
";
// line 24
echo " <div id=\"mobile-megabanner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
<ul class=\"banners\">
<li class=\"long banniere-container\"
data-type=\"";
// line 27
echo twig_escape_filter($this->env, twig_constant("App\\Entity\\Banniere::MEGA_BANNIERE"), "html", null, true);
echo "\"
data-emplacement=\"";
// line 28
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", null, true);
echo "\"
data-lieu=\"\" data-single=\"0\"></li>
</ul>
</div>
";
// line 33
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");
echo "
";
// line 36
echo " ";
$this->loadTemplate("annuaire/_includes/autres-etablissements.html.twig", "annuaire/_includes/liste-item-list.html.twig", 36)->display($context);
// line 37
echo "
";
// line 38
$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); })())]));
// line 39
echo "
";
// line 41
echo " ";
// line 44
echo "
";
// line 46
if ((isset($context["pageOne"]) || array_key_exists("pageOne", $context) ? $context["pageOne"] : (function () { throw new RuntimeError('Variable "pageOne" does not exist.', 46, $this->source); })())) {
// line 47
echo " ";
if (((isset($context["seoTextePart1"]) || array_key_exists("seoTextePart1", $context) ? $context["seoTextePart1"] : (function () { throw new RuntimeError('Variable "seoTextePart1" does not exist.', 47, $this->source); })()) && (1 === twig_compare(twig_length_filter($this->env, twig_striptags((isset($context["seoTextePart1"]) || array_key_exists("seoTextePart1", $context) ? $context["seoTextePart1"] : (function () { throw new RuntimeError('Variable "seoTextePart1" does not exist.', 47, $this->source); })()))), 0)))) {
// line 48
echo " <h2>";
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", false, false, false, 48), "[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); })()))]);
echo "
";
// line 49
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["lieu"] ?? null), "departement", [], "any", false, true, false, 49), "libelle", [], "any", true, true, false, 49)) {
// line 50
echo " - ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 50, $this->source); })()), "departement", [], "any", false, false, false, 50), "libelle", [], "any", false, false, false, 50), "html", null, true);
echo "
";
}
// line 52
echo " </h2>
<div id=\"about-part1\">
<div id=\"back-to-top\">⇡</div>
";
// line 56
echo (isset($context["seoTextePart1"]) || array_key_exists("seoTextePart1", $context) ? $context["seoTextePart1"] : (function () { throw new RuntimeError('Variable "seoTextePart1" does not exist.', 56, $this->source); })());
echo " ";
// line 57
echo " ";
echo (isset($context["seoTextePart2"]) || array_key_exists("seoTextePart2", $context) ? $context["seoTextePart2"] : (function () { throw new RuntimeError('Variable "seoTextePart2" does not exist.', 57, $this->source); })());
echo " ";
// line 58
echo " </div>
";
} else {
// line 60
echo " <!-- #DEBUG#";
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", null, true);
echo "# -->
";
// line 61
$this->loadTemplate([0 => (("annuaire/text-desc/" . // line 62
(isset($context["typeOnglet"]) || array_key_exists("typeOnglet", $context) ? $context["typeOnglet"] : (function () { throw new RuntimeError('Variable "typeOnglet" does not exist.', 62, $this->source); })())) . ".html.twig"), 1 => "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
(isset($context["lieu"]) || array_key_exists("lieu", $context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.', 65, $this->source); })()))]));
// line 67
echo "
";
// line 68
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_REDACTEUR"))) {
// line 69
echo " <div class=\"alert alert-dark\">
!! TEXTE SEO PAR DEFAUT - TEMPLATE : annuaire/text-desc/";
// line 70
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", null, true);
echo ".html.twig
<span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
</div>
";
}
// line 75
echo " ";
}
// line 76
echo "
";
// line 78
echo " ";
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_REDACTEUR"))) {
// line 79
echo " ";
// line 80
echo " ";
if ((array_key_exists("seo_parag_id", $context) && (0 !== 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); })()), "")))) {
echo "
<div class=\"alert alert-dark\">
<a href=\"";
// line 82
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", null, true);
echo "\" target=\"_blank\">Modifer/Définir le texte SEO</a>
<span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
</div>
";
}
// line 87
echo " ";
}
// line 88
echo " ";
}
// line 89
echo "
<script>
// fix - rendre toute la zone cliquable, sauf le bouton \"Contacter l'établissement\" car il pointe vers le formulaire de contact en smoothscroll
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('article.item-fiche-etablissement').forEach(function(article) {
article.addEventListener('click', function(event) {
// Clic sur une fiche établissement depuis la page de liste
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: \"select_item\",
ecommerce: {
item_list_id: ";
// line 101
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); })()), "")) : (""))) . "_") . (((0 !== 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", false, false, false, 101), ["-" => "_"])) : ("tous")))), ["-" => "_"]));
echo ",
item_list_name: ";
// line 102
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); })()), "")) : (""))) . " - ") . (((0 !== 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", false, false, false, 102)) : ("tous"))), twig_constant("JSON_UNESCAPED_UNICODE"));
echo ",
items: [
{
item_id: article.getAttribute('data-etablissement-id'),
item_name: article.getAttribute('data-etablissement-denomination'),
item_category: \"etablissement\",
item_category2: article.getAttribute('data-etablissement-type'),
item_category3: null,
item_category4: article.getAttribute('data-etablissement-sous-contrat'),
location_id: article.getAttribute('data-etablissement-location-id'),
etablissement_segment: \"client\",
index: article.getAttribute('data-index')
}
]
}
});
// Prevent triggering the click if the user clicks on a link, button, or li.item-fiche-contact inside the article
if (!event.target.closest('a, button, li.item-fiche-contact')) {
const link = article.querySelector('a.url-fiche');
if (link) {
link.click();
}
}
});
});
});
</script>
";
} else {
// line 132
echo " <hr>
<p style=\"text-align: center;\">
Nous n'avons pas trouvé d'établissement correspondant à votre recherche.
</p>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "annuaire/_includes/liste-item-list.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% if etablissements is not empty %}
{% for etablissement in etablissements %}
{% include 'annuaire/_includes/item-list.html.twig' with {
'etablissement': etablissement,
'parametres': parametres,
'lieu': lieu,
'loop': loop,
'itemsInsertions' : itemsInsertions,
} only %}
{% if (loop.length < 3 and loop.index > loop.length) or
(loop.length > 3 and loop.index == 3) or
loop.index % 10 == 0 %}
<div id=\"mobile-banner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
{% include '_includes/banners-list.html.twig' with {
'emplacement': onglet2banniereEmplacement(quoi.libelle) ?: etablissements2banniereEmplacement(etablissements),
'lieu': lieu.slug,
'single': 1,
} only %}
</div>
{% endif %}
{% endfor %}
{# mega bannière mobile en bas de la liste #}
<div id=\"mobile-megabanner-2023\" class=\"banniere d-flex justify-content-center pt-3 pb-3\">
<ul class=\"banners\">
<li class=\"long banniere-container\"
data-type=\"{{ constant('App\\\\Entity\\\\Banniere::MEGA_BANNIERE') }}\"
data-emplacement=\"{{ emplacement | default('') }}\"
data-lieu=\"\" data-single=\"0\"></li>
</ul>
</div>
{{ knp_pagination_render(etablissements, 'partial/pagination.html.twig') }}
{# SEO - maillage - Liste niveau d’enseignement Vs Liste tous niveaux #}
{% include \"annuaire/_includes/autres-etablissements.html.twig\" %}
{% include 'annuaire/_includes/faq.html.twig' with {'faqs': faqs, 'pageOne': pageOne} only %}
{# SEO - Aide au choix Diplômes - dernière étape sans choix #}
{#% if currentRoute in ['annuaire_liste_par_onglet', 'annuaire_liste_par_onglet_sup'] and typeOnglet in ['lycee', 'professionnel', 'superieur'] %}
<div class=\"mt-4\">{% include \"annuaire/_includes/aide-au-choix-diplomes_\"~typeOnglet~\".html.twig\" with {'position': 'footer'} %}</div>
{% endif %#}
{% if pageOne %}
{% if seoTextePart1 and seoTextePart1 | striptags | length > 0 %}
<h2>{{ seoTitre | replace({'[region]': lieu.libelle, '[dept]': lieu | lieuLibelle, '[ville]': lieu | lieuLibelle }) | raw }}
{% if lieu.departement.libelle is defined %}
- {{ lieu.departement.libelle }}
{% endif %}
</h2>
<div id=\"about-part1\">
<div id=\"back-to-top\">⇡</div>
{{ seoTextePart1 | raw }} {# 1ère partie du texte SEO #}
{{ seoTextePart2 | raw }} {# 2ème partie du texte SEO #}
</div>
{% else %}
<!-- #DEBUG#{{'annuaire/text-desc/' ~ typeOnglet ~ '.html.twig'}}# -->
{% include [
('annuaire/text-desc/' ~ typeOnglet ~ '.html.twig'),
'annuaire/text-desc/default.html.twig'
]
with {'lieu' : lieu | lieuLibelle }
%}
{% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_REDACTEUR')) %}
<div class=\"alert alert-dark\">
!! TEXTE SEO PAR DEFAUT - TEMPLATE : annuaire/text-desc/{{typeOnglet}}.html.twig
<span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
</div>
{% endif %}
{% endif %}
{# Console ADMIN #}
{% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_REDACTEUR')) %}
{# pour éviter d'avoir des bugs por l'internaute #}
{% if seo_parag_id is defined and seo_parag_id != \"\" %}
<div class=\"alert alert-dark\">
<a href=\"{{ path('admin_seo_texte_referencement_diplome_edit', {'id': seo_parag_id}) }}\" target=\"_blank\">Modifer/Définir le texte SEO</a>
<span class=\"badge badge-pill badge-danger float-right\">Console Admin</span>
</div>
{% endif %}
{% endif %}
{% endif %}
<script>
// fix - rendre toute la zone cliquable, sauf le bouton \"Contacter l'établissement\" car il pointe vers le formulaire de contact en smoothscroll
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('article.item-fiche-etablissement').forEach(function(article) {
article.addEventListener('click', function(event) {
// Clic sur une fiche établissement depuis la page de liste
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: \"select_item\",
ecommerce: {
item_list_id: {{ ('annuaire_' ~ (typeOnglet | default('')) ~ '_' ~ (niveauOnglet | default('')) ~ '_' ~ (lieu != 'DEFAULT' ? lieu.id | replace({'-': '_'}) : 'tous')) | lower | replace({'-': '_'}) | json_encode | raw }},
item_list_name: {{ ('Annuaire - ' ~ (typeOnglet | default('')) ~ ' - ' ~ (niveauOnglet | default('')) ~ ' - ' ~ (lieu != 'DEFAULT' ? lieu.libelle : 'tous')) | json_encode(constant('JSON_UNESCAPED_UNICODE')) | raw }},
items: [
{
item_id: article.getAttribute('data-etablissement-id'),
item_name: article.getAttribute('data-etablissement-denomination'),
item_category: \"etablissement\",
item_category2: article.getAttribute('data-etablissement-type'),
item_category3: null,
item_category4: article.getAttribute('data-etablissement-sous-contrat'),
location_id: article.getAttribute('data-etablissement-location-id'),
etablissement_segment: \"client\",
index: article.getAttribute('data-index')
}
]
}
});
// Prevent triggering the click if the user clicks on a link, button, or li.item-fiche-contact inside the article
if (!event.target.closest('a, button, li.item-fiche-contact')) {
const link = article.querySelector('a.url-fiche');
if (link) {
link.click();
}
}
});
});
});
</script>
{% else %}
<hr>
<p style=\"text-align: center;\">
Nous n'avons pas trouvé d'établissement correspondant à votre recherche.
</p>
{% endif %}
", "annuaire/_includes/liste-item-list.html.twig", "/app/templates/annuaire/_includes/liste-item-list.html.twig");
}
}