{% set apply_relations_initial_limit = True %}
{% extends config.KERKO_TEMPLATE_ITEM %}

{%- block metas %}
    {{- super() }}
    {%- include "kerko/_search-metas.html.jinja2" %}
{%- endblock metas %}

{%- block content_header %}
    <div class="my-2 row">
        <h1 class="{% block search_heading_classes %}h3 col-auto mr-auto pr-1 d-inline d-print-none{% endblock %}">
            {{- search_title -}}
        </h1>
        {%- if back_url %}
            <div class="{% block back_link_wrapper_classes %}col-auto ml-auto mb-2 pl-1 text-right d-print-none{% endblock %}">
                <a class="{% block back_btn_classes %}btn btn-primary{% endblock %}" href="{{ back_url }}">
                    <span class="fas fa-arrow-left" aria-hidden="true"></span> {{ _("Return to list of results") }}
                </a>
            </div>
        {%- endif %}
    </div>
{%- endblock content_header %}

{%- block content_inner %}
    {%- block search_criteria %}
        {%- if is_searching %}
            <div class="{% block search_criteria_wrapper_classes %}card breadbox mb-4 d-print-none{% endblock %}">
                <div class="card-body">
                    {%- include "kerko/_breadbox.html.jinja2" %}
                </div>
            </div>
        {%- endif %}
    {%- endblock search_criteria %}
    {%- block search_results %}
        {%- include "kerko/_pager.html.jinja2" %}
        <h2 class="{% block item_heading_classes %}mb-3 clearfix{% endblock %}">
            {{- badges(item, mode='item') -}}
            {{- title|escape -}}
        </h2>
    {%- endblock search_results %}
    {{- super() }}
    {%- include "kerko/_pager.html.jinja2" %}
{%- endblock content_inner %}
