{%- extends "_layout.html" %}

{%- block content %}

                <div>

                    {{ macros_page.render_breadcrumbs() }}

                    <h2>{{ hawat_current_view.get_view_title() }}</h2>
                    <div class="float-end">
                        {{ macros_page.render_menu_actions() }}
                    </div>
                    <br>
                    <hr>

    {%- if form %}
                    {%- block searchform %}
                    <!-- Search form - BEGIN ---------------------------------->
                    <div class="jumbotron bg-light" style="margin-top: 1em;">
                        <form method="GET" class="form" action="{{ url_for(request.endpoint) }}">
                            {%- block searchformfields %}{% endblock searchformfields %}

                            <hr>

                            <div class="btn-toolbar justify-content-between align-items-center row gy-3" role="toolbar" aria-label="{{ _('Form submission buttons') }}">
                                <div class="order-1 order-sm-2 col-12 col-sm-6 col-md-4">
                                    {{ macros_form.render_form_item_select(g.search_form.sortby) }}
                                </div>
                                <div class="order-2 order-sm-1 col-12 col-sm-6" role="group">
                                    <div class="btn-group">
                                        {{ g.search_form.submit(class_='btn btn-primary') }}
                                        <a role="button" class="btn btn-secondary" href="{{ url_for(request.endpoint) }}">{{ _('Clear') }}</a>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!-- Search form - END ------------------------------------>
                    {% endblock searchform %}

                    {{ macros_site.render_pager(request.endpoint, query_params, pager_index_low, pager_index_high, pager_index_limit) }}
    {%- endif %}

                    {%- block contentinner %}{% endblock contentinner %}

    {%- if form %}
                    {{ macros_site.render_pager(request.endpoint, query_params, pager_index_low, pager_index_high, pager_index_limit) }}
    {%- endif %}

                </div>

{%- endblock content %}
