themes/BootstrapChildTheme/SyliusShopBundle/views/Taxon/_verticalMenu.html.twig line 1

Open in your IDE?
  1. {{ sylius_template_event('sylius.shop.product.index.before_vertical_menu', {'taxon': taxon}) }}
  2. <!--div class="ui fluid vertical menu" {{ sylius_test_html_attribute('vertical-menu') }}>
  3.     {% for child in taxon.enabledChildren %}
  4.         <a href="{{ path('sylius_shop_product_index', {'slug': child.slug, '_locale': child.translation.locale}) }}" class="item parent_name_sidebar" {{ sylius_test_html_attribute('vertical-menu-item') }}>{{ child.name }}</a>
  5.         {% if taxon.children|length %}
  6.         <ul>
  7.             {% for child in child.getChildren %}
  8.             <li><a href="{{ path('sylius_shop_product_index', {'slug': child.slug, '_locale': child.translation.locale}) }}" class="item" {{ sylius_test_html_attribute('vertical-menu-item') }}>{{ child.getName() }}</a></li>
  9.             {% endfor %}
  10.         </ul>
  11.         {% else %}
  12.             <p>No children taxons found.</p>
  13.         {% endif %}
  14.     {% endfor %}
  15.     {% if taxon.parent is not empty and not taxon.parent.isRoot() and taxon.parent.enabled %}
  16.         <a href="{{ path('sylius_shop_product_index', {'slug': taxon.parent.slug, '_locale': taxon.parent.translation.locale}) }}" class="item" {{ sylius_test_html_attribute('vertical-menu-go-level-up') }}>
  17.             <i class="up arrow icon"></i> {{ 'sylius.ui.go_level_up'|trans }}
  18.         </a>
  19.     {% else %}
  20.         <a class="item parent_name_sidebar" href="{{ path('sylius_shop_homepage') }}taxons/catalogue"><p>{{ 'customStrings.menu.catalogue'|trans }}</p></a>
  21.     {% endif %}
  22. </div-->
  23. {{ sylius_template_event('sylius.shop.product.index.after_vertical_menu', {'taxon': taxon}) }}
  24. {% block javascript %}
  25.     <script>
  26.         $(document).ready(function() {
  27.             $(".sidebar-filter .ui.loadable.form").removeClass("loading");
  28.             $('input[type=checkbox]').change(function() {
  29.                 if(this.checked) {
  30.                     $('#searchbarButtons .labeled.button').trigger('click');
  31.                 } else {
  32.                     $('#searchbarButtons .labeled.button').trigger('click');
  33.                 }
  34.             });
  35.             handleFilter();
  36.             $(window).on('resize', function() {
  37.                 handleFilter();
  38.             });
  39.         });
  40.         function handleFilter() {
  41.             if($(window).width() > 767) {
  42.                 $('.filtres_class a').removeClass('collapsed');
  43.                 $('#customDivWrapper').removeClass('collapsed');
  44.                 $('#customDivWrapper').removeClass('collapse');
  45.                 $('#customDivWrapper').addClass('show');
  46.             }else{
  47.                 $('.filtres_class a').addClass('collapsed');
  48.                 $('#customDivWrapper').addClass('collapsed');
  49.                 $('#customDivWrapper').addClass('collapse');
  50.                 $('#customDivWrapper').removeClass('show');
  51.             }
  52.         }
  53.     </script>
  54. {% endblock %}