src/Package/Openform/Front/Templates/Mak/index.html.twig line 1

Open in your IDE?
  1. {% extends '@openform_front_templates/base.html.twig' %}
  2. {% block bodyAttr %}news-list-body{% endblock %}
  3. {% set pageSubTitle = entity.Translation[app.request.locale].title %}
  4. {% set metaTitle = entity.Translation[app.request.locale].metaTitle ? entity.Translation[app.request.locale].metaTitle : entity.Translation[app.request.locale].title %}
  5. {% set metaDescription = entity.Translation[app.request.locale].metaDescription %}
  6. {% set metaKeywords = entity.Translation[app.request.locale].metaKeywords %}
  7. {% set pageImage = entity.imagePath ? openform_front_util.getImagePathByType(entity.Thumb,'list') : '' %}
  8. {% block content %}
  9.     {% set mobile = openform_front_util.isMobileDevice() %}
  10.     {% if mobile %}
  11.         <h1 class="index-news__title--mobile">{{ ('T_' ~ entity.idname|upper ~ '_TITLE')|trans({}, 'openform_front', app.request.locale) }}</h1>
  12.     {% endif %}
  13.     {% include "@openform_front_templates/_blocks_sections/block.html.twig" with { sections: openform_front_util.getSections(entity)|length > 0 ? openform_front_util.getSections(entity)|slice(0, 1) : '' } %}
  14.     <section class="index-news mak" data-page_idname="{{ entity.idname }}">
  15.         <div class="index-news__wrapper index-news__wrapper--exh js-list-data container">
  16.             
  17.             {% if mobile %}
  18.             {% else %}
  19.                 <h1 class="index-news__title--desktop">{{ ('T_' ~ entity.idname|upper ~ '_TITLE')|trans({}, 'openform_front', app.request.locale) }}</h1>
  20.             {% endif %}
  21.             <div class="index-news__filters index-news__filters--exh js-filters">
  22.                 <div class="select select--exh">
  23.                     <label for="sort">{{ 'T_SORT'|trans({}, 'openform_front', app.request.locale) }}</label>
  24.                     <select class="js-sort" id="sort">
  25.                         <option value="1">Po dacie dodania - malejąco</option>
  26.                         <option value="2">Po dacie dodania - rosnąco</option>
  27.                         <option value="3">Alfabetycznie A-Z</option>
  28.                         <option value="4">Alfabetycznie Z-A</option>
  29.                     </select>
  30.                 </div>
  31.             </div>
  32.             <div class="mak__items js-result-content" 
  33.                     data-url="{{ toolkit_route_localizer.generate('mak_list_filter_ajax', {'makSlug' : makSlug}, app.request.locale) }}">
  34.                 {% include '@openform_front_templates/Mak/_list.html.twig' with {entities} %}
  35.             </div>
  36.             {% include "@openform_front_templates/_includes/_pagination.html.twig" with { pages: maxPages } %}
  37.             
  38.         </div>
  39.     </section>
  40.     {% include "@openform_front_templates/_blocks_sections/block.html.twig" with { sections: openform_front_util.getSections(entity)|length > 0 ? openform_front_util.getSections(entity)|slice(1, openform_front_util.getSections(entity)|length) : '' } %}
  41. {% endblock %}