src/Elements/Bundle/DemiFrontendBundle/Resources/views/List/list.mobile.html.twig line 1

Open in your IDE?
  1. {# @var \Pimcore\Templating\GlobalVariables app #}
  2.  {# @var \Elements\Bundle\DemiFrontendBundle\Templating\Helper\Filter demiFilterHelper #}
  3.  {# @var \Elements\Demi\Accommodation\Search\Parameter searchParam #}
  4.  {# @var \Zend\Paginator\Paginator paginator #}
  5.  {# @var int totalPages #}
  6.  {# @var bool noDate #}
  7.  {# @var boolean editmode #}
  8.  {# @var int minResult
  9.  {# @var bool isPackageSearch #}
  10.  {# @var bool showAlternativeResults #}
  11.  {# @var bool makeAlternativeSearchRequest #}
  12.  {# @var bool availabilityIsChecked #}
  13. {% extends('@ElementsDemiFrontend/Layout/layout.html.twig') %}
  14. {% set params = params is defined ? params : [] %}
  15. {% block content %}
  16.     <script type="text/javascript" data-cookieconsent="ignore">
  17.         {% if not searchParam.getIsAlternative() %}
  18.         _config.makeAlternativeSearchRequest = {{ makeAlternativeSearchRequest == true ? "true" : "false" }};
  19.         _config.showAlternativeResults = false;
  20.         {% endif %}
  21.         {% set nearbySearchJson = '/var/tmp/typeahead/' ~ app.request.getLocale() ~ '/nearbySearch.json' %}
  22.         {% set searchJson = '/var/tmp/typeahead/hotellists' ~ document.getId() ~ '.json' %}
  23.         {% if not demi_improvedFileExists(searchJson, "PIMCORE_WEB_ROOT", '/var') %}
  24.             {% set searchJson = '/var/tmp/typeahead/' ~ app.request.getLocale() ~ '/hotels.json' %}
  25.         {% endif %}
  26.         {% if demi_improvedFileExists(searchJson, "PIMCORE_WEB_ROOT", '/var') %}
  27.         _config.searchAutocompleteUrl = '/cache-buster-{{ demi_getExistingCacheFile(searchJson) }}';
  28.         {% endif %}
  29.         _config.acommodationMapHideBusinesses = {{ demi_core_configuration('getMapHideBusinesses', {}) ? 'true' : 'false' }}
  30.     </script>
  31.     {% do jsConfig("_config").add('noDate', noDate) %}
  32.     <script type="text/javascript" data-cookieconsent="ignore">
  33.         {% if searchParam is not null and searchParam.getOrderRandSeed() is not empty %}
  34.         _config.urlParams = _config.urlParams || [];
  35.         _config.urlParams.push({name: "randSeed", value: "{{ searchParam.getOrderRandSeed() }}"});
  36.         {% endif %}
  37.         _config.historyController = true;
  38.         _config.searchData = true;
  39.         _config.quickfilter = true;
  40.         _config.priceInfo = true;
  41.         {#} JS Object für die Liste Suche #}
  42.         _config.accoList = true;
  43.         _config.accoListUrl = '';
  44.         _config.accoListIsPackageList = {{ isPackageSearch ? 'true': 'false' }};
  45.     </script>
  46.     <main id="main" role="main">
  47.         {% if document.getProperty("demi_housePackageContainer") is not empty or document.getProperty("demi_housePackageMasterSelfAssign") is not empty %}
  48.             {% set listType = document.getProperty("demi_housePackageContainer")?: document.getProperty("demi_housePackageMasterSelfAssign") %}
  49.             {% set hasPackageContainer = true %}
  50.             {{ include('@ElementsDemiFrontend/Includes/elements/package-list-info.mobile.html.twig', { "searchParam":  searchParam, "listType":  listType}) }}
  51.         {% endif %}
  52.         <div>
  53.             <div class="js-search-data__show-if-submitted" {{ availabilityIsChecked ? '' : 'hidden' }}>
  54.                 {{ include('@ElementsDemiFrontend/Includes/ribbon.html.twig', {'searchParam': searchParam,'showBackButton': false, 'withFlag': true}) }}
  55.             </div>
  56.             <div class="js-search-data__hide-if-submitted" {{ availabilityIsChecked ? 'hidden' : '' }}>
  57.                 <div class="container my-3">
  58.                     {% if hasPackageContainer is not defined or not hasPackageContainer %}
  59.                         <h1>{{ pimcore_input('headline') }}</h1>
  60.                     {% endif %}
  61.                     {% if not document.property("demi_hideVacancySearch") %}
  62.                     <button type="button" class="btn btn-success btn-lg btn-block js-overlay__toggle"
  63.                             data-target="#search-overlay">
  64.                         {{ 'demi.list.search-vacancies-button'|trans }}
  65.                     </button>
  66.                     {% endif %}
  67.                 </div>
  68.                 <hr class="hr--bold hr--light mb-2">
  69.             </div>
  70.         </div>
  71.         {{ include('@ElementsDemiFrontend/List/includes/navigation.html.twig') }}
  72.         <hr class="hr--bold hr--light mb-2 mt-2">
  73.         {% if error is not empty%}
  74.             {{ include('@ElementsDemiFrontend/Checkout/includes/error-container.html.twig', {'error':  error, 'styleModifier':  'mb-0', 'isList':  true}) }}
  75.             <hr class="hr--bold hr--light mb-2 mt-2">
  76.         {% endif %}
  77.         <div class="js-acco-list__hide-if-no-results">
  78.             <div class="js-quick-filter" hidden>
  79.                 <section class="container text-center">
  80.                     <div class="js-quick-filter__list"></div>
  81.                 </section>
  82.                 <hr class="hr--bold hr--light mb-3 mt-2">
  83.             </div>
  84.         </div>
  85.         <div class="acco-list js-acco-list" role="alert" aria-live="assertive">
  86.             <div class="text-center my-5 js-acco-list__loading" hidden>
  87.                 {{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig') }}
  88.             </div>
  89.             <div class="js-acco-list__content">
  90.                 {# Wenn kein Ajax loading #}
  91.                 {{ include('@ElementsDemiFrontend/List/list-content.html.twig', { 'accommodationPaginator':  paginator, 'isPackageSearch':  isPackageSearch }) }}
  92.             </div>
  93.         </div>
  94.         <div class="js-acco-list__hide-if-few-results">
  95.             <hr class="hr--bold hr--light my-3">
  96.             {{ include('@ElementsDemiFrontend/List/includes/navigation.html.twig') }}
  97.         </div>
  98.         {# Preis info #}
  99.         {{ include('@ElementsDemiFrontend/Includes/elements/price-info.html.twig',{"searchParameter": searchParam }) }}
  100.         {# Alternative Suchergebnisse wenn in der oberen Liste zu wenig gefunden wurde. #}
  101.         {{ include('@ElementsDemiFrontend/List/includes/acco-list-alternative-search.html.twig') }}
  102.         {% do elements_head_meta().setDescription( pimcore_wysiwyg('description'), false ) %}
  103.         <section
  104.                 class="text-muted text-center js-search-data__hide-if-submitted" {{ availabilityIsChecked ? 'hidden' : '' }}>
  105.             <hr class="hr--bold hr--light my-3">
  106.             {{ pimcore_wysiwyg('description') }}
  107.         </section>
  108.     </main>
  109.     <aside>
  110.         {% set  contactSnippet = demi_core_configuration("getContactSnippet",[]) %}
  111.         {% if contactSnippet is not empty %}
  112.             <hr class="hr--bold hr--light my-3">
  113.             {{ pimcore_inc(contactSnippet) }}
  114.         {% endif %}
  115.     </aside>
  116.     {{ include('@ElementsDemiFrontend/Includes/overlays/search.html.twig', {
  117.         'filterSnippet':  pimcore_relation('filterSnippet').getData(),
  118.         'searchParam':  searchParam,
  119.         'noDate':  noDate,
  120.         'isSearch':  true,
  121.         'isPackageSearch':  isPackageSearch,
  122.         'showMoreOptions':  not pimcore_relation('filterSnippet').empty ? demi_showMoreFilterOptions(pimcore_relation('filterSnippet').getElement())
  123.     }) }}
  124.     {{ include('@ElementsDemiFrontend/Includes/overlays/filter.html.twig', {
  125.         'filterSnippet':  pimcore_relation('filterSnippet').getData(),
  126.         'searchParam':  searchParam,
  127.         'noDate':  noDate,
  128.         'isPackageSearch':  isPackageSearch
  129.     }) }}
  130. {% endblock %}