#36516: Pagination and save button layout in the admin changelist footer has
changed.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: changelist, | Triage Stage:
pagination, list_editable | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Antoliny):
* resolution: worksforme =>
* status: closed => new
Comment:
I realize my explanation was a bit lacking.
This issue occurs on the changelist page when list_filter is applied.
When list_filter is active, the .filtered class is added to the parent
element, and this causes .paginator to have width: auto, which results in
the problem.
**[
https://github.com/django/django/blob/main/django/contrib/admin/static/admin/css/changelists.css#L28
changelist.css]**
{{{
.change-list .filtered .results, .change-list .filtered .paginator,
.filtered #toolbar, .filtered div.xfull {
width: auto;
}
}}}
We can either remove `.change-list .filtered .paginator` or add `justify-
content: center`,
but simply removing the existing `.change-list .filtered .paginator`
should be enough :)
Try testing with the
[
https://github.com/django/django/blob/main/tests/admin_views/admin.py#L430
PodcastAdmin]!
{{{
class PodcastAdmin(admin.ModelAdmin):
list_display = ("name", "release_date")
list_editable = ("release_date",)
date_hierarchy = "release_date"
++ list_filter = ("name", "release_date",)
ordering = ("name",)
}}}
--
Ticket URL: <
https://code.djangoproject.com/ticket/36516#comment:5>