{% load display_tags %}
{% load i18n %}

{% if paginator.num_pages > 1 %}
    <nav>
        <ul class="pagination justify-content-center">
            {% if page_obj.has_previous %}
                <li class="page-item">
                    <a class="page-link" href="?{% get_parameters 'page' %}page={{ page_obj.previous_page_number }}" tabindex="-1">
                        {% trans "previous" %}
                    </a>
                </li>
            {% endif %}
            <li class="page-item disabled">
                <span class="page-link">
                    {% blocktrans with page_num=page_obj.number total_pages=paginator.num_pages %}
                        Page {{ page_num }} of {{ total_pages }}
                    {% endblocktrans %}
                </span>
            </li>
            {% if page_obj.has_next %}
                <li class="page-item">
                    <a class="page-link" href="?{% get_parameters 'page' %}page={{ page_obj.next_page_number }}">
                        {% trans "next" %}
                    </a>
                </li>
            {% endif %}
        </ul>
    </nav>
{% endif %}
