{#
/**
* @var \Pimcore\Templating\PhpEngine this
* @var \Pimcore\Templating\PhpEngine view
* @var \Pimcore\Templating\GlobalVariables app
* #
* @var string label
* @var array options
* @var string name
* @var bool showHr
* @var bool hideClasses
* @var string filterId
* @var string idPrefix
*/
#}
<div class="filter-block js-filter-sidebar__item {{ hideClasses ?: '' }}" data-filter-id="{{ filterId is defined ? filterId : '' }}">
<div class="h3 mb-3">{{ label }}</div>
{% if options is defined and name != 'price'%}
<ul class="list-unstyled">
{% for option in options %}
<li class="mb-2">
<div class="row">
<div class="col">
{% if (option['type'] is same as "input") %}
{{ include('@ElementsDemiFrontend/Includes/elements/form-elements/' ~ option['type'] ~ '.html.twig',{
'styleModifier' : option['styleModifier'],
'type' : option['type'],
'text' : option['text'],
'name' : option['name'],
'value' : option['value'],
'label' : option['label'],
'id' : idPrefix ? (idPrefix ~ '-' ~ option['name']): null,
'noBox' : false,
'classModifier' : false
}) }}
{% else %}
{{ include('@ElementsDemiFrontend/Includes/elements/checkboxes/' ~ option['type'] ~ '.html.twig',{
'styleModifier' : option['styleModifier'],
'type' : option['type'],
'text' : option['text'],
'name' : option['name'],
'value' : option['value'],
'label' : option['label'],
'noBox' : false,
'isRequired': false,
'isChecked': false,
'additionalContent' : null
}) }}
{% endif %}
</div>
<div class="col col-auto">
{% if option['noBubbles'] is not defined %}
<span class="small js-filter-form__count" data-id="{{ option['bubblesId'] is defined ? option['bubblesId']:option['value'] }}" title="" aria-label=""></span>
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
{% elseif (price is defined) %}
<script>_config.priceFilterSlider = true;</script>
{% set currency = demi_paymentGetCurrency() %}
<div class="js-price-slider">
<div class="row row--gutter-width-10">
<div class="col">
<label for="filter-price-from" class="sr-only">{{ "demi.filter.price-from" | trans }}</label>
<div class="input-group">
<span class="input-group-addon p-2 text-muted">{{ currency }}</span>
<input type="number" pattern="[0-9]*" id="filter-price-from" name="price-from" placeholder="von" class="form-control text-right pl-0 bg-white js-price-slider__input-min">
</div>
</div>
<div class="col col-auto py-2 ">
-
</div>
<div class="col">
<label for="filter-price-to" class="sr-only">{{ "demi.filter.price-to" | trans }}</label>
<div class="input-group">
<span class="input-group-addon p-2 text-muted">{{ currency }}</span>
<input type="number" pattern="[0-9]*" id="filter-price-to" name="price-to" placeholder="bis" class="form-control text-right pl-0 bg-white js-price-slider__input-max">
</div>
</div>
</div>
<div class="js-price-slider__slider mt-3 mb-2 price-slider-wrapper noUi-extended"></div>
</div>
{% endif %}
{# //data-remove contains a comma separated list with the filter-names it should remove #}
<button type="button" class="btn-no-styling text-primary mt-3 js-filter-form__remove-filter" data-remove="{{ name }}">
<span class="btn__icon demi-icon demi-icon-arrow-left mr-2" aria-hidden="true"></span>{{ 'demi.filter.deselect' | trans }}
</button>
{% if ( showHr is defined and showHr ) %}
<hr class="my-4">
{% endif %}
</div>