templates/InteractiveMap/filter.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     <div class="editmode-box editmode-box--info">
  3.         <div class="editmode-box__header">
  4.             Region Prefilter
  5.         </div>
  6.         {{ pimcore_relation('region', {width: 500, 'types': ['object'], 'subtypes': ['object'], 'classes': ['Region']}) }}
  7.     </div>
  8.     <div class="editmode-box editmode-box--info">
  9.         <div class="editmode-box__header">
  10.             Excursion Infrastructure Topics
  11.         </div>
  12.         {{ pimcore_relations('excursionTopics', {'types': ['object'], 'subtypes': ['object'], 'classes': ['demiInfrastructureTopic']}) }}
  13.     </div>
  14.     <div class="editmode-box editmode-box--info">
  15.         <div class="editmode-box__header">
  16.             Culinary Infrastructure Topics
  17.         </div>
  18.         {{ pimcore_relations('culinaryTopics', {'types': ['object'], 'subtypes': ['object'], 'classes': ['demiInfrastructureTopic']}) }}
  19.     </div>
  20.     <div class="editmode-box editmode-box--info">
  21.         <div class="editmode-box__header">
  22.             Infrastructure Topics
  23.         </div>
  24.         {{ pimcore_relations('infraTopics', {'types': ['object'], 'subtypes': ['object'], 'classes': ['demiInfrastructureTopic']}) }}
  25.     </div>
  26.     <div class="editmode-box editmode-box--info">
  27.         <div class="editmode-box__header">
  28.             Transit Infrastructure Topics
  29.         </div>
  30.         {{ pimcore_relations('transitTopics', {'types': ['object'], 'subtypes': ['object'], 'classes': ['demiInfrastructureTopic']}) }}
  31.     </div>
  32. {% endif %}
  33. <div class="interactive-map-filter is-open" id="interactive-map__filter-overlay">
  34.     <button type="button" aria-label="{{ 'sr.Filter öffnen'|trans }}" title="{{ 'sr.Filter öffnen'|trans }}"
  35.             class="js-overlay-toggle interactive-map__filter-button"
  36.             data-target="interactive-map__filter-overlay"
  37.             aria-haspopup="true" aria-expanded="true">
  38.         <span class="icon icon-arrow-left" aria-hidden="true"></span>
  39.     </button>
  40.     <div class="interactive-map-filter__content scrolling-area">
  41.         <div class="">
  42.             <form action="{{ path('im_selected-filter', {'docId': document.id}) }}"
  43.                   class="js-ajax-form-map-google__form  js-ajax-form__form">
  44.                 <input type="hidden" class="js-ajax-form-map-google__location-lat" name="location-lat" value="{{ app.request.get('location-lat') }}">
  45.                 <input type="hidden" class="js-ajax-form-map-google__location-lng" name="location-lng" value="{{ app.request.get('location-lng') }}">
  46.                 <div class="text-center mb-5">
  47.                     <div class="h6">{{ 'im.Ergebnisse'|trans }}</div>
  48.                     <div class="h2">{{ 'im.Filter'|trans }}</div>
  49.                 </div>
  50.                 {{ include('Form/Includes/search-form-control.html.twig', {
  51.                     inputModifier: 'js-floating-label js-ajax-form-map-google__search-input',
  52.                     inputWrapperModifier: 'position-relative',
  53.                     labelModifier: 'floating-label',
  54.                     label: 'im.Suche im Umkreis von Adresse'|trans,
  55.                     name: 'search',
  56.                     id: 'searchInput',
  57.                     styleModifier: 'mb-3',
  58.                     value: app.request.get('search'),
  59.                     required: false
  60.                 }) }}
  61.                 {#{% set default = [{
  62.                     "label": "",
  63.                     "value": "",
  64.                     "disabled": true,
  65.                     "selected": true,
  66.                     "class": "sr-only"
  67.                 }] %}
  68.                 {{ include('Form/Includes/select.html.twig', {
  69.                     inputModifier: "js-floating-label",
  70.                     labelModifier: "floating-label",
  71.                     inputWrapperModifier: "select__input-wrapper position-relative",
  72.                     id: "region",
  73.                     name: "region",
  74.                     required: false,
  75.                     styleModifier: 'mb-3',
  76.                     label: 'im.Region'|trans,
  77.                     options: default|merge(getRegionsArray()|map(x =>
  78.                         {
  79.                             "label": x.name,
  80.                             "value": x.id,
  81.                             "class": "",
  82.                             'selected': x.id == app.request.get('region', false)
  83.                         }
  84.                     ))
  85.                 }) }}#}
  86.                 {{ include('InteractiveMap/Partials/filter-dropdown.html.twig', {
  87.                     id: 'filterDropdownExcursion',
  88.                     inputModifier: '',
  89.                     inputWrapperModifier: 'position-relative',
  90.                     labelModifier: 'floating-label',
  91.                     label: 'im.Ausflugsziele und Sehenswürdigkeiten'|trans,
  92.                     required: false,
  93.                     styleModifier: 'mb-3',
  94.                     iconType: 'sightseeing',
  95.                     options: pimcore_relations('excursionTopics').elements|map(x => {
  96.                         "name": "excursionFilter[]",
  97.                         "id": "option" ~ x.id,
  98.                         "value": x.id,
  99.                         "label": x.name,
  100.                         'checked': x.id in app.request.get('excursionFilter', [])
  101.                     })
  102.                 }) }}
  103.                 {{ include('InteractiveMap/Partials/filter-dropdown.html.twig', {
  104.                     id: 'filterDropdownCulinary',
  105.                     inputModifier: '',
  106.                     inputWrapperModifier: 'position-relative',
  107.                     labelModifier: 'floating-label',
  108.                     label: 'im.Gastronomie'|trans,
  109.                     required: false,
  110.                     styleModifier: 'mb-3',
  111.                     iconType: 'gastronomy',
  112.                     options: pimcore_relations('culinaryTopics').elements|map(x => {
  113.                         "name": "culinaryFilter[]",
  114.                         "id": "option" ~ x.id,
  115.                         "value": x.id,
  116.                         "label": x.name,
  117.                         'checked': x.id in app.request.get('culinaryFilter', [])
  118.                     })
  119.                 }) }}
  120.                 {{ include('InteractiveMap/Partials/filter-dropdown.html.twig', {
  121.                     id: 'filterDropdownInfrastructure',
  122.                     inputModifier: '',
  123.                     inputWrapperModifier: 'position-relative',
  124.                     labelModifier: 'floating-label',
  125.                     label: 'im.A-Z/Infrastruktur'|trans,
  126.                     required: false,
  127.                     styleModifier: 'mb-3',
  128.                     iconType: 'infrastructure',
  129.                     options: pimcore_relations('infraTopics').elements|map(x => {
  130.                         "name": "infrastructureFilter[]",
  131.                         "id": "option" ~ x.id,
  132.                         "value": x.id,
  133.                         "label": x.name,
  134.                         'checked': x.id in app.request.get('infrastructureFilter', [])
  135.                     })
  136.                 }) }}
  137.                 {{ include('InteractiveMap/Partials/filter-dropdown.html.twig', {
  138.                     id: 'filterDropdownTransit',
  139.                     inputModifier: '',
  140.                     inputWrapperModifier: 'position-relative',
  141.                     labelModifier: 'floating-label',
  142.                     label: 'im.Anreise & Verkehr'|trans,
  143.                     required: false,
  144.                     styleModifier: 'mb-3',
  145.                     iconType: 'traffic',
  146.                     options: pimcore_relations('transitTopics').elements|map(x => {
  147.                         "name": "transitFilter[]",
  148.                         "id": "option" ~ x.id,
  149.                         "value": x.id,
  150.                         "label": x.name,
  151.                         'checked': x.id in app.request.get('transitFilter', [])
  152.                     })
  153.                 }) }}
  154.                 <div class="mt-5 text-center">
  155.                     <button class="btn btn-primary-light" type="submit">{{ 'im.Ergebnisse anzeigen'|trans }}</button>
  156.                     <div class="mt-3">
  157.                         <button class="text-underline btn-no-styling js-ajax-form-map-google__reset" type="reset">{{ 'im.Filter zurücksetzen'|trans }}</button>
  158.                     </div>
  159.                 </div>
  160.             </form>
  161.             <div class="js-ajax-form-map-google__notifications mb-3" hidden></div>
  162.             <div class="js-ajax-form-map-google__error-area mb-3" hidden>
  163.                 <button class="js-ajax-form-map-google__retry btn btn-info ml-2">{{ 'general.Retry'|trans }}</button>
  164.             </div>
  165.             <div class="js-ajax-form-map-google__result">
  166.                 {% if selection|default([]) is not empty %}
  167.                     {{ include('InteractiveMap/selectedFilter.html.twig', {'selection': selection}) }}
  168.                 {% endif %}
  169.             </div>
  170.         </div>
  171.     </div>
  172. </div>