var/cache/dev/twig/ec/ec6fc40642eeec22c27a58573909354c.php line 55

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. /* @BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig */
  14. class __TwigTemplate_bbfc55d6946aa784642933365971e666 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""@BitBagSyliusElasticsearchPlugin/Shop/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""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"));
  38.         // line 3
  39.         $this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'3$this->source); })()), [=> "@SyliusUi/Form/theme.html.twig"=> "Context/Shop/ProductCategory/formTheme.html.twig"], true);
  40.         // line 5
  41.         $macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusUi/Macro/messages.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"5)->unwrap();
  42.         // line 6
  43.         $macros["pagination"] = $this->macros["pagination"] = $this->loadTemplate("@SyliusUi/Macro/pagination.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"6)->unwrap();
  44.         // line 1
  45.         $this->parent $this->loadTemplate("@SyliusShop/layout.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"1);
  46.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 8
  53.     public function block_content($context, array $blocks = [])
  54.     {
  55.         $macros $this->macros;
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  60.         // line 9
  61.         echo "    ";
  62.         echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'9$this->source); })()), 'form_start', ["method" => "GET""attr" => ["class" => "ui loadable form""id" => "category-filters-form"]]);
  63.         echo "
  64.     ";
  65.         // line 12
  66.         echo "    ";
  67.         $this->loadTemplate("bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/mobileFilters.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"12)->display(twig_array_merge($context, ["filterForm" => (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'12$this->source); })())]));
  68.         // line 13
  69.         echo "
  70.     <div class=\"ui stackable grid\">
  71.         <div class=\"four wide column\">
  72.             ";
  73.         // line 16
  74.         $this->loadTemplate("@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"16"1283377628")->display(twig_array_merge($context, ["filterForm" =>         // line 17
  75. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'17$this->source); })()), "resetUrl" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_elasticsearch_plugin_shop_list_products", ["slug" => twig_get_attribute($this->env$this->source,         // line 18
  76. (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'18$this->source); })()), "slug", [], "any"falsefalsefalse18), "products" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("products"), "product_category" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_category"), "_locale" => twig_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.'18$this->source); })()), "request", [], "any"falsefalsefalse18), "locale", [], "any"falsefalsefalse18)])]));
  77.         // line 37
  78.         echo "        </div>
  79.         <div class=\"twelve wide column\">
  80.             <h1 class=\"ui header category-page-header\">
  81.                 ";
  82.         // line 40
  83.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'40$this->source); })()), "name", [], "any"falsefalsefalse40), "html"nulltrue);
  84.         echo "
  85.             </h1>
  86.             ";
  87.         // line 42
  88.         echo $this->extensions['BitBag\OpenMarketplace\Component\Core\Common\Twig\RenderBannerExtension']->renderBanner("Context/Shop/Blog/banner.html.twig");
  89.         echo "
  90.             ";
  91.         // line 43
  92.         $this->loadTemplate("Context/Common/Banner/_categoryBanner.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"43)->display($context);
  93.         // line 44
  94.         echo "            <div class=\"sub header expandable-content-container\">
  95.                 <span class=\"expandable-content text-sm\">";
  96.         // line 45
  97.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'45$this->source); })()), "description", [], "any"falsefalsefalse45), "html"nulltrue);
  98.         echo "</span>
  99.             </div>
  100.             <div class=\"ui divider\"></div>
  101.             <div class=\"ui segment product-listing-sorting-bar no-border no-background no-shadow\">
  102.                 <div class=\"ui stackable grid\">
  103.                     <div class=\"eleven wide column no-padding no-border\">
  104.                         ";
  105.         // line 59
  106.         echo "                    </div>
  107.                     <div class=\"five wide column no-padding no-border sorting-buttons\">
  108.                         ";
  109.         // line 61
  110.         $this->loadTemplate("@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_sorting.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"61)->display($context);
  111.         // line 62
  112.         echo "                        ";
  113.         $this->loadTemplate("@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_pagination.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"62)->display($context);
  114.         // line 63
  115.         echo "                    </div>
  116.                 </div>
  117.             </div>
  118.             ";
  119.         // line 67
  120.         if ((twig_length_filter($this->env, (isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'67$this->source); })())) > 0)) {
  121.             // line 68
  122.             echo "                <div class=\"category-products-grid\" id=\"products\">
  123.                     ";
  124.             // line 69
  125.             $context['_parent'] = $context;
  126.             $context['_seq'] = twig_ensure_traversable((isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'69$this->source); })()));
  127.             $context['loop'] = [
  128.               'parent' => $context['_parent'],
  129.               'index0' => 0,
  130.               'index'  => 1,
  131.               'first'  => true,
  132.             ];
  133.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  134.                 $length count($context['_seq']);
  135.                 $context['loop']['revindex0'] = $length 1;
  136.                 $context['loop']['revindex'] = $length;
  137.                 $context['loop']['length'] = $length;
  138.                 $context['loop']['last'] = === $length;
  139.             }
  140.             foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  141.                 // line 70
  142.                 echo "                        ";
  143.                 $this->loadTemplate("@SyliusShop/Product/_box.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"70)->display($context);
  144.                 // line 71
  145.                 echo "                    ";
  146.                 ++$context['loop']['index0'];
  147.                 ++$context['loop']['index'];
  148.                 $context['loop']['first'] = false;
  149.                 if (isset($context['loop']['length'])) {
  150.                     --$context['loop']['revindex0'];
  151.                     --$context['loop']['revindex'];
  152.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  153.                 }
  154.             }
  155.             $_parent $context['_parent'];
  156.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  157.             $context array_intersect_key($context$_parent) + $_parent;
  158.             // line 72
  159.             echo "                </div>
  160.                 <div class=\"ui hidden divider\"></div>
  161.                 ";
  162.             // line 75
  163.             echo twig_call_macro($macros["pagination"], "macro_simple", [(isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'75$this->source); })())], 75$context$this->getSourceContext());
  164.             echo "
  165.             ";
  166.         } else {
  167.             // line 77
  168.             echo "                ";
  169.             echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.no_results_to_display"], 77$context$this->getSourceContext());
  170.             echo "
  171.             ";
  172.         }
  173.         // line 79
  174.         echo "        </div>
  175.     </div>
  176.     <button type=\"submit\" style=\"display: none\">
  177.         <i class=\"search icon\"></i>
  178.         ";
  179.         // line 83
  180.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("bitbag_sylius_elasticsearch_plugin.ui.filter"), "html"nulltrue);
  181.         echo "
  182.     </button>
  183.     ";
  184.         // line 85
  185.         echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'85$this->source); })()), 'form_end', ["render_rest" => false]);
  186.         echo "
  187.     <script>
  188.         window.translations = {
  189.             readMore: \"";
  190.         // line 89
  191.         echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.read_more")), "html"nulltrue);
  192.         echo "\",
  193.             readLess: \"";
  194.         // line 90
  195.         echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.read_less")), "html"nulltrue);
  196.         echo "\"
  197.         };
  198.         document.addEventListener('DOMContentLoaded', () => {
  199.             const form = document.getElementById('category-filters-form');
  200.             if (!form) {
  201.                 return;
  202.             }
  203.             const shouldDisable = (el) => {
  204.                 if (el.disabled) {
  205.                     return false;
  206.                 }
  207.                 if (el.type === 'checkbox' || el.type === 'radio') {
  208.                     return !el.checked;
  209.                 }
  210.                 if (el.tagName === 'SELECT' && el.multiple) {
  211.                     return el.selectedOptions.length === 0;
  212.                 }
  213.                 return el.value === '' || el.value === null;
  214.             };
  215.             form.addEventListener('submit', () => {
  216.                 form.querySelectorAll('input, select, textarea').forEach((el) => {
  217.                     if (shouldDisable(el)) {
  218.                         el.disabled = true;
  219.                     }
  220.                 });
  221.             });
  222.         });
  223.     </script>
  224. ";
  225.         
  226.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  227.         
  228.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  229.     }
  230.     public function getTemplateName()
  231.     {
  232.         return "@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig";
  233.     }
  234.     public function isTraitable()
  235.     {
  236.         return false;
  237.     }
  238.     public function getDebugInfo()
  239.     {
  240.         return array (  214 => 90,  210 => 89,  203 => 85,  198 => 83,  192 => 79,  186 => 77,  181 => 75,  176 => 72,  162 => 71,  159 => 70,  142 => 69,  139 => 68,  137 => 67,  131 => 63,  128 => 62,  126 => 61,  122 => 59,  112 => 45,  109 => 44,  107 => 43,  103 => 42,  98 => 40,  93 => 37,  91 => 18,  90 => 17,  89 => 16,  84 => 13,  81 => 12,  75 => 9,  65 => 8,  54 => 1,  52 => 6,  50 => 5,  48 => 3,  35 => 1,);
  241.     }
  242.     public function getSourceContext()
  243.     {
  244.         return new Source("{% extends '@SyliusShop/layout.html.twig' %}
  245. {% form_theme form with ['@SyliusUi/Form/theme.html.twig', 'Context/Shop/ProductCategory/formTheme.html.twig'] %}
  246. {% import '@SyliusUi/Macro/messages.html.twig' as messages %}
  247. {% import '@SyliusUi/Macro/pagination.html.twig' as pagination %}
  248. {% block content %}
  249.     {{ form_start(form, {'method': 'GET', 'attr': {'class': 'ui loadable form', 'id': 'category-filters-form'}}) }}
  250.     {# Mobile Filter Toggle Button #}
  251.     {% include 'bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/mobileFilters.twig' with {'filterForm': form} %}
  252.     <div class=\"ui stackable grid\">
  253.         <div class=\"four wide column\">
  254.             {% embed 'bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/filters.twig' with {
  255.                 'filterForm': form,
  256.                 'resetUrl': path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, 'products': 'products'|trans, 'product_category': 'product_category'|trans, '_locale': app.request.locale})
  257.             } %}
  258.                 {% block formContent %}
  259.                     {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_filterForm.html.twig' %}
  260.                 {% endblock %}
  261.                 {% block extraFilters %}
  262.                     <div class=\"ui accordion filters-accordion\">
  263.                         <div class=\"title no-padding\">
  264.                             <div class=\"header item\">
  265.                                 {{ 'app.ui.price_range'|trans }}
  266.                                 <i class=\"dropdown icon\" style=\"margin-inline-start: auto;\"></i>
  267.                             </div>
  268.                         </div>
  269.                         <div class=\"content no-padding\">
  270.                             {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_filterPrice.html.twig' %}
  271.                         </div>
  272.                     </div>
  273.                 {% endblock %}
  274.             {% endembed %}
  275.         </div>
  276.         <div class=\"twelve wide column\">
  277.             <h1 class=\"ui header category-page-header\">
  278.                 {{ taxon.name }}
  279.             </h1>
  280.             {{ bitbag_cms_render_banner('Context/Shop/Blog/banner.html.twig') }}
  281.             {% include 'Context/Common/Banner/_categoryBanner.html.twig' %}
  282.             <div class=\"sub header expandable-content-container\">
  283.                 <span class=\"expandable-content text-sm\">{{ taxon.description }}</span>
  284.             </div>
  285.             <div class=\"ui divider\"></div>
  286.             <div class=\"ui segment product-listing-sorting-bar no-border no-background no-shadow\">
  287.                 <div class=\"ui stackable grid\">
  288.                     <div class=\"eleven wide column no-padding no-border\">
  289.                         {# Product search disabled due to performance issues - needs optimization before re-enabling
  290.                         {# <div class=\"ui search max-width-350\" id=\"products-search\">
  291.                             <div class=\"ui fluid left icon input input-bg\">
  292.                                 {{ form_widget(form.name, {'attr': {'placeholder': 'sylius.ui.search', 'class': 'prompt'}}) }}
  293.                                 <i class=\"search icon\"></i>
  294.                             </div>
  295.                         </div> #}
  296.                     </div>
  297.                     <div class=\"five wide column no-padding no-border sorting-buttons\">
  298.                         {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_sorting.html.twig' %}
  299.                         {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_pagination.html.twig' %}
  300.                     </div>
  301.                 </div>
  302.             </div>
  303.             {% if products|length > 0 %}
  304.                 <div class=\"category-products-grid\" id=\"products\">
  305.                     {% for product in products %}
  306.                         {% include '@SyliusShop/Product/_box.html.twig' %}
  307.                     {% endfor %}
  308.                 </div>
  309.                 <div class=\"ui hidden divider\"></div>
  310.                 {{ pagination.simple(products) }}
  311.             {% else %}
  312.                 {{ messages.info('sylius.ui.no_results_to_display') }}
  313.             {% endif %}
  314.         </div>
  315.     </div>
  316.     <button type=\"submit\" style=\"display: none\">
  317.         <i class=\"search icon\"></i>
  318.         {{ 'bitbag_sylius_elasticsearch_plugin.ui.filter'|trans }}
  319.     </button>
  320.     {{ form_end(form, {'render_rest': false}) }}
  321.     <script>
  322.         window.translations = {
  323.             readMore: \"{{ 'app.ui.read_more'|trans|lower }}\",
  324.             readLess: \"{{ 'app.ui.read_less'|trans|lower }}\"
  325.         };
  326.         document.addEventListener('DOMContentLoaded', () => {
  327.             const form = document.getElementById('category-filters-form');
  328.             if (!form) {
  329.                 return;
  330.             }
  331.             const shouldDisable = (el) => {
  332.                 if (el.disabled) {
  333.                     return false;
  334.                 }
  335.                 if (el.type === 'checkbox' || el.type === 'radio') {
  336.                     return !el.checked;
  337.                 }
  338.                 if (el.tagName === 'SELECT' && el.multiple) {
  339.                     return el.selectedOptions.length === 0;
  340.                 }
  341.                 return el.value === '' || el.value === null;
  342.             };
  343.             form.addEventListener('submit', () => {
  344.                 form.querySelectorAll('input, select, textarea').forEach((el) => {
  345.                     if (shouldDisable(el)) {
  346.                         el.disabled = true;
  347.                     }
  348.                 });
  349.             });
  350.         });
  351.     </script>
  352. {% endblock %}
  353. ""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig""/srv/open_marketplace/templates/bundles/BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig");
  354.     }
  355. }
  356. /* @BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig */
  357. class __TwigTemplate_bbfc55d6946aa784642933365971e666___1283377628 extends \Twig\Template
  358. {
  359.     private $source;
  360.     private $macros = [];
  361.     public function __construct(Environment $env)
  362.     {
  363.         parent::__construct($env);
  364.         $this->source $this->getSourceContext();
  365.         $this->blocks = [
  366.             'formContent' => [$this'block_formContent'],
  367.             'extraFilters' => [$this'block_extraFilters'],
  368.         ];
  369.     }
  370.     protected function doGetParent(array $context)
  371.     {
  372.         // line 16
  373.         return "bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/filters.twig";
  374.     }
  375.     protected function doDisplay(array $context, array $blocks = [])
  376.     {
  377.         $macros $this->macros;
  378.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  379.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"));
  380.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  381.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"));
  382.         $this->parent $this->loadTemplate("bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/filters.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"16);
  383.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  384.         
  385.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  386.         
  387.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  388.     }
  389.     // line 20
  390.     public function block_formContent($context, array $blocks = [])
  391.     {
  392.         $macros $this->macros;
  393.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  394.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""formContent"));
  395.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  396.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""formContent"));
  397.         // line 21
  398.         echo "                    ";
  399.         $this->loadTemplate("@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_filterForm.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"21)->display($context);
  400.         // line 22
  401.         echo "                ";
  402.         
  403.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  404.         
  405.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  406.     }
  407.     // line 23
  408.     public function block_extraFilters($context, array $blocks = [])
  409.     {
  410.         $macros $this->macros;
  411.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  412.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""extraFilters"));
  413.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  414.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""extraFilters"));
  415.         // line 24
  416.         echo "                    <div class=\"ui accordion filters-accordion\">
  417.                         <div class=\"title no-padding\">
  418.                             <div class=\"header item\">
  419.                                 ";
  420.         // line 27
  421.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.price_range"), "html"nulltrue);
  422.         echo "
  423.                                 <i class=\"dropdown icon\" style=\"margin-inline-start: auto;\"></i>
  424.                             </div>
  425.                         </div>
  426.                         <div class=\"content no-padding\">
  427.                             ";
  428.         // line 32
  429.         $this->loadTemplate("@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_filterPrice.html.twig""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig"32)->display($context);
  430.         // line 33
  431.         echo "                        </div>
  432.                     </div>
  433.                 ";
  434.         
  435.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  436.         
  437.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  438.     }
  439.     public function getTemplateName()
  440.     {
  441.         return "@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig";
  442.     }
  443.     public function isTraitable()
  444.     {
  445.         return false;
  446.     }
  447.     public function getDebugInfo()
  448.     {
  449.         return array (  496 => 33,  494 => 32,  486 => 27,  481 => 24,  471 => 23,  461 => 22,  458 => 21,  448 => 20,  425 => 16,  214 => 90,  210 => 89,  203 => 85,  198 => 83,  192 => 79,  186 => 77,  181 => 75,  176 => 72,  162 => 71,  159 => 70,  142 => 69,  139 => 68,  137 => 67,  131 => 63,  128 => 62,  126 => 61,  122 => 59,  112 => 45,  109 => 44,  107 => 43,  103 => 42,  98 => 40,  93 => 37,  91 => 18,  90 => 17,  89 => 16,  84 => 13,  81 => 12,  75 => 9,  65 => 8,  54 => 1,  52 => 6,  50 => 5,  48 => 3,  35 => 1,);
  450.     }
  451.     public function getSourceContext()
  452.     {
  453.         return new Source("{% extends '@SyliusShop/layout.html.twig' %}
  454. {% form_theme form with ['@SyliusUi/Form/theme.html.twig', 'Context/Shop/ProductCategory/formTheme.html.twig'] %}
  455. {% import '@SyliusUi/Macro/messages.html.twig' as messages %}
  456. {% import '@SyliusUi/Macro/pagination.html.twig' as pagination %}
  457. {% block content %}
  458.     {{ form_start(form, {'method': 'GET', 'attr': {'class': 'ui loadable form', 'id': 'category-filters-form'}}) }}
  459.     {# Mobile Filter Toggle Button #}
  460.     {% include 'bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/mobileFilters.twig' with {'filterForm': form} %}
  461.     <div class=\"ui stackable grid\">
  462.         <div class=\"four wide column\">
  463.             {% embed 'bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/filters.twig' with {
  464.                 'filterForm': form,
  465.                 'resetUrl': path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, 'products': 'products'|trans, 'product_category': 'product_category'|trans, '_locale': app.request.locale})
  466.             } %}
  467.                 {% block formContent %}
  468.                     {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_filterForm.html.twig' %}
  469.                 {% endblock %}
  470.                 {% block extraFilters %}
  471.                     <div class=\"ui accordion filters-accordion\">
  472.                         <div class=\"title no-padding\">
  473.                             <div class=\"header item\">
  474.                                 {{ 'app.ui.price_range'|trans }}
  475.                                 <i class=\"dropdown icon\" style=\"margin-inline-start: auto;\"></i>
  476.                             </div>
  477.                         </div>
  478.                         <div class=\"content no-padding\">
  479.                             {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_filterPrice.html.twig' %}
  480.                         </div>
  481.                     </div>
  482.                 {% endblock %}
  483.             {% endembed %}
  484.         </div>
  485.         <div class=\"twelve wide column\">
  486.             <h1 class=\"ui header category-page-header\">
  487.                 {{ taxon.name }}
  488.             </h1>
  489.             {{ bitbag_cms_render_banner('Context/Shop/Blog/banner.html.twig') }}
  490.             {% include 'Context/Common/Banner/_categoryBanner.html.twig' %}
  491.             <div class=\"sub header expandable-content-container\">
  492.                 <span class=\"expandable-content text-sm\">{{ taxon.description }}</span>
  493.             </div>
  494.             <div class=\"ui divider\"></div>
  495.             <div class=\"ui segment product-listing-sorting-bar no-border no-background no-shadow\">
  496.                 <div class=\"ui stackable grid\">
  497.                     <div class=\"eleven wide column no-padding no-border\">
  498.                         {# Product search disabled due to performance issues - needs optimization before re-enabling
  499.                         {# <div class=\"ui search max-width-350\" id=\"products-search\">
  500.                             <div class=\"ui fluid left icon input input-bg\">
  501.                                 {{ form_widget(form.name, {'attr': {'placeholder': 'sylius.ui.search', 'class': 'prompt'}}) }}
  502.                                 <i class=\"search icon\"></i>
  503.                             </div>
  504.                         </div> #}
  505.                     </div>
  506.                     <div class=\"five wide column no-padding no-border sorting-buttons\">
  507.                         {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_sorting.html.twig' %}
  508.                         {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_pagination.html.twig' %}
  509.                     </div>
  510.                 </div>
  511.             </div>
  512.             {% if products|length > 0 %}
  513.                 <div class=\"category-products-grid\" id=\"products\">
  514.                     {% for product in products %}
  515.                         {% include '@SyliusShop/Product/_box.html.twig' %}
  516.                     {% endfor %}
  517.                 </div>
  518.                 <div class=\"ui hidden divider\"></div>
  519.                 {{ pagination.simple(products) }}
  520.             {% else %}
  521.                 {{ messages.info('sylius.ui.no_results_to_display') }}
  522.             {% endif %}
  523.         </div>
  524.     </div>
  525.     <button type=\"submit\" style=\"display: none\">
  526.         <i class=\"search icon\"></i>
  527.         {{ 'bitbag_sylius_elasticsearch_plugin.ui.filter'|trans }}
  528.     </button>
  529.     {{ form_end(form, {'render_rest': false}) }}
  530.     <script>
  531.         window.translations = {
  532.             readMore: \"{{ 'app.ui.read_more'|trans|lower }}\",
  533.             readLess: \"{{ 'app.ui.read_less'|trans|lower }}\"
  534.         };
  535.         document.addEventListener('DOMContentLoaded', () => {
  536.             const form = document.getElementById('category-filters-form');
  537.             if (!form) {
  538.                 return;
  539.             }
  540.             const shouldDisable = (el) => {
  541.                 if (el.disabled) {
  542.                     return false;
  543.                 }
  544.                 if (el.type === 'checkbox' || el.type === 'radio') {
  545.                     return !el.checked;
  546.                 }
  547.                 if (el.tagName === 'SELECT' && el.multiple) {
  548.                     return el.selectedOptions.length === 0;
  549.                 }
  550.                 return el.value === '' || el.value === null;
  551.             };
  552.             form.addEventListener('submit', () => {
  553.                 form.querySelectorAll('input, select, textarea').forEach((el) => {
  554.                     if (shouldDisable(el)) {
  555.                         el.disabled = true;
  556.                     }
  557.                 });
  558.             });
  559.         });
  560.     </script>
  561. {% endblock %}
  562. ""@BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig""/srv/open_marketplace/templates/bundles/BitBagSyliusElasticsearchPlugin/Shop/Product/index.html.twig");
  563.     }
  564. }