src/Elements/Bundle/DemiFrontendBundle/Resources/views/Snippet/filterSidebar/stars.mobile.html.twig line 1

Open in your IDE?
  1. {% set starsList = pimcore_relations('starsList').getElements() %}
  2. {% set filterTexte = [] %}
  3. {% if starsList is not empty %}
  4.         <li class="mb-3">
  5.             <button class="form-box form-box--collapsible collapsed"
  6.                     type="button"
  7.                     data-toggle="collapse"
  8.                     data-target="#stars-{{ isSearch ? "additional-search" : "filter" }}-overlay"
  9.                     aria-expanded="false"
  10.                     aria-controls="stars-{{ isSearch ? "additional-search" : "filter" }}-overlay">
  11.                 <span class="form-box__label">{{ "demi.filter.stars"|trans }}</span>
  12.                 <span class="form-box__content text-truncate {{ isSearch ? "js-additional-search-overlay" : "js-filter-form" }}__group-label"
  13.                       data-filter-name="stars[]"
  14.                       data-default-text="{{ "demi.filter.all-stars"|trans }}">
  15.                     {{ "demi.filter.all-stars"|trans }}
  16.                 </span>
  17.                 <span class="demi-icon demi-icon-chevron-down form-box__icon" aria-label="{{ "demi.filter.open"|trans }}"></span>
  18.             </button>
  19.             <section id="stars-{{ isSearch ? "additional-search" : "filter" }}-overlay"
  20.                      aria-expanded="false"
  21.                      class="collapse js-collapse-in-viewport">
  22.                 <div class="form-box__detail p-3">
  23.                     <ul class="list-inline list-inline--gutter-6">
  24.                         {% for star in starsList %}
  25.                             {% set paramName = '' %}
  26.                             {% if star is instanceof("Pimcore\\Model\\DataObject\\DemiStars") %}
  27.                                 {% set paramName = 'stars' %}
  28.                                 {% set filterTexte = filterTexte + {
  29.                                     'name' : paramName ~ '[]',
  30.                                     'value' : star.getId(),
  31.                                     'text' : star.getName(),
  32.                                     'label': "demi.filter.stars" |trans
  33.                                 } %}
  34.                                 <li class="list-inline-item">
  35.                                     {{ include('@ElementsDemiFrontend/Includes/elements/buttons/toggle-button.html.twig', {
  36.                                         'type' : 'checkbox',
  37.                                         'text' : star.getName(),
  38.                                         'styleModifier' : 'js-additional-search-overlay__default-input js-filter-form__default-input ',
  39.                                         'name' :  paramName ~ '[]',
  40.                                         'value' : star.getId(),
  41.                                         'hasIcon' : true,
  42.                                         'bubbles' : true
  43.                                     }) }}
  44.                                 </li>
  45.                             {% endif %}
  46.                         {% endfor %}
  47.                     </ul>
  48.                 </div>
  49.             </section>
  50.         </li>
  51. {% endif %}
  52. <script type="text/javascript" data-cookieconsent="ignore">
  53.     _filterTexte = window['_filterTexte'] || [];
  54.     _filterTexte.push.apply( _filterTexte, {{ filterTexte|json_encode|raw }} );
  55. </script>