var/cache/dev/twig/3e/3e99d6d12c453029a8e5e6af27152b402f6a267b76ed137aa8fc33fa9598a639.php line 581

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. /* jpo/list.html.twig */
  14. class __TwigTemplate_4c2cc5c5501589c2d15bbe5da35909be8153ab23f57bbb4943718163bc66a861 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->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'description' => [$this'block_description'],
  25.             'body' => [$this'block_body'],
  26.             'h1' => [$this'block_h1'],
  27.             'data_layer' => [$this'block_data_layer'],
  28.         ];
  29.     }
  30.     protected function doGetParent(array $context)
  31.     {
  32.         // line 1
  33.         return "base.html.twig";
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = [])
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""jpo/list.html.twig"));
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""jpo/list.html.twig"));
  42.         $this->parent $this->loadTemplate("base.html.twig""jpo/list.html.twig"1);
  43.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  46.         
  47.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  48.     }
  49.     // line 2
  50.     public function block_title($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  57.         $this->displayBlock("h1"$context$blocks);
  58.         
  59.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  60.         
  61.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  62.     }
  63.     // line 4
  64.     public function block_description($context, array $blocks = [])
  65.     {
  66.         $macros $this->macros;
  67.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  68.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""description"));
  69.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  70.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""description"));
  71.         echo "Retrouvez sur le site enseignement-prive.info les journées portes ouvertes des établissements de l'enseignement privé.";
  72.         
  73.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  74.         
  75.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  76.     }
  77.     // line 6
  78.     public function block_body($context, array $blocks = [])
  79.     {
  80.         $macros $this->macros;
  81.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  82.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  83.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  84.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  85.         // line 7
  86.         echo "<section class=\"container page-jpo\">
  87.     <div id=\"breadcrumb\">
  88.         ";
  89.         // line 9
  90.         $this->loadTemplate("jpo/_includes/breadcrumb.html.twig""jpo/list.html.twig"9)->display(twig_to_array(["lieu" =>         // line 10
  91. (isset($context["lieu"]) || array_key_exists("lieu"$context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.'10$this->source); })())]));
  92.         // line 13
  93.         echo "    </div>
  94.     <div class=\"title\">
  95.       <div class=\"jpo-h1-like\">Journées Portes Ouvertes</div>
  96.       <div class=\"triangle-defaut\"></div>
  97.     </div>
  98.     ";
  99.         // line 18
  100.         if ( !(null === (isset($context["etablissement"]) || array_key_exists("etablissement"$context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.'18$this->source); })()))) {
  101.             // line 19
  102.             echo "        <div class=\"recherche-contexte text-left\" role=\"group\">
  103.             <a href=\"#\" onclick=\"history.back()\" class=\"liste \">
  104.                 Retour à la fiche
  105.             </a>
  106.         </div>
  107.     ";
  108.         }
  109.         // line 25
  110.         echo "    <div class=\"wrap\">
  111.         <section>
  112.             <h1 class=\"jpo-h2-like\">";
  113.         // line 29
  114.         $this->displayBlock('h1'$context$blocks);
  115.         // line 36
  116.         echo "</h1>
  117.             ";
  118.         // line 38
  119.         if ((isset($context["seoTexte"]) || array_key_exists("seoTexte"$context) ? $context["seoTexte"] : (function () { throw new RuntimeError('Variable "seoTexte" does not exist.'38$this->source); })())) {
  120.             echo "<span id=\"jpo-intro\">";
  121.             echo (isset($context["seoTexte"]) || array_key_exists("seoTexte"$context) ? $context["seoTexte"] : (function () { throw new RuntimeError('Variable "seoTexte" does not exist.'38$this->source); })());
  122.             echo "</span><br/>";
  123.         }
  124.         // line 39
  125.         echo "            ";
  126.         if ((null === (isset($context["etablissement"]) || array_key_exists("etablissement"$context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.'39$this->source); })()))) {
  127.             // line 40
  128.             echo "            ";
  129.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\JPOController::blocJPOsALaUne", ["type" => "liste"]));
  130.             // line 43
  131.             echo "
  132.             ";
  133.         }
  134.         // line 45
  135.         echo "            <div class=\"w-100 d-md-block d-lg-none pb-4\">
  136.                 ";
  137.         // line 46
  138.         $this->loadTemplate("actualite-etablissement/_includes/search-options.html.twig""jpo/list.html.twig"46)->display(twig_array_merge($context, ["type" => "mobile"]));
  139.         // line 47
  140.         echo "            </div>
  141.             <div class=\"jpo-list-tri\">
  142.                 <div class=\"jpo-month\">
  143.                     <ul>
  144.                     ";
  145.         // line 51
  146.         $context['_parent'] = $context;
  147.         $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); })()));
  148.         $context['loop'] = [
  149.           'parent' => $context['_parent'],
  150.           'index0' => 0,
  151.           'index'  => 1,
  152.           'first'  => true,
  153.         ];
  154.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  155.             $length count($context['_seq']);
  156.             $context['loop']['revindex0'] = $length 1;
  157.             $context['loop']['revindex'] = $length;
  158.             $context['loop']['length'] = $length;
  159.             $context['loop']['last'] = === $length;
  160.         }
  161.         foreach ($context['_seq'] as $context["_key"] => $context["jpo"]) {
  162.             // line 52
  163.             echo "                        ";
  164.             if (twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse52)) {
  165.                 // line 53
  166.                 echo "                            ";
  167.                 $context["previous_jpo"] = $context["jpo"];
  168.                 // line 54
  169.                 echo "                        ";
  170.             } else {
  171.                 // line 55
  172.                 echo "                            ";
  173.                 $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"falsefalsefalse55) - 1), [], "array"falsefalsefalse55);
  174.                 // line 56
  175.                 echo "                        ";
  176.             }
  177.             // line 57
  178.             echo "                        ";
  179.             if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse57)) {
  180.                 // line 58
  181.                 echo "                            ";
  182.                 $context["next_jpo"] = $context["jpo"];
  183.                 // line 59
  184.                 echo "                        ";
  185.             } else {
  186.                 // line 60
  187.                 echo "                            ";
  188.                 $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"falsefalsefalse60) + 1), [], "array"falsefalsefalse60);
  189.                 // line 61
  190.                 echo "                        ";
  191.             }
  192.             // line 62
  193.             echo "
  194.                         ";
  195.             // line 63
  196.             if (((!== twig_compare(twig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse63), "m"), twig_date_format_filter($this->envtwig_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"falsefalsefalse63), "m"))) || (=== 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"])))) {
  197.                 // line 64
  198.                 echo "                            ";
  199.                 $context['_parent'] = $context;
  200.                 $context['_seq'] = twig_ensure_traversable(range(112));
  201.                 foreach ($context['_seq'] as $context["_key"] => $context["month"]) {
  202.                     // line 65
  203.                     echo "                                ";
  204.                     if ((=== twig_compare(twig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse65), "n"), $context["month"]))) {
  205.                         // line 66
  206.                         echo "                                    <li style=\"height: 38px;\"><a href=\"#";
  207.                         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse66), "n"), "html"nulltrue);
  208.                         echo "\" class=\"scroll-month\">";
  209.                         echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse66), "medium""MMMM Y"), "html"nulltrue);
  210.                         echo "</a></li>
  211.                                 ";
  212.                     }
  213.                     // line 68
  214.                     echo "                            ";
  215.                 }
  216.                 $_parent $context['_parent'];
  217.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['month'], $context['_parent'], $context['loop']);
  218.                 $context array_intersect_key($context$_parent) + $_parent;
  219.                 // line 69
  220.                 echo "                        ";
  221.             }
  222.             // line 70
  223.             echo "                    ";
  224.             ++$context['loop']['index0'];
  225.             ++$context['loop']['index'];
  226.             $context['loop']['first'] = false;
  227.             if (isset($context['loop']['length'])) {
  228.                 --$context['loop']['revindex0'];
  229.                 --$context['loop']['revindex'];
  230.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  231.             }
  232.         }
  233.         $_parent $context['_parent'];
  234.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['jpo'], $context['_parent'], $context['loop']);
  235.         $context array_intersect_key($context$_parent) + $_parent;
  236.         // line 71
  237.         echo "                    </ul>
  238.                 </div>
  239.                 ";
  240.         // line 74
  241.         $context['_parent'] = $context;
  242.         $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); })()));
  243.         $context['loop'] = [
  244.           'parent' => $context['_parent'],
  245.           'index0' => 0,
  246.           'index'  => 1,
  247.           'first'  => true,
  248.         ];
  249.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  250.             $length count($context['_seq']);
  251.             $context['loop']['revindex0'] = $length 1;
  252.             $context['loop']['revindex'] = $length;
  253.             $context['loop']['length'] = $length;
  254.             $context['loop']['last'] = === $length;
  255.         }
  256.         foreach ($context['_seq'] as $context["_key"] => $context["jpo"]) {
  257.             // line 75
  258.             echo "
  259.                 ";
  260.             // line 76
  261.             if (twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse76)) {
  262.                 // line 77
  263.                 echo "                    ";
  264.                 $context["previous_jpo"] = $context["jpo"];
  265.                 // line 78
  266.                 echo "                ";
  267.             } else {
  268.                 // line 79
  269.                 echo "                    ";
  270.                 $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"falsefalsefalse79) - 1), [], "array"falsefalsefalse79);
  271.                 // line 80
  272.                 echo "                ";
  273.             }
  274.             // line 81
  275.             echo "                ";
  276.             if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse81)) {
  277.                 // line 82
  278.                 echo "                    ";
  279.                 $context["next_jpo"] = $context["jpo"];
  280.                 // line 83
  281.                 echo "                ";
  282.             } else {
  283.                 // line 84
  284.                 echo "                    ";
  285.                 $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"falsefalsefalse84) + 1), [], "array"falsefalsefalse84);
  286.                 // line 85
  287.                 echo "                ";
  288.             }
  289.             // line 86
  290.             echo "
  291.               ";
  292.             // line 87
  293.             if (((!== twig_compare(twig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse87), "m"), twig_date_format_filter($this->envtwig_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"falsefalsefalse87), "m"))) || (=== 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"])))) {
  294.                 echo " <div id=\"";
  295.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse87), "n"), "html"nulltrue);
  296.                 echo "\"> <h2>";
  297.                 echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse87), "full"), "html"nulltrue);
  298.                 echo "</h2><div>";
  299.             }
  300.             // line 88
  301.             echo "                <article class=\"";
  302.             if ((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse88), "jpoPlus", [], "any"falsefalsefalse88), 1))) {
  303.                 echo "bckgrnd-plus ";
  304.             }
  305.             echo "jpo-item\"
  306.                     data-etab-id=\"";
  307.             // line 89
  308.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse89), "id", [], "any"falsefalsefalse89), "html"nulltrue);
  309.             echo "\" 
  310.                     data-etab-nom=\"";
  311.             // line 90
  312.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse90), "denomination", [], "any"falsefalsefalse90), "html_attr");
  313.             echo "\" 
  314.                     data-etab-segment=\"";
  315.             // line 91
  316.             echo ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse91), "isClient", [], "any"falsefalsefalse91)) ? ("client") : ("prospect"));
  317.             echo "\"
  318.                     data-etab-type=\"";
  319.             // line 92
  320.             echo twig_escape_filter($this->env$this->extensions['App\Twig\TypeEtablissementExtension']->typeSimple(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse92), "type", [], "any"falsefalsefalse92)), "html_attr");
  321.             echo "\"
  322.                     data-etab-ville=\"";
  323.             // line 93
  324.             ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse93), "ville", [], "any"falsefalsefalse93)) ? (print (twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse93), "ville", [], "any"falsefalsefalse93), "slug", [], "any"falsefalsefalse93), ["-" => "_"]), "html"nulltrue))) : (print (null)));
  325.             echo "\"
  326.                     data-etab-location-id=\"";
  327.             // line 94
  328.             (((twig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse94) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse94), "ville", [], "any"falsefalsefalse94))) ? (print (twig_escape_filter($this->env, ((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse94), "ville", [], "any"falsefalsefalse94), "departement", [], "any"falsefalsefalse94), "id", [], "any"falsefalsefalse94) . "-") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse94), "codePostal", [], "any"falsefalsefalse94)) . "-") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse94), "ville", [], "any"falsefalsefalse94), "libelle", [], "any"falsefalsefalse94)), "html"nulltrue))) : (print (null)));
  329.             echo "\"
  330.                     data-jpo-id=\"";
  331.             // line 95
  332.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "id", [], "any"falsefalsefalse95), "html"nulltrue);
  333.             echo "\" 
  334.                     data-jpo-date=\"";
  335.             // line 96
  336.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse96), "Y-m"), "html"nulltrue);
  337.             echo "\"
  338.                     data-jpo-date-full=\"";
  339.             // line 97
  340.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse97), "Y-m-d"), "html"nulltrue);
  341.             echo "\"
  342.                     data-jpo-index=\"";
  343.             // line 98
  344.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse98), "html"nulltrue);
  345.             echo "\"
  346.                     data-trace-action=\"";
  347.             // line 99
  348.             echo twig_escape_filter($this->envtwig_constant("App\\Entity\\Trace::JPO"), "html_attr");
  349.             echo "\" 
  350.                     data-trace-etab=\"";
  351.             // line 100
  352.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse100), "id", [], "any"falsefalsefalse100), "html_attr");
  353.             echo "\"
  354.                 >
  355.                     ";
  356.             // line 102
  357.             if ((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse102), "jpoPlus", [], "any"falsefalsefalse102), 1))) {
  358.                 // line 103
  359.                 echo "                        <span class=\"badge-plus-jpo\"></span>
  360.                     ";
  361.             }
  362.             // line 105
  363.             echo "                    <div class=\"icon\"></div>
  364.                     <figure class=\"resize\">
  365.                         ";
  366.             // line 107
  367.             if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse107), "logo", [], "any"falsefalsefalse107))) {
  368.                 // line 108
  369.                 echo "                            ";
  370.                 $context["imgSrc"] = $this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse108), "logo", [], "any"falsefalsefalse108), "logoFile");
  371.                 // line 109
  372.                 echo "                            ";
  373.                 if ((isset($context["imgSrc"]) || array_key_exists("imgSrc"$context) ? $context["imgSrc"] : (function () { throw new RuntimeError('Variable "imgSrc" does not exist.'109$this->source); })())) {
  374.                     // line 110
  375.                     echo "                                <img class=\"resp\" src='";
  376.                     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->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse110), "logo", [], "any"falsefalsefalse110), "logoFile"), "etab_hp_logo"), "html"nulltrue);
  377.                     echo "' alt='";
  378.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "lieu", [], "any"falsefalsefalse110), "html"nulltrue);
  379.                     echo "' width='140' height='140'/>
  380.                             ";
  381.                 }
  382.                 // line 112
  383.                 echo "                        ";
  384.             }
  385.             // line 113
  386.             echo "                    </figure>
  387.                     <div class=\"content\">
  388.                         <p class=\"date\">";
  389.             // line 115
  390.             echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse115), "medium""d MMMM Y"), "html"nulltrue);
  391.             echo "</p>
  392.                         ";
  393.             // line 117
  394.             echo "                        <p class=\"city\">";
  395.             echo twig_escape_filter($this->env$this->extensions['App\Twig\LieuExtension']->lieuLibelle(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse117), "ville", [], "any"falsefalsefalse117)), "html"nulltrue);
  396.             echo "</p>
  397.                         <p class=\"estab\">";
  398.             // line 118
  399.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse118), "denomination", [], "any"falsefalsefalse118)), "truncate", [=> 50=> "…"=> true], "method"falsefalsefalse118), "html"nulltrue);
  400.             echo "</p>
  401.                     </div>
  402.                     <a class=\"see-more\" href=\"";
  403.             // line 120
  404.             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"falsefalsefalse120)]), "html"nulltrue);
  405.             echo "\" data-trace-action=\"";
  406.             echo twig_escape_filter($this->envtwig_constant("App\\Entity\\Trace::JPO"), "html_attr");
  407.             echo "\" data-trace-etab=\"";
  408.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse120), "id", [], "any"falsefalsefalse120), "html_attr");
  409.             echo "\">Découvrir</a>
  410.                 </article>
  411.               ";
  412.             // line 122
  413.             if (((!== twig_compare(twig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse122), "m"), twig_date_format_filter($this->envtwig_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"falsefalsefalse122), "m"))) || (=== 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"])))) {
  414.                 echo " </div></div> ";
  415.             }
  416.             // line 123
  417.             echo "                ";
  418.             ++$context['loop']['index0'];
  419.             ++$context['loop']['index'];
  420.             $context['loop']['first'] = false;
  421.             if (isset($context['loop']['length'])) {
  422.                 --$context['loop']['revindex0'];
  423.                 --$context['loop']['revindex'];
  424.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  425.             }
  426.         }
  427.         $_parent $context['_parent'];
  428.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['jpo'], $context['_parent'], $context['loop']);
  429.         $context array_intersect_key($context$_parent) + $_parent;
  430.         // line 124
  431.         echo "            </div>
  432.         </section>
  433.         <aside>
  434.             ";
  435.         // line 127
  436.         $this->loadTemplate("actualite-etablissement/_includes/search-options.html.twig""jpo/list.html.twig"127)->display(twig_array_merge($context, ["type" => "aside"]));
  437.         // line 128
  438.         echo "        </aside>
  439.     </div>
  440. </section>
  441. ";
  442.         
  443.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  444.         
  445.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  446.     }
  447.     // line 29
  448.     public function block_h1($context, array $blocks = [])
  449.     {
  450.         $macros $this->macros;
  451.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  452.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""h1"));
  453.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  454.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""h1"));
  455.         // line 30
  456.         if ((isset($context["seoTitre"]) || array_key_exists("seoTitre"$context) ? $context["seoTitre"] : (function () { throw new RuntimeError('Variable "seoTitre" does not exist.'30$this->source); })())) {
  457.             // line 31
  458.             echo "            ";
  459.             echo (isset($context["seoTitre"]) || array_key_exists("seoTitre"$context) ? $context["seoTitre"] : (function () { throw new RuntimeError('Variable "seoTitre" does not exist.'31$this->source); })());
  460.             echo "
  461.             ";
  462.         } else {
  463.             // line 33
  464.             echo "            Journées Portes Ouvertes
  465.             ";
  466.         }
  467.         
  468.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  469.         
  470.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  471.     }
  472.     // line 133
  473.     public function block_data_layer($context, array $blocks = [])
  474.     {
  475.         $macros $this->macros;
  476.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  477.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""data_layer"));
  478.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  479.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""data_layer"));
  480.         // line 134
  481.         echo "<script>
  482. window.dataLayer = window.dataLayer || [];
  483. // 1. Contexte global de la page liste
  484. dataLayer.push({
  485.   event: \"page_context\",
  486.   page_type: \"liste_jpo\",
  487.   liste_type: \"portes_ouvertes\",
  488.   site_section: \"portes_ouvertes\",
  489.   education_niveau: ";
  490.         // line 144
  491.         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"));
  492.         echo ",
  493.   region: ";
  494.         // line 146
  495.         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"falsefalsefalse146), ["-" => "_"])) : (null)), twig_constant("JSON_UNESCAPED_UNICODE"));
  496.         echo ",
  497.   departement: null,
  498.   ville: null,
  499.   code_postal: null,
  500.   recherche_type: \"jpo\",
  501.   total_resultats: ";
  502.         // line 152
  503.         (((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->envtwig_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"nulltrue))) : (print (0)));
  504.         echo ",
  505.   numero_pagination: ";
  506.         // line 153
  507.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse153), "query", [], "any"falsefalsefalse153), "get", [=> "page"=> 1], "method"falsefalsefalse153), "html"nulltrue);
  508.         echo "
  509. });
  510. // 2. Événement métier : affichage d'une liste de journées portes ouvertes
  511. dataLayer.push({ ecommerce: null });
  512. ";
  513.         // line 158
  514.         $context["items"] = [];
  515.         // line 159
  516.         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); })())))) {
  517.             // line 160
  518.             echo "    ";
  519.             $context['_parent'] = $context;
  520.             $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); })()));
  521.             $context['loop'] = [
  522.               'parent' => $context['_parent'],
  523.               'index0' => 0,
  524.               'index'  => 1,
  525.               'first'  => true,
  526.             ];
  527.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  528.                 $length count($context['_seq']);
  529.                 $context['loop']['revindex0'] = $length 1;
  530.                 $context['loop']['revindex'] = $length;
  531.                 $context['loop']['length'] = $length;
  532.                 $context['loop']['last'] = === $length;
  533.             }
  534.             foreach ($context['_seq'] as $context["_key"] => $context["jpo"]) {
  535.                 // line 161
  536.                 echo "        ";
  537.                 $context["item"] = ["item_id" => twig_get_attribute($this->env$this->source,                 // line 162
  538. $context["jpo"], "id", [], "any"falsefalsefalse162), "item_name" => ((("JPO - " twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 163
  539. $context["jpo"], "etablissement", [], "any"falsefalsefalse163), "denomination", [], "any"falsefalsefalse163)) . " - ") . $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->envtwig_get_attribute($this->env$this->source$context["jpo"], "date", [], "any"falsefalsefalse163), "medium""d MMMM Y")), "item_category" => "journee_portes_ouvertes""item_category2" => $this->extensions['App\Twig\TypeEtablissementExtension']->typeSimple(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 165
  540. $context["jpo"], "etablissement", [], "any"falsefalsefalse165), "type", [], "any"falsefalsefalse165)), "item_category3" => twig_date_format_filter($this->envtwig_get_attribute($this->env$this->source,                 // line 166
  541. $context["jpo"], "date", [], "any"falsefalsefalse166), "Y-m"), "item_category4" => ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 167
  542. $context["jpo"], "etablissement", [], "any"falsefalsefalse167), "ville", [], "any"falsefalsefalse167)) ? (twig_replace_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse167), "ville", [], "any"falsefalsefalse167), "slug", [], "any"falsefalsefalse167), ["-" => "_"])) : (null)), "location_id" => (((twig_get_attribute($this->env$this->source,                 // line 168
  543. $context["jpo"], "etablissement", [], "any"falsefalsefalse168) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse168), "ville", [], "any"falsefalsefalse168))) ? (((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse168), "ville", [], "any"falsefalsefalse168), "departement", [], "any"falsefalsefalse168), "id", [], "any"falsefalsefalse168) . "-") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse168), "codePostal", [], "any"falsefalsefalse168)) . "-") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["jpo"], "etablissement", [], "any"falsefalsefalse168), "ville", [], "any"falsefalsefalse168), "libelle", [], "any"falsefalsefalse168))) : (null)), "index" => twig_get_attribute($this->env$this->source,                 // line 169
  544. $context["loop"], "index", [], "any"falsefalsefalse169), "jpo_date" => twig_date_format_filter($this->envtwig_get_attribute($this->env$this->source,                 // line 170
  545. $context["jpo"], "date", [], "any"falsefalsefalse170), "Y-m-d"), "etablissement_id" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 171
  546. $context["jpo"], "etablissement", [], "any"falsefalsefalse171), "id", [], "any"falsefalsefalse171), "etablissement_nom" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 172
  547. $context["jpo"], "etablissement", [], "any"falsefalsefalse172), "denomination", [], "any"falsefalsefalse172), "etablissement_segment" => ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,                 // line 173
  548. $context["jpo"], "etablissement", [], "any"falsefalsefalse173), "isClient", [], "any"falsefalsefalse173)) ? ("client") : ("prospect"))];
  549.                 // line 175
  550.                 echo "        ";
  551.                 $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); })()), [=> (isset($context["item"]) || array_key_exists("item"$context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.'175$this->source); })())]);
  552.                 // line 176
  553.                 echo "    ";
  554.                 ++$context['loop']['index0'];
  555.                 ++$context['loop']['index'];
  556.                 $context['loop']['first'] = false;
  557.                 if (isset($context['loop']['length'])) {
  558.                     --$context['loop']['revindex0'];
  559.                     --$context['loop']['revindex'];
  560.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  561.                 }
  562.             }
  563.             $_parent $context['_parent'];
  564.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['jpo'], $context['_parent'], $context['loop']);
  565.             $context array_intersect_key($context$_parent) + $_parent;
  566.         }
  567.         // line 178
  568.         echo "dataLayer.push({
  569.   event: \"view_item_list\",
  570.   ecommerce: {
  571.     item_list_id: \"jpo_toutes\",
  572.     item_list_name: \"Journées portes ouvertes\",
  573.     items: ";
  574.         // line 183
  575.         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"));
  576.         echo "
  577.   }
  578. });
  579. document.addEventListener('click', function (event) {
  580.     const article = event.target.closest('article.jpo-item');
  581.     if (!article) {
  582.         return;
  583.     }
  584.     const item = {
  585.         item_id: article.dataset.jpoId,
  586.         item_name: 'JPO - ' + article.querySelector('.estab').textContent.trim() + ' - ' + article.querySelector('.date').textContent.trim(),
  587.         item_category: 'journee_portes_ouvertes',
  588.         etablissement_id: article.dataset.etabId,
  589.         etablissement_nom: article.dataset.etabNom,
  590.         etablissement_segment: article.dataset.etabSegment,
  591.         item_category2: article.dataset.etabType,
  592.         item_category3: article.dataset.jpoDate,
  593.         item_category4: article.dataset.etabVille,
  594.         location_id: article.dataset.etabLocationId,
  595.         index: article.dataset.jpoIndex,
  596.         jpo_date: article.dataset.jpoDateFull
  597.     };
  598.     dataLayer.push({ ecommerce: null });
  599.     dataLayer.push({
  600.         event: 'select_item',
  601.         ecommerce: {
  602.             item_list_id: 'jpo_toutes',
  603.             item_list_name: 'Journées portes ouvertes',
  604.             items: [item]
  605.         }
  606.     });
  607. });
  608. </script>
  609. ";
  610.         
  611.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  612.         
  613.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  614.     }
  615.     public function getTemplateName()
  616.     {
  617.         return "jpo/list.html.twig";
  618.     }
  619.     public function isTraitable()
  620.     {
  621.         return false;
  622.     }
  623.     public function getDebugInfo()
  624.     {
  625.         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,);
  626.     }
  627.     public function getSourceContext()
  628.     {
  629.         return new Source("{% extends 'base.html.twig' %}
  630. {% block title %}{{ block('h1') }}{% endblock %}
  631. {% block description %}Retrouvez sur le site enseignement-prive.info les journées portes ouvertes des établissements de l'enseignement privé.{% endblock %}
  632. {% block body %}
  633. <section class=\"container page-jpo\">
  634.     <div id=\"breadcrumb\">
  635.         {% include 'jpo/_includes/breadcrumb.html.twig' with {
  636.             'lieu' : lieu,
  637.         }
  638.             only %}
  639.     </div>
  640.     <div class=\"title\">
  641.       <div class=\"jpo-h1-like\">Journées Portes Ouvertes</div>
  642.       <div class=\"triangle-defaut\"></div>
  643.     </div>
  644.     {% if etablissement is not null %}
  645.         <div class=\"recherche-contexte text-left\" role=\"group\">
  646.             <a href=\"#\" onclick=\"history.back()\" class=\"liste \">
  647.                 Retour à la fiche
  648.             </a>
  649.         </div>
  650.     {% endif %}
  651.     <div class=\"wrap\">
  652.         <section>
  653.             <h1 class=\"jpo-h2-like\">
  654.             {%- block h1 -%}
  655.             {% if seoTitre %}
  656.             {{seoTitre | raw}}
  657.             {% else %}
  658.             Journées Portes Ouvertes
  659.             {% endif %}
  660.             {%- endblock -%}
  661.             </h1>
  662.             {% if seoTexte %}<span id=\"jpo-intro\">{{seoTexte | raw}}</span><br/>{% endif %}
  663.             {% if etablissement is null %}
  664.             {{ render(controller(
  665.                 'App\\\\Controller\\\\JPOController::blocJPOsALaUne',
  666.                 { type:'liste' }
  667.             )) }}
  668.             {% endif %}
  669.             <div class=\"w-100 d-md-block d-lg-none pb-4\">
  670.                 {% include 'actualite-etablissement/_includes/search-options.html.twig' with { type: 'mobile'} %}
  671.             </div>
  672.             <div class=\"jpo-list-tri\">
  673.                 <div class=\"jpo-month\">
  674.                     <ul>
  675.                     {% for jpo in jpos %}
  676.                         {% if loop.first %}
  677.                             {% set previous_jpo = jpo %}
  678.                         {% else %}
  679.                             {% set previous_jpo = jpos[loop.index0 - 1] %}
  680.                         {% endif %}
  681.                         {% if loop.last %}
  682.                             {% set next_jpo = jpo %}
  683.                         {% else %}
  684.                             {% set next_jpo = jpos[loop.index0 + 1] %}
  685.                         {% endif %}
  686.                         {% if jpo.date | date('m') != previous_jpo.date | date('m') or previous_jpo == jpo %}
  687.                             {% for month in 1..12 %}
  688.                                 {% if jpo.date | date('n') == month %}
  689.                                     <li style=\"height: 38px;\"><a href=\"#{{ jpo.date | date('n') }}\" class=\"scroll-month\">{{jpo.date | format_date(pattern='MMMM Y') }}</a></li>
  690.                                 {% endif %}
  691.                             {% endfor %}
  692.                         {% endif %}
  693.                     {% endfor %}
  694.                     </ul>
  695.                 </div>
  696.                 {% for jpo in jpos %}
  697.                 {% if loop.first %}
  698.                     {% set previous_jpo = jpo %}
  699.                 {% else %}
  700.                     {% set previous_jpo = jpos[loop.index0 - 1] %}
  701.                 {% endif %}
  702.                 {% if loop.last %}
  703.                     {% set next_jpo = jpo %}
  704.                 {% else %}
  705.                     {% set next_jpo = jpos[loop.index0 + 1] %}
  706.                 {% endif %}
  707.               {% 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 %}
  708.                 <article class=\"{% if jpo.etablissement.jpoPlus == 1 %}bckgrnd-plus {% endif %}jpo-item\"
  709.                     data-etab-id=\"{{ jpo.etablissement.id }}\" 
  710.                     data-etab-nom=\"{{ jpo.etablissement.denomination | e('html_attr') }}\" 
  711.                     data-etab-segment=\"{{ jpo.etablissement.isClient ? 'client' : 'prospect' }}\"
  712.                     data-etab-type=\"{{ typeEtablissementSimple(jpo.etablissement.type) | e('html_attr') }}\"
  713.                     data-etab-ville=\"{{ jpo.etablissement.ville ? jpo.etablissement.ville.slug | replace({'-': '_'}) : null }}\"
  714.                     data-etab-location-id=\"{{ jpo.etablissement and jpo.etablissement.ville ? jpo.etablissement.ville.departement.id ~ '-' ~ jpo.etablissement.codePostal ~ '-' ~ jpo.etablissement.ville.libelle : null }}\"
  715.                     data-jpo-id=\"{{ jpo.id }}\" 
  716.                     data-jpo-date=\"{{ jpo.date | date('Y-m') }}\"
  717.                     data-jpo-date-full=\"{{ jpo.date | date('Y-m-d') }}\"
  718.                     data-jpo-index=\"{{ loop.index }}\"
  719.                     data-trace-action=\"{{ constant('App\\\\Entity\\\\Trace::JPO') | e('html_attr') }}\" 
  720.                     data-trace-etab=\"{{ jpo.etablissement.id | e('html_attr') }}\"
  721.                 >
  722.                     {% if jpo.etablissement.jpoPlus == 1 %}
  723.                         <span class=\"badge-plus-jpo\"></span>
  724.                     {% endif %}
  725.                     <div class=\"icon\"></div>
  726.                     <figure class=\"resize\">
  727.                         {% if jpo.etablissement.logo is not empty %}
  728.                             {% set imgSrc = vich_uploader_asset(jpo.etablissement.logo, 'logoFile') %}
  729.                             {% if imgSrc %}
  730.                                 <img class=\"resp\" src='{{ vich_uploader_asset(jpo.etablissement.logo, 'logoFile') | imagine_filter('etab_hp_logo') }}' alt='{{jpo.lieu}}' width='140' height='140'/>
  731.                             {% endif %}
  732.                         {% endif %}
  733.                     </figure>
  734.                     <div class=\"content\">
  735.                         <p class=\"date\">{{jpo.date | format_date(pattern='d MMMM Y') }}</p>
  736.                         {#<p class=\"city\">{{jpo.lieu | u.truncate(30, '…', true)}}</p>#}
  737.                         <p class=\"city\">{{ jpo.etablissement.ville|lieuLibelle }}</p>
  738.                         <p class=\"estab\">{{ jpo.etablissement.denomination | u.truncate(50, '…', true)}}</p>
  739.                     </div>
  740.                     <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>
  741.                 </article>
  742.               {% if jpo.date | date('m') != next_jpo.date | date('m') or next_jpo == jpo %} </div></div> {% endif %}
  743.                 {% endfor %}
  744.             </div>
  745.         </section>
  746.         <aside>
  747.             {% include 'actualite-etablissement/_includes/search-options.html.twig' with { type: 'aside'} %}
  748.         </aside>
  749.     </div>
  750. </section>
  751. {% endblock %}
  752. {% block data_layer %}
  753. <script>
  754. window.dataLayer = window.dataLayer || [];
  755. // 1. Contexte global de la page liste
  756. dataLayer.push({
  757.   event: \"page_context\",
  758.   page_type: \"liste_jpo\",
  759.   liste_type: \"portes_ouvertes\",
  760.   site_section: \"portes_ouvertes\",
  761.   education_niveau: {{ (niveaux ? niveaux | join('_') : null) | json_encode(constant('JSON_UNESCAPED_UNICODE')) | raw }},
  762.   region: {{ (lieu ? lieu.slug | replace({'-': '_'}) : null) | json_encode(constant('JSON_UNESCAPED_UNICODE')) | raw }},
  763.   departement: null,
  764.   ville: null,
  765.   code_postal: null,
  766.   recherche_type: \"jpo\",
  767.   total_resultats: {{ jpos is defined and jpos ? jpos|length : 0 }},
  768.   numero_pagination: {{ app.request.query.get('page', 1) }}
  769. });
  770. // 2. Événement métier : affichage d'une liste de journées portes ouvertes
  771. dataLayer.push({ ecommerce: null });
  772. {% set items = [] %}
  773. {% if jpos is defined and jpos|length %}
  774.     {% for jpo in jpos %}
  775.         {% set item = {
  776.             'item_id': jpo.id,
  777.             'item_name': 'JPO - ' ~ jpo.etablissement.denomination ~ ' - ' ~ jpo.date | format_date(pattern='d MMMM Y'),
  778.             'item_category': 'journee_portes_ouvertes',
  779.             'item_category2': typeEtablissementSimple(jpo.etablissement.type),
  780.             'item_category3': jpo.date | date('Y-m'),
  781.             'item_category4': jpo.etablissement.ville ? jpo.etablissement.ville.slug | replace({'-': '_'}) : null,
  782.             'location_id': jpo.etablissement and jpo.etablissement.ville ? jpo.etablissement.ville.departement.id ~ \"-\" ~ jpo.etablissement.codePostal ~ \"-\" ~ jpo.etablissement.ville.libelle : null,
  783.             'index': loop.index,
  784.             'jpo_date': jpo.date | date('Y-m-d'),
  785.             'etablissement_id': jpo.etablissement.id,
  786.             'etablissement_nom': jpo.etablissement.denomination,
  787.             'etablissement_segment': jpo.etablissement.isClient ? 'client' : 'prospect'
  788.         } %}
  789.         {% set items = items|merge([item]) %}
  790.     {% endfor %}
  791. {% endif %}
  792. dataLayer.push({
  793.   event: \"view_item_list\",
  794.   ecommerce: {
  795.     item_list_id: \"jpo_toutes\",
  796.     item_list_name: \"Journées portes ouvertes\",
  797.     items: {{ items|json_encode(constant('JSON_UNESCAPED_UNICODE'))|raw }}
  798.   }
  799. });
  800. document.addEventListener('click', function (event) {
  801.     const article = event.target.closest('article.jpo-item');
  802.     if (!article) {
  803.         return;
  804.     }
  805.     const item = {
  806.         item_id: article.dataset.jpoId,
  807.         item_name: 'JPO - ' + article.querySelector('.estab').textContent.trim() + ' - ' + article.querySelector('.date').textContent.trim(),
  808.         item_category: 'journee_portes_ouvertes',
  809.         etablissement_id: article.dataset.etabId,
  810.         etablissement_nom: article.dataset.etabNom,
  811.         etablissement_segment: article.dataset.etabSegment,
  812.         item_category2: article.dataset.etabType,
  813.         item_category3: article.dataset.jpoDate,
  814.         item_category4: article.dataset.etabVille,
  815.         location_id: article.dataset.etabLocationId,
  816.         index: article.dataset.jpoIndex,
  817.         jpo_date: article.dataset.jpoDateFull
  818.     };
  819.     dataLayer.push({ ecommerce: null });
  820.     dataLayer.push({
  821.         event: 'select_item',
  822.         ecommerce: {
  823.             item_list_id: 'jpo_toutes',
  824.             item_list_name: 'Journées portes ouvertes',
  825.             items: [item]
  826.         }
  827.     });
  828. });
  829. </script>
  830. {% endblock %}""jpo/list.html.twig""/app/templates/jpo/list.html.twig");
  831.     }
  832. }