{% extends 'sb_admin/inlines/table_inline.html' %} {% load i18n paginated_inline %} {% block card_content %} {{ block.super }} {% with inline_admin_formset.formset.page as page_obj %}
{{ page_obj.paginator.count }} {% trans 'results' %}
<{% if page_obj.has_previous %}a href="?{% modify_pagination_path request.get_full_path inline_admin_formset.formset.pagination_key page_obj.previous_page_number %}"{% else %}button type="button" disabled{% endif %} class="tabulator-page"> {% if page_obj.number|add:"-5" > 0 %} 1 {% endif %} {% if page_obj.number|add:"-5" > 1 %} {% endif %} {% for page_num in page_obj.paginator.page_range %} {% if page_obj.number == page_num %} {{ page_num }} {% else %} {% if page_num > page_obj.number|add:"-5" and page_num < page_obj.number|add:"5" %} {{ page_num }} {% endif %} {% endif %} {% endfor %} {% if page_obj.number|add:"5" < page_obj.paginator.num_pages %} {% endif %} {% if page_obj.number|add:"4" < page_obj.paginator.num_pages %} {{ page_obj.paginator.num_pages }} {% endif %} <{% if page_obj.has_next %}a href="?{% modify_pagination_path request.get_full_path inline_admin_formset.formset.pagination_key page_obj.next_page_number %}"{% else %}button type="button" disabled{% endif %} class="tabulator-page">
{% endwith %} {% endblock %}