{% load i18n template_tools %}
{% if is_paginated %}
    <nav>
        <ul class="pagination">
            <li class="disabled">
                <a>
                    {{ page_obj.start_index }}-{{ page_obj.end_index }} / {{ page_obj.paginator.count }}
                </a>
            </li>
        </ul>
        <ul class="pagination">
            {% if page_obj.previous_url %}
                <li>
                    {% if form_id %}
                        <button type="submit" form="{{ form_id }}" name="page" value="{{ page_obj.previous_number }}">
                            <i class="fa fa-chevron-left"></i>
                        </button>
                    {% else %}
                        <a href="?{{ page_obj.previous_url }}">
                            <i class="fa fa-chevron-left"></i>
                        </a>
                    {% endif %}
                </li>
            {% else %}
                <li class="disabled">
                    <a href="">
                        <i class="fa fa-chevron-left"></i>
                    </a>
                </li>
            {% endif %}
            {% if page_obj.next_url %}
                <li>
                    {% if form_id %}
                        <button type="submit" form="{{ form_id }}" name="page" value="{{ page_obj.next_number }}">
                            <i class="fa fa-chevron-right"></i>
                        </button>
                    {% else %}
                        <a href="?{{ page_obj.next_url }}">
                            <i class="fa fa-chevron-right"></i>
                        </a>
                    {% endif %}
                </li>
            {% else %}
                <li class="disabled">
                    <a href="">
                        <i class="fa fa-chevron-right"></i>
                    </a>
                </li>
            {% endif %}
        </ul>
    </nav>
{% endif %}
