{% extends '@openform_front_templates/base.html.twig' %}
{% block bodyAttr %}news-list-body{% endblock %}
{% set pageSubTitle = entity.Translation[app.request.locale].title %}
{% set metaTitle = entity.Translation[app.request.locale].metaTitle ? entity.Translation[app.request.locale].metaTitle : entity.Translation[app.request.locale].title %}
{% set metaDescription = entity.Translation[app.request.locale].metaDescription %}
{% set metaKeywords = entity.Translation[app.request.locale].metaKeywords %}
{% set pageImage = entity.imagePath ? openform_front_util.getImagePathByType(entity.Thumb,'list') : '' %}
{% block content %}
{% set mobile = openform_front_util.isMobileDevice() %}
{% if mobile %}
<h1 class="index-news__title--mobile">{{ ('T_' ~ entity.idname|upper ~ '_TITLE')|trans({}, 'openform_front', app.request.locale) }}</h1>
{% endif %}
{% 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) : '' } %}
<section class="index-news mak" data-page_idname="{{ entity.idname }}">
<div class="index-news__wrapper index-news__wrapper--exh js-list-data container">
{% if mobile %}
{% else %}
<h1 class="index-news__title--desktop">{{ ('T_' ~ entity.idname|upper ~ '_TITLE')|trans({}, 'openform_front', app.request.locale) }}</h1>
{% endif %}
<div class="index-news__filters index-news__filters--exh js-filters">
<div class="select select--exh">
<label for="sort">{{ 'T_SORT'|trans({}, 'openform_front', app.request.locale) }}</label>
<select class="js-sort" id="sort">
<option value="1">Po dacie dodania - malejąco</option>
<option value="2">Po dacie dodania - rosnąco</option>
<option value="3">Alfabetycznie A-Z</option>
<option value="4">Alfabetycznie Z-A</option>
</select>
</div>
</div>
<div class="mak__items js-result-content"
data-url="{{ toolkit_route_localizer.generate('mak_list_filter_ajax', {'makSlug' : makSlug}, app.request.locale) }}">
{% include '@openform_front_templates/Mak/_list.html.twig' with {entities} %}
</div>
{% include "@openform_front_templates/_includes/_pagination.html.twig" with { pages: maxPages } %}
</div>
</section>
{% 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) : '' } %}
{% endblock %}