{% extends "Layout/default.html.twig" %}
{% block content %}
{{ include('Navigation/breadcrumb.html.twig') }}
{{ include('Includes/main-title-block-splitted-editable.html.twig') }}
{{ include('Includes/areablock.html.twig') }}
{% if pimcore_numeric('qs').empty %}
{% do pimcore_numeric('qs').setDataFromResource(70) %}
{% endif %}
{% if editmode %}
<div class="editmode-box editmode-box--info">
<div class="editmode-box__header">
Prefilters
</div>
<strong>Regions</strong> <small>AlpsteinRegion Objects or Region Objects</small> <br>
{{ pimcore_relations('regions', {'types': ['object'], 'subtypes': ['object'], 'classes': ['AlpsteinRegion', 'Region']}) }}
<br>
<strong>TourType</strong> <small>AlpsteinCategory Objects</small>
{{ pimcore_relations('categories', {'types': ['object'], 'subtypes': ['object'], 'classes': ['AlpsteinCategory']}) }}
<br>
<div class="row">
<div class="col-md-2">
<strong>Minimum Quality Score</strong>
{{ pimcore_numeric('qs', {
"minValue" : 0,
"maxValue" : 100,
"decimalPrecision" : 0
}) }}
</div>
<div class="col-md-2">
<strong>Sorting:</strong><br>
{{ pimcore_select("tour_sorting", {
"store": [
["", "no sorting"],
["opened DESC", "Opened First"],
["opened ASC", "Closed First"]
],
"defaultValue" : ""
}) }}
</div>
</div>
<br>
<div class="editmode-box__header">
PropertyFilter
</div>
<strong>TourProperty</strong> <small>AlpsteinProperty Objects</small>
{{ pimcore_relations('properties', {'types': ['object'], 'subtypes': ['object'], 'classes': ['AlpsteinProperty']}) }}
</div>
{% endif %}
<div class="pimcore_area_content">
<div class="container content-block">
<div class="js-ajax-form" data-ajax-form-add-url-params="true">
<div aria-live="polite">
<div class="content-block">
<div class="filter-overlay js-overlay" id="filterOverlay">
<div class="filter-overlay__head font-default-bold text-uppercase d-flex align-items-center d-md-none">
{{ 'tour-overview.Filter'|trans }}
<button type="button" data-target="filterOverlay" class="btn btn-no-styling text-white js-overlay-toggle d-md-none ml-auto filter-overlay__head__close">
<span class="icon icon-close" aria-label="{{ 'sr.close'|trans }}" title="{{ 'sr.close'|trans }}"></span>
</button>
</div>
<div class="filter-overlay__content">
<form action="/404"
data-action="{{ app.request.pathInfo }}"
class="js-ajax-form__form">
<div class="row justify-content-center">
{% if community|default(false) is instanceof('\\Pimcore\\Model\\DataObject\\Community') %}
<div class="col-md">
{% set default = [
{
"label": '',
"value": ''
}, {
"label": community.name,
"value": community.id,
"selected": true
}] %}
{{ include('Form/Includes/select.html.twig', {
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
id: "community",
name: "community",
label: 'tour-overview.Community'|trans,
styleModifier: 'form-group--lg',
options: default
}) }}
</div>
{% elseif pimcore_relations('regions').empty %}
<div class="col-md">
{% set default = [{
"label": "",
"value": ""
}] %}
{{ include('Form/Includes/select.html.twig', {
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
id: "tourRegion",
name: "tourRegion",
label: 'tour-overview.Regionen'|trans,
styleModifier: 'form-group--lg',
options: default|merge(filterData['regions'] | map( x => {
"label": x['name'],
"value": x['id'],
"selected": app.request.get('tourRegion') == x['id'],
"class": ""
}))
}) }}
</div>
{% endif %}
{% if pimcore_relations('categories').empty or filterData.childCategories|default([]) is not empty %}
<div class="col-md">
{% set default = [{
"label": "",
"value": ""
}] %}
{{ include('Form/Includes/select.html.twig', {
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
id: "tourCategory",
name: "tourCategory",
label: 'tour-overview.Art der Tour'|trans,
styleModifier: 'form-group--lg',
options: default|merge((filterData.childCategories|default([]) is not empty ? filterData.childCategories : filterData['categories']) | map( x => {
"label": x.name,
"value": x.id,
"selected": app.request.get('tourCategory') == x.id,
"class": ""
}))
}) }}
</div>
{% endif %}
{% if not pimcore_relations('properties').empty %}
<div class="col-md">
{% set default = [{
"label": "",
"value": ""
}] %}
{{ include('Form/Includes/select.html.twig', {
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
id: "tourProperty",
name: "tourProperty",
label: 'tour-overview.Tour Property'|trans,
styleModifier: 'form-group--lg',
options: default|merge(pimcore_relations('properties').data|filter(x => x.name is not empty) | map( x => {
"label": x.name,
"value": x.id,
"selected": app.request.get('tourProperty') == x.id,
"class": ""
}))
}) }}
</div>
{% endif %}
<div class="col-md">
{{ include('Form/Includes/select.html.twig', {
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
id: "tourDifficulty",
name: "tourDifficulty",
label: 'tour-overview.Schwierigkeit'|trans,
styleModifier: 'form-group--lg',
options: [
{
"label": "",
"value": ""
}, {
"label": 'tour-overview.leicht'|trans,
"value": "1",
"selected": app.request.get('tourDifficulty') == "1",
"class": ""
}, {
"label": 'tour-overview.mittel'|trans,
"value": "2",
"selected": app.request.get('tourDifficulty') == "2",
"class": ""
}, {
"label": 'tour-overview.schwer'|trans,
"value": "3",
"selected": app.request.get('tourDifficulty') == "3",
"class": ""
}
]
}) }}
</div>
<div class="col-md">
{{ include('Form/Includes/form-control.html.twig', {
inputModifier: 'js-floating-label',
inputWrapperModifier: 'position-relative',
labelModifier: 'floating-label',
label: 'tour-overview.Stichwortsuche'|trans,
styleModifier: 'form-group--lg',
id: 'tourKeyword',
name: 'tourKeyword',
value: app.request.get('tourKeyword')
}) }}
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-4">
{{ include('Form/Includes/range-slider.html.twig', {
label: 'tour-overview.Länge in km'|trans,
max: filterData['length']['max']|default(0.0),
name: 'rangeLength',
prefix: 'km',
styleModifier: 'form-group--lg',
minVal: app.request.get('rangeLengthMin', 0.0),
maxVal: app.request.get('rangeLengthMax', filterData['length']['max']|default(0.0))
}) }}
</div>
<div class="col-md-4">
{{ include('Form/Includes/range-slider.html.twig', {
label: 'tour-overview.Dauer in h'|trans,
max: filterData['duration']['max']|default(0.0),
name: 'duration',
prefix: 'h',
styleModifier: 'form-group--lg',
minVal: app.request.get('durationMin', 0.0),
maxVal: app.request.get('durationMax', filterData['duration']['max']|default(0.0))
}) }}
</div>
<div class="col-md-4">
{{ include('Form/Includes/range-slider.html.twig', {
label: 'tour-overview.Höhenmeter'|trans,
max: filterData['altitude']['max']|default(0.0),
name: 'altitude',
prefix: 'm',
styleModifier: 'form-group--lg',
minVal: app.request.get('altitudeMin', 0.0),
maxVal: app.request.get('altitudeMax', filterData['altitude']['max']|default(0.0))
}) }}
</div>
</div>
<div class="d-flex justify-content-center">
{{ include('Form/Includes/checkbox.html.twig', {
id: 'publicTransportFriendly',
name: 'publicTransportFriendly',
label: '<span class="icon icon-traffic mr-2" aria-label="mit Bus erreichbar" data-toggle="tooltip" data-original-title="' ~ 'tour.mit Bus erreichbar'|trans ~ '"></span>' ~ ('tour-overview.Public Transport Friendly'|trans),
}) }}
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary-light">{{ 'tour-ovierview.Ergebnisse anzeigen'|trans }}</button>
<div class="mt-3">
<a href="#" class="text-primary-light text-underline js-ajax-form__reset">{{ 'tour-ovierview.Filter zurücksetzen'|trans }}</a>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="content-block">
<div class="js-ajax-form__notifications mb-3" hidden></div>
<div class="js-ajax-form__error-area mb-3" hidden>
<button class="js-ajax-form__retry btn btn-info ml-2">{{ 'tour-ovierview.Retry'|trans }}</button>
</div>
{{ include('Includes/loading-overlay.html.twig', {styleModifier: 'js-ajax-form__loading'}) }}
<div class="js-ajax-form__result">
{{ include('Tour/container.html.twig', {'tourListing': tourListing}) }}
</div>
</div>
</div>
</div>
</div>
</div>
{{ include('Includes/areablock.html.twig', {'areaName': 'bottomContent'}) }}
{% endblock %}
{% block javascripts %}
{% if not app.request.get('onlyInlineCss') %}
{{ include('Layout/includes/encore.html.twig', {
'staticDebugMode': staticDebugMode,
'file': 'js/tour'
}) }}
{% endif %}
{% endblock %}