var/cache/dev/twig/78/78ad348716d474b9e9897f7e0421795b.php line 185

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. /* @SyliusShop/Product/index.html.twig */
  14. class __TwigTemplate_1b1e158c639ecda361a2c0899d607227 extends \Twig\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.             'content' => [$this'block_content'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "@SyliusShop/layout.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/index.html.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/index.html.twig"));
  38.         $this->parent $this->loadTemplate("@SyliusShop/layout.html.twig""@SyliusShop/Product/index.html.twig"1);
  39.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  40.         
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  42.         
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  44.     }
  45.     // line 3
  46.     public function block_content($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         // line 4
  54.         echo "    <div class=\"header-image\">
  55.         <img class=\"img-header-destock\" src=\"";
  56.         // line 5
  57.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("header-image.png""shop"), "html"nulltrue);
  58.         echo "\" alt=\"cover\">
  59.         <img class=\"img-header-responsive\" src=\"";
  60.         // line 6
  61.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("header-image-responsive.png""shop"), "html"nulltrue);
  62.         echo "\" alt=\"cover\">
  63.         <div class=\"text-header\">
  64.                 ";
  65.         // line 9
  66.         if (((isset($context["slug"]) || array_key_exists("slug"$context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.'9$this->source); })()) == null)) {
  67.             // line 10
  68.             echo "                    <h1>Boutique</h1>
  69.                     <ul>
  70.                         ";
  71.             // line 12
  72.             $context['_parent'] = $context;
  73.             $context['_seq'] = twig_ensure_traversable($context["taxons"]);
  74.             foreach ($context['_seq'] as $context["_key"] => $context["taxons"]) {
  75.                 // line 13
  76.                 echo "                            <li class=\"link-taxons-header\"><a href=\"";
  77.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env$this->source$context["taxons"], "code", [], "any"falsefalsefalse13)]), "html"nulltrue);
  78.                 echo "\">";
  79.                 echo twig_escape_filter($this->envtwig_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["taxons"], "translations", [], "any"falsefalsefalse13), "toArray", [], "method"falsefalsefalse13), "fr_FR", [], "array"falsefalsefalse13), "name", [], "any"falsefalsefalse13), "html"nulltrue);
  80.                 echo "</a></li>
  81.                         ";
  82.             }
  83.             $_parent $context['_parent'];
  84.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxons'], $context['_parent'], $context['loop']);
  85.             $context array_intersect_key($context$_parent) + $_parent;
  86.             // line 15
  87.             echo "                    </ul>
  88.                 ";
  89.         } elseif ((twig_get_attribute($this->env$this->source,         // line 16
  90. (isset($context["slug"]) || array_key_exists("slug"$context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.'16$this->source); })()), "code", [], "any"falsefalsefalse16) == "categories")) {
  91.             // line 17
  92.             echo "
  93.                     <h1>Boutique</h1>
  94.                     <ul>
  95.                         ";
  96.             // line 20
  97.             $context['_parent'] = $context;
  98.             $context['_seq'] = twig_ensure_traversable($context["taxons"]);
  99.             foreach ($context['_seq'] as $context["_key"] => $context["taxons"]) {
  100.                 // line 21
  101.                 echo "                            <li class=\"link-taxons-header\"><a href=\"";
  102.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env$this->source$context["taxons"], "code", [], "any"falsefalsefalse21)]), "html"nulltrue);
  103.                 echo "\">";
  104.                 echo twig_escape_filter($this->envtwig_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["taxons"], "translations", [], "any"falsefalsefalse21), "toArray", [], "method"falsefalsefalse21), "fr_FR", [], "array"falsefalsefalse21), "name", [], "any"falsefalsefalse21), "html"nulltrue);
  105.                 echo "</a></li>
  106.                         ";
  107.             }
  108.             $_parent $context['_parent'];
  109.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxons'], $context['_parent'], $context['loop']);
  110.             $context array_intersect_key($context$_parent) + $_parent;
  111.             // line 23
  112.             echo "                    </ul>
  113.                 ";
  114.         } else {
  115.             // line 25
  116.             echo "                    <div class=\"title-header\">
  117.                         <h1>";
  118.             // line 26
  119.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["slug"]) || array_key_exists("slug"$context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.'26$this->source); })()), "translations", [], "any"falsefalsefalse26), "toArray", [], "method"falsefalsefalse26), "fr_FR", [], "array"falsefalsefalse26), "name", [], "any"falsefalsefalse26), "html"nulltrue);
  120.             echo "</h1>
  121.                         ";
  122.             // line 27
  123.             $context["ancestors"] = twig_reverse_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["slug"]) || array_key_exists("slug"$context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.'27$this->source); })()), "ancestors", [], "any"falsefalsefalse27));
  124.             // line 28
  125.             echo "                        <a href=\"";
  126.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ancestors"]) || array_key_exists("ancestors"$context) ? $context["ancestors"] : (function () { throw new RuntimeError('Variable "ancestors" does not exist.'28$this->source); })()), 0, [], "array"falsefalsefalse28), "code", [], "any"falsefalsefalse28)]), "html"nulltrue);
  127.             echo "\">
  128.                             <svg width=\"39\" height=\"29\" viewBox=\"0 0 39 29\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
  129.                                 <path d=\"M14.75 0.25L18.075 3.69375L9.64375 12.125L38.5 12.125V16.875L9.64375 16.875L18.075 25.3063L14.75 28.75L0.499995 14.5L14.75 0.25Z\" fill=\"white\"/>
  130.                             </svg>
  131.                         </a>
  132.                     </div>
  133.                     <ul>
  134.                         ";
  135.             // line 35
  136.             $context['_parent'] = $context;
  137.             $context['_seq'] = twig_ensure_traversable((isset($context["taxons"]) || array_key_exists("taxons"$context) ? $context["taxons"] : (function () { throw new RuntimeError('Variable "taxons" does not exist.'35$this->source); })()));
  138.             foreach ($context['_seq'] as $context["_key"] => $context["taxon"]) {
  139.                 // line 36
  140.                 echo "                            ";
  141.                 if ((twig_get_attribute($this->env$this->source$context["taxon"], "code", [], "any"falsefalsefalse36) == twig_get_attribute($this->env$this->source, (isset($context["slug"]) || array_key_exists("slug"$context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.'36$this->source); })()), "code", [], "any"falsefalsefalse36))) {
  142.                     // line 37
  143.                     echo "
  144.                             ";
  145.                 } else {
  146.                     // line 39
  147.                     echo "                                <li class=\"link-taxons-header\"><a href=\"";
  148.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env$this->source$context["taxon"], "code", [], "any"falsefalsefalse39)]), "html"nulltrue);
  149.                     echo "\">";
  150.                     echo twig_escape_filter($this->envtwig_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["taxon"], "translations", [], "any"falsefalsefalse39), "toArray", [], "method"falsefalsefalse39), "fr_FR", [], "array"falsefalsefalse39), "name", [], "any"falsefalsefalse39), "html"nulltrue);
  151.                     echo "</a></li>
  152.                             ";
  153.                 }
  154.                 // line 41
  155.                 echo "                        ";
  156.             }
  157.             $_parent $context['_parent'];
  158.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxon'], $context['_parent'], $context['loop']);
  159.             $context array_intersect_key($context$_parent) + $_parent;
  160.             // line 42
  161.             echo "                    </ul>
  162.                 ";
  163.         }
  164.         // line 44
  165.         echo "        </div>
  166.     </div>
  167.     <div class=\"container-h\" id=\"container-category-page\">
  168.         ";
  169.         // line 47
  170.         $this->loadTemplate("@SyliusShop/Product/Index/_header.html.twig""@SyliusShop/Product/index.html.twig"47)->display($context);
  171.         // line 48
  172.         echo "
  173.         <div class=\"ui stackable grid\">
  174.             <div class=\"four wide column\" id=\"filtre-container\">
  175.                 <div class=\"header-filter-responsive\">
  176.                     <h3 class=\"title-category-page\">Boutique</h3>
  177.                     <i class=\"x icon\" id=\"close-icon-filter\"></i>
  178.                 </div>
  179.                 ";
  180.         // line 55
  181.         $this->loadTemplate("@SyliusShop/Product/Index/_sidebar.html.twig""@SyliusShop/Product/index.html.twig"55)->display($context);
  182.         // line 56
  183.         echo "                <form method=\"POST\" action=\"";
  184.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => "categories"]);
  185.         echo "\" class=\"form_category_index\">
  186.                 ";
  187.         // line 57
  188.         $this->loadTemplate("@SyliusShop/Product/Index/pricebar.html.twig""@SyliusShop/Product/index.html.twig"57)->display($context);
  189.         // line 58
  190.         echo "                ";
  191.         $this->loadTemplate("@SyliusShop/Product/Index/colorbar.html.twig""@SyliusShop/Product/index.html.twig"58)->display($context);
  192.         // line 59
  193.         echo "                ";
  194.         $this->loadTemplate("@SyliusShop/Product/Index/sizebar.html.twig""@SyliusShop/Product/index.html.twig"59)->display($context);
  195.         // line 64
  196.         echo "
  197.                     <button type=\"submit\" class=\"submit-button-filter\">Rechercher</button>
  198.                 </form>
  199.             </div>
  200.             <div class=\"twelve wide column\" id=\"main-index-product\">
  201.                 ";
  202.         // line 69
  203.         $this->loadTemplate("@SyliusShop/Product/Index/_main.html.twig""@SyliusShop/Product/index.html.twig"69)->display($context);
  204.         // line 70
  205.         echo "            </div>
  206.         </div>
  207.     </div>
  208.     <script>
  209.       function toggleDiv(divClass, toggleBtnClass) {
  210.         // Sélectionnez la div avec la classe donnée
  211.         const div = document.querySelector(`.\${divClass}`);
  212.         // Sélectionnez le bouton à basculer avec la classe donnée
  213.         const toggleBtn = document.querySelector(`.\${toggleBtnClass}`);
  214.         // Ajoutez un gestionnaire d'événements au clic sur le bouton à basculer
  215.         // toggleBtn.addEventListener('click', () => {
  216.           // Changez le style de la div pour la masquer ou l'afficher
  217.           div.style.display = (div.style.display === 'none') ? 'block' : 'none';
  218.           // Changez le texte du bouton à basculer en fonction de l'état de la div
  219.           toggleBtn.textContent = (div.style.display === 'none') ? '+' : '-';
  220.         // });
  221.       }
  222.     </script>
  223. ";
  224.         
  225.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  226.         
  227.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  228.     }
  229.     public function getTemplateName()
  230.     {
  231.         return "@SyliusShop/Product/index.html.twig";
  232.     }
  233.     public function isTraitable()
  234.     {
  235.         return false;
  236.     }
  237.     public function getDebugInfo()
  238.     {
  239.         return array (  220 => 70,  218 => 69,  211 => 64,  208 => 59,  205 => 58,  203 => 57,  198 => 56,  196 => 55,  187 => 48,  185 => 47,  180 => 44,  176 => 42,  170 => 41,  162 => 39,  158 => 37,  155 => 36,  151 => 35,  140 => 28,  138 => 27,  134 => 26,  131 => 25,  127 => 23,  116 => 21,  112 => 20,  107 => 17,  105 => 16,  102 => 15,  91 => 13,  87 => 12,  83 => 10,  81 => 9,  75 => 6,  71 => 5,  68 => 4,  58 => 3,  35 => 1,);
  240.     }
  241.     public function getSourceContext()
  242.     {
  243.         return new Source("{% extends '@SyliusShop/layout.html.twig' %}
  244. {% block content %}
  245.     <div class=\"header-image\">
  246.         <img class=\"img-header-destock\" src=\"{{ asset('header-image.png', 'shop') }}\" alt=\"cover\">
  247.         <img class=\"img-header-responsive\" src=\"{{ asset('header-image-responsive.png', 'shop') }}\" alt=\"cover\">
  248.         <div class=\"text-header\">
  249.                 {% if slug == null %}
  250.                     <h1>Boutique</h1>
  251.                     <ul>
  252.                         {% for taxons in taxons %}
  253.                             <li class=\"link-taxons-header\"><a href=\"{{ path('sylius_shop_product_index', {slug : taxons.code}) }}\">{{ taxons.translations.toArray()['fr_FR'].name }}</a></li>
  254.                         {% endfor %}
  255.                     </ul>
  256.                 {% elseif slug.code == 'categories' %}
  257.                     <h1>Boutique</h1>
  258.                     <ul>
  259.                         {% for taxons in taxons %}
  260.                             <li class=\"link-taxons-header\"><a href=\"{{ path('sylius_shop_product_index', {slug : taxons.code}) }}\">{{ taxons.translations.toArray()['fr_FR'].name }}</a></li>
  261.                         {% endfor %}
  262.                     </ul>
  263.                 {% else %}
  264.                     <div class=\"title-header\">
  265.                         <h1>{{ slug.translations.toArray()['fr_FR'].name }}</h1>
  266.                         {% set ancestors = slug.ancestors|reverse %}
  267.                         <a href=\"{{ path('sylius_shop_product_index', {slug : ancestors[0].code}) }}\">
  268.                             <svg width=\"39\" height=\"29\" viewBox=\"0 0 39 29\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
  269.                                 <path d=\"M14.75 0.25L18.075 3.69375L9.64375 12.125L38.5 12.125V16.875L9.64375 16.875L18.075 25.3063L14.75 28.75L0.499995 14.5L14.75 0.25Z\" fill=\"white\"/>
  270.                             </svg>
  271.                         </a>
  272.                     </div>
  273.                     <ul>
  274.                         {% for taxon in taxons %}
  275.                             {% if taxon.code == slug.code %}
  276.                             {% else %}
  277.                                 <li class=\"link-taxons-header\"><a href=\"{{ path('sylius_shop_product_index', {slug : taxon.code}) }}\">{{ taxon.translations.toArray()['fr_FR'].name }}</a></li>
  278.                             {% endif %}
  279.                         {% endfor %}
  280.                     </ul>
  281.                 {% endif %}
  282.         </div>
  283.     </div>
  284.     <div class=\"container-h\" id=\"container-category-page\">
  285.         {% include '@SyliusShop/Product/Index/_header.html.twig' %}
  286.         <div class=\"ui stackable grid\">
  287.             <div class=\"four wide column\" id=\"filtre-container\">
  288.                 <div class=\"header-filter-responsive\">
  289.                     <h3 class=\"title-category-page\">Boutique</h3>
  290.                     <i class=\"x icon\" id=\"close-icon-filter\"></i>
  291.                 </div>
  292.                 {% include '@SyliusShop/Product/Index/_sidebar.html.twig' %}
  293.                 <form method=\"POST\" action=\"{{ path('sylius_shop_product_index', {slug : 'categories'}) }}\" class=\"form_category_index\">
  294.                 {% include '@SyliusShop/Product/Index/pricebar.html.twig' %}
  295.                 {% include '@SyliusShop/Product/Index/colorbar.html.twig' %}
  296.                 {% include '@SyliusShop/Product/Index/sizebar.html.twig' %}
  297. {#                {% include '@SyliusShop/Product/Index/statebar.html.twig' %}#}
  298. {#                {% include '@SyliusShop/Product/Index/brandbar.html.twig' %}#}
  299. {#                {% include '@SyliusShop/Product/Index/vendortypebar.html.twig' %}#}
  300. {#                {% include '@SyliusShop/Product/Index/locationbar.html.twig' %}#}
  301.                     <button type=\"submit\" class=\"submit-button-filter\">Rechercher</button>
  302.                 </form>
  303.             </div>
  304.             <div class=\"twelve wide column\" id=\"main-index-product\">
  305.                 {% include '@SyliusShop/Product/Index/_main.html.twig' %}
  306.             </div>
  307.         </div>
  308.     </div>
  309.     <script>
  310.       function toggleDiv(divClass, toggleBtnClass) {
  311.         // Sélectionnez la div avec la classe donnée
  312.         const div = document.querySelector(`.\${divClass}`);
  313.         // Sélectionnez le bouton à basculer avec la classe donnée
  314.         const toggleBtn = document.querySelector(`.\${toggleBtnClass}`);
  315.         // Ajoutez un gestionnaire d'événements au clic sur le bouton à basculer
  316.         // toggleBtn.addEventListener('click', () => {
  317.           // Changez le style de la div pour la masquer ou l'afficher
  318.           div.style.display = (div.style.display === 'none') ? 'block' : 'none';
  319.           // Changez le texte du bouton à basculer en fonction de l'état de la div
  320.           toggleBtn.textContent = (div.style.display === 'none') ? '+' : '-';
  321.         // });
  322.       }
  323.     </script>
  324. {% endblock %}
  325. ""@SyliusShop/Product/index.html.twig""/var/www/Bikers/templates/bundles/SyliusShopBundle/Product/index.html.twig");
  326.     }
  327. }