src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/filterSnippet-buttons.desktop.html.twig line 1

Open in your IDE?
  1. {# 
  2. /**
  3.  * @var bool showFilter
  4.  * @var string label
  5.  * @var string content
  6.  * @var string defaultText
  7.  * @var string filterName
  8.  * @var string popoverName
  9.  * @var string filterId
  10.  * @var array filterTexte
  11.  * @var string name
  12.  * @var array options
  13.  * @var bool showHr
  14.  * @var string hideClasses
  15.  * @var bool onlyShowIfSubmitted
  16.  * @var bool isSubmitted
  17.  * @var bool hasIdPrefix
  18.  * @var string filterVal
  19.  * @var bool price
  20.  */ #}
  21. {% if (showFilter is same as 'all' or showFilter is same as 'button') %}
  22.     {{ include('@ElementsDemiFrontend/Includes/elements/filter/filter-button.desktop.html.twig', {
  23.         'label' : label,
  24.         'content' : content,
  25.         'defaultText' : defaultText,
  26.         'filterName' : filterName,
  27.         'popoverName' : popoverName,
  28.         'onlyShowIfSubmitted' : onlyShowIfSubmitted,
  29.         'isSubmitted' : isSubmitted,
  30.         'filterId' : popoverName,
  31.         'filterVal' : filterVal,
  32.         'active' : true,
  33.         'className' : ''
  34.     }) }}
  35. {% endif %}
  36. {%  if (showFilter is same as 'all' or showFilter is same as 'filter') %}
  37.     <script type="text/javascript" data-cookieconsent="ignore">
  38.         _filterTexte = window['_filterTexte'] || [];
  39.         _filterTexte.push.apply(_filterTexte, {{ filterTexte | json_encode | raw }});
  40.     </script>
  41.     <section id="popover-{{popoverName }}" class="filter-box{{onlyShowIfSubmitted ? "js-search-data__show-if-submitted" : "" }}" {{isSubmitted ? '' : 'hidden' }}>
  42.         <div class="filter-box__content">
  43.             {{ include('@ElementsDemiFrontend/Includes/elements/filter/filter-block.desktop.html.twig', {
  44.                 'label' : label,
  45.                 'content' : content,
  46.                 'defaultText' : defaultText,
  47.                 'name' : name,
  48.                 'options' : options,
  49.                 'idPrefix' : hasIdPrefix ? 'popover' : '',
  50.                 'price' : price is defined ? price : false,
  51.                 'showHr' : false,
  52.                 'hideClasses' : '',
  53.                 'filterId' : ''
  54.             }) }}
  55.         </div>
  56.         <div class="filter-box__action">
  57.             <button type="button"
  58.                     class="btn-no-styling filter-box__action-item text-muted js-filter-form__close">{{ 'demi.filter.cancel' | trans }}</button>
  59.             <button type="button"
  60.                     class="btn-no-styling filter-box__action-item text-primary js-filter-form__commit">{{ 'demi.filter.apply' | trans }}</button>
  61.         </div>
  62.     </section>
  63. {% endif %}
  64. {% if (showFilter is same as 'sidebar') %}
  65.     {{ include('@ElementsDemiFrontend/Includes/elements/filter/filter-block.desktop.html.twig', {
  66.         'label' : label,
  67.         'name' : name,
  68.         'options' : options,
  69.         'showHr' : showHr,
  70.         'filterId' : filterId,
  71.         'hideClasses' : hideClasses,
  72.         'idPrefix' : hasIdPrefix ? 'sideBar' : '',
  73.         'price' : price is defined ? price : false,
  74.         'content' : '',
  75.         'defaultText' : '',
  76.     }) }}
  77. {% endif %}