templates/public/events/home.html.twig line 1

  1. {% extends '/public/public_base.html.twig' %}
  2. {% block body %}
  3.     {% include 'public/events/_header.html.twig' %}
  4.     {% include 'public/events/_slider.html.twig' with { sliderItems: sliderItems } %}
  5.     {% set durationFromValue = app.request.get('durationFrom') %}
  6.     {% set durationToValue = app.request.get('durationTo') %}
  7.     {% set hasActiveFilters =
  8.         search is not empty
  9.         or code is not empty
  10.         or modalidad is not null
  11.         or areaTematica is not null
  12.         or start_from is not empty
  13.         or start_to is not empty
  14.         or (durationFromValue is not null and durationFromValue != (hoursRange.minHours ~ ''))
  15.         or (durationToValue is not null and durationToValue != (hoursRange.maxHours ~ ''))
  16.         or app.request.get('open_inscription')
  17.     %}
  18.     {% set hasResults = view|default('list') == 'calendar'
  19.         ? eventsCalendar|length > 0
  20.         : events.getTotalItemCount > 0
  21.     %}
  22.     <div class="catalogo-wrapper">
  23.             {% include 'public/_flash.html.twig' %}
  24.         <div class="catalogo-layout">
  25.             {% include 'public/events/_filters.html.twig' %}
  26.             <div class="results-panel">
  27.                 {% include 'public/events/_view_switch.html.twig' %}
  28.                 {% if hasResults %}
  29.                     {% if view|default('list') == 'calendar' %}
  30.                         {% include 'public/events/_calendar.html.twig' with { events: eventsCalendar } %}
  31.                     {% else %}
  32.                         {% include 'public/events/_list.html.twig' %}
  33.                     {% endif %}
  34.                 {% else %}
  35.                     {% include 'public/events/_empty_state.html.twig' with { hasActiveFilters: hasActiveFilters } %}
  36.                 {% endif %}
  37.             </div>
  38.         </div>
  39.     </div>
  40.     {% include 'public/events/_footer.html.twig' %}
  41. {% endblock %}