{% if page_obj.num_pages != 1 %}
    <div id="comments-pagination" class="pagination center">
        <a
            href="{% if page_obj.has_previous() %}{{ url_for('author.info', user_id=author.id, comments_page=page_obj.number - 1) }}{% else %}#{% endif %}"
            data-ajax-href="{{ url_for('story_comment.ajax_author_overview', user_id=author.id, page=page_obj.number - 1) }}"
            id="ajax_prev_comment"
            class="btn{% if not page_obj.has_previous() %} hidden{% endif %}">
            ← Новые
        </a>

        <span id="disabled_ajax_pages_comment" class="btn btn-primary">{{ page_obj.number }} / {{ page_obj.num_pages }}</span>

        <a
            href="{% if page_obj.has_next() %}{{ url_for('author.info', user_id=author.id, comments_page=page_obj.number + 1) }}{% else %}#{% endif %}"
            data-ajax-href="{{ url_for('story_comment.ajax_author_overview', user_id=author.id, page=page_obj.number + 1) }}"
            id="ajax_next_comment"
            class="btn{% if not page_obj.has_next() %} hidden{% endif %}">
            Старые →
        </a>

        <input type="hidden" id="num_pages" value="{{ page_obj.num_pages }}" />
    </div>
{% endif %}
