mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-01 08:54:37 +00:00
Better pagination in admin
This commit is contained in:
parent
26a7b635b7
commit
f21123dadd
2 changed files with 5 additions and 6 deletions
|
@ -74,6 +74,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<form id="changelist-form" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
|
<form id="changelist-form" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
|
||||||
|
{% block pagination_up %}{% pagination cl %}{% endblock %}
|
||||||
{% if cl.formset %}
|
{% if cl.formset %}
|
||||||
<div>{{ cl.formset.management_form }}</div>
|
<div>{{ cl.formset.management_form }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{# Please keep this template in sync with django/contrib/admin one #}
|
{# Please keep this template in sync with django/contrib/admin one #}
|
||||||
{% load admin_list %}
|
{% load admin_list %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
<ul class="paginator pagination">
|
|
||||||
{% if pagination_required %}
|
{% if pagination_required %}
|
||||||
|
<ul class="paginator pagination">
|
||||||
{% for i in page_range %}
|
{% for i in page_range %}
|
||||||
{% paginator_number cl i %}
|
<li {% if cl.page_num == i %}class="active"{% endif %}>{% paginator_number cl i %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
<li>{{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}</li>
|
|
||||||
{% if show_all_url %}<li><a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a></li>{% endif %}
|
|
||||||
{% if cl.formset and cl.result_count %}<li><input type="submit" name="_save" class="default" value="{% trans 'Save' %}"/></li>{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% if cl.formset and cl.result_count %}<p><input type="submit" name="_save" class="default" value="{% trans 'Save' %}"/></p>{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue