<?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;
/* jpo/list.html.twig */
class __TwigTemplate_4c2cc5c5501589c2d15bbe5da35909be8153ab23f57bbb4943718163bc66a861 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'description' => [$this, 'block_description'],
'body' => [$this, 'block_body'],
'h1' => [$this, 'block_h1'],
'data_layer' => [$this, 'block_data_layer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
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", "jpo/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", "jpo/list.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "jpo/list.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 2
public function block_title($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(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$this->displayBlock("h1", $context, $blocks);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 4
public function block_description($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(), "block", "description"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "description"));
echo "Retrouvez sur le site enseignement-prive.info les journées portes ouvertes des établissements de l'enseignement privé.";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 6
public function block_body($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(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 7
echo "<section class=\"container page-jpo\">
<div id=\"breadcrumb\">
";
// line 9
$this->loadTemplate("jpo/_includes/breadcrumb.html.twig", "jpo/list.html.twig", 9)->display(twig_to_array(["lieu" => // line 10
(isset($context["lieu"]) || array_key_exists("lieu", $context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.', 10, $this->source); })())]));
// line 13
echo " </div>
<div class=\"title\">
<div class=\"jpo-h1-like\">Journées Portes Ouvertes</div>
<div class=\"triangle-defaut\"></div>
</div>
";
// line 18
if ( !(null === (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 18, $this->source); })()))) {
// line 19
echo " <div class=\"recherche-contexte text-left\" role=\"group\">
<a href=\"#\" onclick=\"history.back()\" class=\"liste \">
Retour à la fiche
</a>
</div>
";
}
// line 25
echo " <div class=\"wrap\">
<section>
<h1 class=\"jpo-h2-like\">";
// line 29
$this->displayBlock('h1', $context, $blocks);
// line 36
echo "</h1>
";
// line 38
if ((isset($context["seoTexte"]) || array_key_exists("seoTexte", $context) ? $context["seoTexte"] : (function () { throw new RuntimeError('Variable "seoTexte" does not exist.', 38, $this->source); })())) {
echo "<span id=\"jpo-intro\">";
echo (isset($context["seoTexte"]) || array_key_exists("seoTexte", $context) ? $context["seoTexte"] : (function () { throw new RuntimeError('Variable "seoTexte" does not exist.', 38, $this->source); })());
echo "</span><br/>";
}
// line 39
echo " ";
if ((null === (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 39, $this->source); })()))) {
// line 40
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\JPOController::blocJPOsALaUne", ["type" => "liste"]));
// line 43
echo "
";
}
// line 45
echo " <div class=\"w-100 d-md-block d-lg-none pb-4\">
";
// line 46
$this->loadTemplate("actualite-etablissement/_includes/search-options.html.twig", "jpo/list.html.twig", 46)->display(twig_array_merge($context, ["type" => "mobile"]));
// line 47
echo " </div>
<div class=\"jpo-list-tri\">
<div class=\"jpo-month\">
<ul>
";
// line 51
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 51, $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["jpo"]) {
// line 52
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 52)) {
// line 53
echo " ";
$context["previous_jpo"] = $context["jpo"];
// line 54
echo " ";
} else {
// line 55
echo " ";
$context["previous_jpo"] = twig_get_attribute($this->env, $this->source, (isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 55, $this->source); })()), (twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 55) - 1), [], "array", false, false, false, 55);
// line 56
echo " ";
}
// line 57
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 57)) {
// line 58
echo " ";
$context["next_jpo"] = $context["jpo"];
// line 59
echo " ";
} else {
// line 60
echo " ";
$context["next_jpo"] = twig_get_attribute($this->env, $this->source, (isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 60, $this->source); })()), (twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 60) + 1), [], "array", false, false, false, 60);
// line 61
echo " ";
}
// line 62
echo "
";
// line 63
if (((0 !== twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 63), "m"), twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["previous_jpo"]) || array_key_exists("previous_jpo", $context) ? $context["previous_jpo"] : (function () { throw new RuntimeError('Variable "previous_jpo" does not exist.', 63, $this->source); })()), "date", [], "any", false, false, false, 63), "m"))) || (0 === twig_compare((isset($context["previous_jpo"]) || array_key_exists("previous_jpo", $context) ? $context["previous_jpo"] : (function () { throw new RuntimeError('Variable "previous_jpo" does not exist.', 63, $this->source); })()), $context["jpo"])))) {
// line 64
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, 12));
foreach ($context['_seq'] as $context["_key"] => $context["month"]) {
// line 65
echo " ";
if ((0 === twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 65), "n"), $context["month"]))) {
// line 66
echo " <li style=\"height: 38px;\"><a href=\"#";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 66), "n"), "html", null, true);
echo "\" class=\"scroll-month\">";
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 66), "medium", "MMMM Y"), "html", null, true);
echo "</a></li>
";
}
// line 68
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['month'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 69
echo " ";
}
// line 70
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['jpo'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 71
echo " </ul>
</div>
";
// line 74
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 74, $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["jpo"]) {
// line 75
echo "
";
// line 76
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 76)) {
// line 77
echo " ";
$context["previous_jpo"] = $context["jpo"];
// line 78
echo " ";
} else {
// line 79
echo " ";
$context["previous_jpo"] = twig_get_attribute($this->env, $this->source, (isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 79, $this->source); })()), (twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 79) - 1), [], "array", false, false, false, 79);
// line 80
echo " ";
}
// line 81
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 81)) {
// line 82
echo " ";
$context["next_jpo"] = $context["jpo"];
// line 83
echo " ";
} else {
// line 84
echo " ";
$context["next_jpo"] = twig_get_attribute($this->env, $this->source, (isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 84, $this->source); })()), (twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 84) + 1), [], "array", false, false, false, 84);
// line 85
echo " ";
}
// line 86
echo "
";
// line 87
if (((0 !== twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 87), "m"), twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["previous_jpo"]) || array_key_exists("previous_jpo", $context) ? $context["previous_jpo"] : (function () { throw new RuntimeError('Variable "previous_jpo" does not exist.', 87, $this->source); })()), "date", [], "any", false, false, false, 87), "m"))) || (0 === twig_compare((isset($context["previous_jpo"]) || array_key_exists("previous_jpo", $context) ? $context["previous_jpo"] : (function () { throw new RuntimeError('Variable "previous_jpo" does not exist.', 87, $this->source); })()), $context["jpo"])))) {
echo " <div id=\"";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 87), "n"), "html", null, true);
echo "\"> <h2>";
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 87), "full"), "html", null, true);
echo "</h2><div>";
}
// line 88
echo " <article class=\"";
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 88), "jpoPlus", [], "any", false, false, false, 88), 1))) {
echo "bckgrnd-plus ";
}
echo "jpo-item\"
data-etab-id=\"";
// line 89
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 89), "id", [], "any", false, false, false, 89), "html", null, true);
echo "\"
data-etab-nom=\"";
// line 90
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 90), "denomination", [], "any", false, false, false, 90), "html_attr");
echo "\"
data-etab-segment=\"";
// line 91
echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 91), "isClient", [], "any", false, false, false, 91)) ? ("client") : ("prospect"));
echo "\"
data-etab-type=\"";
// line 92
echo twig_escape_filter($this->env, $this->extensions['App\Twig\TypeEtablissementExtension']->typeSimple(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 92), "type", [], "any", false, false, false, 92)), "html_attr");
echo "\"
data-etab-ville=\"";
// line 93
((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 93), "ville", [], "any", false, false, false, 93)) ? (print (twig_escape_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 93), "ville", [], "any", false, false, false, 93), "slug", [], "any", false, false, false, 93), ["-" => "_"]), "html", null, true))) : (print (null)));
echo "\"
data-etab-location-id=\"";
// line 94
(((twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 94) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 94), "ville", [], "any", false, false, false, 94))) ? (print (twig_escape_filter($this->env, ((((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 94), "ville", [], "any", false, false, false, 94), "departement", [], "any", false, false, false, 94), "id", [], "any", false, false, false, 94) . "-") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 94), "codePostal", [], "any", false, false, false, 94)) . "-") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 94), "ville", [], "any", false, false, false, 94), "libelle", [], "any", false, false, false, 94)), "html", null, true))) : (print (null)));
echo "\"
data-jpo-id=\"";
// line 95
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "id", [], "any", false, false, false, 95), "html", null, true);
echo "\"
data-jpo-date=\"";
// line 96
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 96), "Y-m"), "html", null, true);
echo "\"
data-jpo-date-full=\"";
// line 97
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 97), "Y-m-d"), "html", null, true);
echo "\"
data-jpo-index=\"";
// line 98
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 98), "html", null, true);
echo "\"
data-trace-action=\"";
// line 99
echo twig_escape_filter($this->env, twig_constant("App\\Entity\\Trace::JPO"), "html_attr");
echo "\"
data-trace-etab=\"";
// line 100
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 100), "id", [], "any", false, false, false, 100), "html_attr");
echo "\"
>
";
// line 102
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 102), "jpoPlus", [], "any", false, false, false, 102), 1))) {
// line 103
echo " <span class=\"badge-plus-jpo\"></span>
";
}
// line 105
echo " <div class=\"icon\"></div>
<figure class=\"resize\">
";
// line 107
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 107), "logo", [], "any", false, false, false, 107))) {
// line 108
echo " ";
$context["imgSrc"] = $this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 108), "logo", [], "any", false, false, false, 108), "logoFile");
// line 109
echo " ";
if ((isset($context["imgSrc"]) || array_key_exists("imgSrc", $context) ? $context["imgSrc"] : (function () { throw new RuntimeError('Variable "imgSrc" does not exist.', 109, $this->source); })())) {
// line 110
echo " <img class=\"resp\" src='";
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 110), "logo", [], "any", false, false, false, 110), "logoFile"), "etab_hp_logo"), "html", null, true);
echo "' alt='";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "lieu", [], "any", false, false, false, 110), "html", null, true);
echo "' width='140' height='140'/>
";
}
// line 112
echo " ";
}
// line 113
echo " </figure>
<div class=\"content\">
<p class=\"date\">";
// line 115
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 115), "medium", "d MMMM Y"), "html", null, true);
echo "</p>
";
// line 117
echo " <p class=\"city\">";
echo twig_escape_filter($this->env, $this->extensions['App\Twig\LieuExtension']->lieuLibelle(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 117), "ville", [], "any", false, false, false, 117)), "html", null, true);
echo "</p>
<p class=\"estab\">";
// line 118
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 118), "denomination", [], "any", false, false, false, 118)), "truncate", [0 => 50, 1 => "…", 2 => true], "method", false, false, false, 118), "html", null, true);
echo "</p>
</div>
<a class=\"see-more\" href=\"";
// line 120
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("jpo-etab", ["id" => twig_get_attribute($this->env, $this->source, $context["jpo"], "id", [], "any", false, false, false, 120)]), "html", null, true);
echo "\" data-trace-action=\"";
echo twig_escape_filter($this->env, twig_constant("App\\Entity\\Trace::JPO"), "html_attr");
echo "\" data-trace-etab=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 120), "id", [], "any", false, false, false, 120), "html_attr");
echo "\">Découvrir</a>
</article>
";
// line 122
if (((0 !== twig_compare(twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 122), "m"), twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["next_jpo"]) || array_key_exists("next_jpo", $context) ? $context["next_jpo"] : (function () { throw new RuntimeError('Variable "next_jpo" does not exist.', 122, $this->source); })()), "date", [], "any", false, false, false, 122), "m"))) || (0 === twig_compare((isset($context["next_jpo"]) || array_key_exists("next_jpo", $context) ? $context["next_jpo"] : (function () { throw new RuntimeError('Variable "next_jpo" does not exist.', 122, $this->source); })()), $context["jpo"])))) {
echo " </div></div> ";
}
// line 123
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['jpo'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 124
echo " </div>
</section>
<aside>
";
// line 127
$this->loadTemplate("actualite-etablissement/_includes/search-options.html.twig", "jpo/list.html.twig", 127)->display(twig_array_merge($context, ["type" => "aside"]));
// line 128
echo " </aside>
</div>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 29
public function block_h1($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(), "block", "h1"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "h1"));
// line 30
if ((isset($context["seoTitre"]) || array_key_exists("seoTitre", $context) ? $context["seoTitre"] : (function () { throw new RuntimeError('Variable "seoTitre" does not exist.', 30, $this->source); })())) {
// line 31
echo " ";
echo (isset($context["seoTitre"]) || array_key_exists("seoTitre", $context) ? $context["seoTitre"] : (function () { throw new RuntimeError('Variable "seoTitre" does not exist.', 31, $this->source); })());
echo "
";
} else {
// line 33
echo " Journées Portes Ouvertes
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 133
public function block_data_layer($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(), "block", "data_layer"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "data_layer"));
// line 134
echo "<script>
window.dataLayer = window.dataLayer || [];
// 1. Contexte global de la page liste
dataLayer.push({
event: \"page_context\",
page_type: \"liste_jpo\",
liste_type: \"portes_ouvertes\",
site_section: \"portes_ouvertes\",
education_niveau: ";
// line 144
echo json_encode((((isset($context["niveaux"]) || array_key_exists("niveaux", $context) ? $context["niveaux"] : (function () { throw new RuntimeError('Variable "niveaux" does not exist.', 144, $this->source); })())) ? (twig_join_filter((isset($context["niveaux"]) || array_key_exists("niveaux", $context) ? $context["niveaux"] : (function () { throw new RuntimeError('Variable "niveaux" does not exist.', 144, $this->source); })()), "_")) : (null)), twig_constant("JSON_UNESCAPED_UNICODE"));
echo ",
region: ";
// line 146
echo json_encode((((isset($context["lieu"]) || array_key_exists("lieu", $context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.', 146, $this->source); })())) ? (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.', 146, $this->source); })()), "slug", [], "any", false, false, false, 146), ["-" => "_"])) : (null)), twig_constant("JSON_UNESCAPED_UNICODE"));
echo ",
departement: null,
ville: null,
code_postal: null,
recherche_type: \"jpo\",
total_resultats: ";
// line 152
(((array_key_exists("jpos", $context) && (isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 152, $this->source); })()))) ? (print (twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 152, $this->source); })())), "html", null, true))) : (print (0)));
echo ",
numero_pagination: ";
// line 153
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 153, $this->source); })()), "request", [], "any", false, false, false, 153), "query", [], "any", false, false, false, 153), "get", [0 => "page", 1 => 1], "method", false, false, false, 153), "html", null, true);
echo "
});
// 2. Événement métier : affichage d'une liste de journées portes ouvertes
dataLayer.push({ ecommerce: null });
";
// line 158
$context["items"] = [];
// line 159
if ((array_key_exists("jpos", $context) && twig_length_filter($this->env, (isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 159, $this->source); })())))) {
// line 160
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["jpos"]) || array_key_exists("jpos", $context) ? $context["jpos"] : (function () { throw new RuntimeError('Variable "jpos" does not exist.', 160, $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["jpo"]) {
// line 161
echo " ";
$context["item"] = ["item_id" => twig_get_attribute($this->env, $this->source, // line 162
$context["jpo"], "id", [], "any", false, false, false, 162), "item_name" => ((("JPO - " . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 163
$context["jpo"], "etablissement", [], "any", false, false, false, 163), "denomination", [], "any", false, false, false, 163)) . " - ") . $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, $context["jpo"], "date", [], "any", false, false, false, 163), "medium", "d MMMM Y")), "item_category" => "journee_portes_ouvertes", "item_category2" => $this->extensions['App\Twig\TypeEtablissementExtension']->typeSimple(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 165
$context["jpo"], "etablissement", [], "any", false, false, false, 165), "type", [], "any", false, false, false, 165)), "item_category3" => twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, // line 166
$context["jpo"], "date", [], "any", false, false, false, 166), "Y-m"), "item_category4" => ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 167
$context["jpo"], "etablissement", [], "any", false, false, false, 167), "ville", [], "any", false, false, false, 167)) ? (twig_replace_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 167), "ville", [], "any", false, false, false, 167), "slug", [], "any", false, false, false, 167), ["-" => "_"])) : (null)), "location_id" => (((twig_get_attribute($this->env, $this->source, // line 168
$context["jpo"], "etablissement", [], "any", false, false, false, 168) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 168), "ville", [], "any", false, false, false, 168))) ? (((((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 168), "ville", [], "any", false, false, false, 168), "departement", [], "any", false, false, false, 168), "id", [], "any", false, false, false, 168) . "-") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 168), "codePostal", [], "any", false, false, false, 168)) . "-") . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["jpo"], "etablissement", [], "any", false, false, false, 168), "ville", [], "any", false, false, false, 168), "libelle", [], "any", false, false, false, 168))) : (null)), "index" => twig_get_attribute($this->env, $this->source, // line 169
$context["loop"], "index", [], "any", false, false, false, 169), "jpo_date" => twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, // line 170
$context["jpo"], "date", [], "any", false, false, false, 170), "Y-m-d"), "etablissement_id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 171
$context["jpo"], "etablissement", [], "any", false, false, false, 171), "id", [], "any", false, false, false, 171), "etablissement_nom" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 172
$context["jpo"], "etablissement", [], "any", false, false, false, 172), "denomination", [], "any", false, false, false, 172), "etablissement_segment" => ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 173
$context["jpo"], "etablissement", [], "any", false, false, false, 173), "isClient", [], "any", false, false, false, 173)) ? ("client") : ("prospect"))];
// line 175
echo " ";
$context["items"] = twig_array_merge((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 175, $this->source); })()), [0 => (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 175, $this->source); })())]);
// line 176
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['jpo'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 178
echo "dataLayer.push({
event: \"view_item_list\",
ecommerce: {
item_list_id: \"jpo_toutes\",
item_list_name: \"Journées portes ouvertes\",
items: ";
// line 183
echo json_encode((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 183, $this->source); })()), twig_constant("JSON_UNESCAPED_UNICODE"));
echo "
}
});
document.addEventListener('click', function (event) {
const article = event.target.closest('article.jpo-item');
if (!article) {
return;
}
const item = {
item_id: article.dataset.jpoId,
item_name: 'JPO - ' + article.querySelector('.estab').textContent.trim() + ' - ' + article.querySelector('.date').textContent.trim(),
item_category: 'journee_portes_ouvertes',
etablissement_id: article.dataset.etabId,
etablissement_nom: article.dataset.etabNom,
etablissement_segment: article.dataset.etabSegment,
item_category2: article.dataset.etabType,
item_category3: article.dataset.jpoDate,
item_category4: article.dataset.etabVille,
location_id: article.dataset.etabLocationId,
index: article.dataset.jpoIndex,
jpo_date: article.dataset.jpoDateFull
};
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'select_item',
ecommerce: {
item_list_id: 'jpo_toutes',
item_list_name: 'Journées portes ouvertes',
items: [item]
}
});
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "jpo/list.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 617 => 183, 610 => 178, 595 => 176, 592 => 175, 590 => 173, 589 => 172, 588 => 171, 587 => 170, 586 => 169, 585 => 168, 584 => 167, 583 => 166, 582 => 165, 581 => 163, 580 => 162, 578 => 161, 560 => 160, 558 => 159, 556 => 158, 548 => 153, 544 => 152, 535 => 146, 530 => 144, 518 => 134, 508 => 133, 496 => 33, 490 => 31, 488 => 30, 478 => 29, 465 => 128, 463 => 127, 458 => 124, 444 => 123, 440 => 122, 431 => 120, 426 => 118, 421 => 117, 417 => 115, 413 => 113, 410 => 112, 402 => 110, 399 => 109, 396 => 108, 394 => 107, 390 => 105, 386 => 103, 384 => 102, 379 => 100, 375 => 99, 371 => 98, 367 => 97, 363 => 96, 359 => 95, 355 => 94, 351 => 93, 347 => 92, 343 => 91, 339 => 90, 335 => 89, 328 => 88, 320 => 87, 317 => 86, 314 => 85, 311 => 84, 308 => 83, 305 => 82, 302 => 81, 299 => 80, 296 => 79, 293 => 78, 290 => 77, 288 => 76, 285 => 75, 268 => 74, 263 => 71, 249 => 70, 246 => 69, 240 => 68, 232 => 66, 229 => 65, 224 => 64, 222 => 63, 219 => 62, 216 => 61, 213 => 60, 210 => 59, 207 => 58, 204 => 57, 201 => 56, 198 => 55, 195 => 54, 192 => 53, 189 => 52, 172 => 51, 166 => 47, 164 => 46, 161 => 45, 157 => 43, 154 => 40, 151 => 39, 145 => 38, 141 => 36, 139 => 29, 134 => 25, 126 => 19, 124 => 18, 117 => 13, 115 => 10, 114 => 9, 110 => 7, 100 => 6, 81 => 4, 62 => 2, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}{{ block('h1') }}{% endblock %}
{% block description %}Retrouvez sur le site enseignement-prive.info les journées portes ouvertes des établissements de l'enseignement privé.{% endblock %}
{% block body %}
<section class=\"container page-jpo\">
<div id=\"breadcrumb\">
{% include 'jpo/_includes/breadcrumb.html.twig' with {
'lieu' : lieu,
}
only %}
</div>
<div class=\"title\">
<div class=\"jpo-h1-like\">Journées Portes Ouvertes</div>
<div class=\"triangle-defaut\"></div>
</div>
{% if etablissement is not null %}
<div class=\"recherche-contexte text-left\" role=\"group\">
<a href=\"#\" onclick=\"history.back()\" class=\"liste \">
Retour à la fiche
</a>
</div>
{% endif %}
<div class=\"wrap\">
<section>
<h1 class=\"jpo-h2-like\">
{%- block h1 -%}
{% if seoTitre %}
{{seoTitre | raw}}
{% else %}
Journées Portes Ouvertes
{% endif %}
{%- endblock -%}
</h1>
{% if seoTexte %}<span id=\"jpo-intro\">{{seoTexte | raw}}</span><br/>{% endif %}
{% if etablissement is null %}
{{ render(controller(
'App\\\\Controller\\\\JPOController::blocJPOsALaUne',
{ type:'liste' }
)) }}
{% endif %}
<div class=\"w-100 d-md-block d-lg-none pb-4\">
{% include 'actualite-etablissement/_includes/search-options.html.twig' with { type: 'mobile'} %}
</div>
<div class=\"jpo-list-tri\">
<div class=\"jpo-month\">
<ul>
{% for jpo in jpos %}
{% if loop.first %}
{% set previous_jpo = jpo %}
{% else %}
{% set previous_jpo = jpos[loop.index0 - 1] %}
{% endif %}
{% if loop.last %}
{% set next_jpo = jpo %}
{% else %}
{% set next_jpo = jpos[loop.index0 + 1] %}
{% endif %}
{% if jpo.date | date('m') != previous_jpo.date | date('m') or previous_jpo == jpo %}
{% for month in 1..12 %}
{% if jpo.date | date('n') == month %}
<li style=\"height: 38px;\"><a href=\"#{{ jpo.date | date('n') }}\" class=\"scroll-month\">{{jpo.date | format_date(pattern='MMMM Y') }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</ul>
</div>
{% for jpo in jpos %}
{% if loop.first %}
{% set previous_jpo = jpo %}
{% else %}
{% set previous_jpo = jpos[loop.index0 - 1] %}
{% endif %}
{% if loop.last %}
{% set next_jpo = jpo %}
{% else %}
{% set next_jpo = jpos[loop.index0 + 1] %}
{% endif %}
{% if jpo.date | date('m') != previous_jpo.date | date('m') or previous_jpo == jpo %} <div id=\"{{jpo.date | date('n')}}\"> <h2>{{jpo.date | format_date('full') }}</h2><div>{% endif %}
<article class=\"{% if jpo.etablissement.jpoPlus == 1 %}bckgrnd-plus {% endif %}jpo-item\"
data-etab-id=\"{{ jpo.etablissement.id }}\"
data-etab-nom=\"{{ jpo.etablissement.denomination | e('html_attr') }}\"
data-etab-segment=\"{{ jpo.etablissement.isClient ? 'client' : 'prospect' }}\"
data-etab-type=\"{{ typeEtablissementSimple(jpo.etablissement.type) | e('html_attr') }}\"
data-etab-ville=\"{{ jpo.etablissement.ville ? jpo.etablissement.ville.slug | replace({'-': '_'}) : null }}\"
data-etab-location-id=\"{{ jpo.etablissement and jpo.etablissement.ville ? jpo.etablissement.ville.departement.id ~ '-' ~ jpo.etablissement.codePostal ~ '-' ~ jpo.etablissement.ville.libelle : null }}\"
data-jpo-id=\"{{ jpo.id }}\"
data-jpo-date=\"{{ jpo.date | date('Y-m') }}\"
data-jpo-date-full=\"{{ jpo.date | date('Y-m-d') }}\"
data-jpo-index=\"{{ loop.index }}\"
data-trace-action=\"{{ constant('App\\\\Entity\\\\Trace::JPO') | e('html_attr') }}\"
data-trace-etab=\"{{ jpo.etablissement.id | e('html_attr') }}\"
>
{% if jpo.etablissement.jpoPlus == 1 %}
<span class=\"badge-plus-jpo\"></span>
{% endif %}
<div class=\"icon\"></div>
<figure class=\"resize\">
{% if jpo.etablissement.logo is not empty %}
{% set imgSrc = vich_uploader_asset(jpo.etablissement.logo, 'logoFile') %}
{% if imgSrc %}
<img class=\"resp\" src='{{ vich_uploader_asset(jpo.etablissement.logo, 'logoFile') | imagine_filter('etab_hp_logo') }}' alt='{{jpo.lieu}}' width='140' height='140'/>
{% endif %}
{% endif %}
</figure>
<div class=\"content\">
<p class=\"date\">{{jpo.date | format_date(pattern='d MMMM Y') }}</p>
{#<p class=\"city\">{{jpo.lieu | u.truncate(30, '…', true)}}</p>#}
<p class=\"city\">{{ jpo.etablissement.ville|lieuLibelle }}</p>
<p class=\"estab\">{{ jpo.etablissement.denomination | u.truncate(50, '…', true)}}</p>
</div>
<a class=\"see-more\" href=\"{{ path('jpo-etab', {'id': jpo.id}) }}\" data-trace-action=\"{{ constant('App\\\\Entity\\\\Trace::JPO') | e('html_attr') }}\" data-trace-etab=\"{{ jpo.etablissement.id | e('html_attr') }}\">Découvrir</a>
</article>
{% if jpo.date | date('m') != next_jpo.date | date('m') or next_jpo == jpo %} </div></div> {% endif %}
{% endfor %}
</div>
</section>
<aside>
{% include 'actualite-etablissement/_includes/search-options.html.twig' with { type: 'aside'} %}
</aside>
</div>
</section>
{% endblock %}
{% block data_layer %}
<script>
window.dataLayer = window.dataLayer || [];
// 1. Contexte global de la page liste
dataLayer.push({
event: \"page_context\",
page_type: \"liste_jpo\",
liste_type: \"portes_ouvertes\",
site_section: \"portes_ouvertes\",
education_niveau: {{ (niveaux ? niveaux | join('_') : null) | json_encode(constant('JSON_UNESCAPED_UNICODE')) | raw }},
region: {{ (lieu ? lieu.slug | replace({'-': '_'}) : null) | json_encode(constant('JSON_UNESCAPED_UNICODE')) | raw }},
departement: null,
ville: null,
code_postal: null,
recherche_type: \"jpo\",
total_resultats: {{ jpos is defined and jpos ? jpos|length : 0 }},
numero_pagination: {{ app.request.query.get('page', 1) }}
});
// 2. Événement métier : affichage d'une liste de journées portes ouvertes
dataLayer.push({ ecommerce: null });
{% set items = [] %}
{% if jpos is defined and jpos|length %}
{% for jpo in jpos %}
{% set item = {
'item_id': jpo.id,
'item_name': 'JPO - ' ~ jpo.etablissement.denomination ~ ' - ' ~ jpo.date | format_date(pattern='d MMMM Y'),
'item_category': 'journee_portes_ouvertes',
'item_category2': typeEtablissementSimple(jpo.etablissement.type),
'item_category3': jpo.date | date('Y-m'),
'item_category4': jpo.etablissement.ville ? jpo.etablissement.ville.slug | replace({'-': '_'}) : null,
'location_id': jpo.etablissement and jpo.etablissement.ville ? jpo.etablissement.ville.departement.id ~ \"-\" ~ jpo.etablissement.codePostal ~ \"-\" ~ jpo.etablissement.ville.libelle : null,
'index': loop.index,
'jpo_date': jpo.date | date('Y-m-d'),
'etablissement_id': jpo.etablissement.id,
'etablissement_nom': jpo.etablissement.denomination,
'etablissement_segment': jpo.etablissement.isClient ? 'client' : 'prospect'
} %}
{% set items = items|merge([item]) %}
{% endfor %}
{% endif %}
dataLayer.push({
event: \"view_item_list\",
ecommerce: {
item_list_id: \"jpo_toutes\",
item_list_name: \"Journées portes ouvertes\",
items: {{ items|json_encode(constant('JSON_UNESCAPED_UNICODE'))|raw }}
}
});
document.addEventListener('click', function (event) {
const article = event.target.closest('article.jpo-item');
if (!article) {
return;
}
const item = {
item_id: article.dataset.jpoId,
item_name: 'JPO - ' + article.querySelector('.estab').textContent.trim() + ' - ' + article.querySelector('.date').textContent.trim(),
item_category: 'journee_portes_ouvertes',
etablissement_id: article.dataset.etabId,
etablissement_nom: article.dataset.etabNom,
etablissement_segment: article.dataset.etabSegment,
item_category2: article.dataset.etabType,
item_category3: article.dataset.jpoDate,
item_category4: article.dataset.etabVille,
location_id: article.dataset.etabLocationId,
index: article.dataset.jpoIndex,
jpo_date: article.dataset.jpoDateFull
};
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'select_item',
ecommerce: {
item_list_id: 'jpo_toutes',
item_list_name: 'Journées portes ouvertes',
items: [item]
}
});
});
</script>
{% endblock %}", "jpo/list.html.twig", "/app/templates/jpo/list.html.twig");
}
}