Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12282 closed (fixed)

Admin Actions: No Way to Select All

Reported by: Paul Smith Owned by: Jannis Leidel
Component: contrib.admin Version: master
Severity: Keywords: admin actions change-list
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Admin actions are only performed on items that have been selected in the change list. Users can only perform actions on items that actually appear on the page - items that do not appear in the list because of pagination can't be selected for actions. The Admin does a useful sanity check, and does not put a "Show all" link on the change list when the number of items is above a sane threshold (defined by MAX_SHOW_ALL_ALLOWED, which defaults to 200).

Filters help, and it's possible to raise the MAX_SHOW_ALL_ALLOWED value, but it's still a common - and valid - case that the user may want to perform an action on a set of items larger than a practical MAX_SHOW_ALL_ALLOWED value. And it's tedious to go through multiple pages of items performing actions on each page.

I propose adding something like what happens in GMail. When you've selected all the items on a page, a new link appears that says, "All 50 items on this page are selected. <link>Select all</link> 439 items in Whatever".

Attachments (5)

select-all.png (44.4 KB) - added by Martin Mahner 7 years ago.
admin-selectacross.diff (10.0 KB) - added by Jannis Leidel 7 years ago.
Working example, from http://github.com/jezdez/django/tree/admin-selectacross
select-across.mp4 (192.9 KB) - added by Jannis Leidel 7 years ago.
Current version
admin-selectacross.2.diff (9.7 KB) - added by Jannis Leidel 7 years ago.
Featuring less brain farts
admin-selectacross.3.diff (10.1 KB) - added by Jannis Leidel 7 years ago.
Even better now. Only needs through testing with the usual suspects (IE etc)

Download all attachments as: .zip

Change History (14)

comment:1 Changed 7 years ago by Alex Gaynor

Component: Contrib appsdjango.contrib.admin

This is related to #10615.

comment:2 Changed 7 years ago by Paul Smith

Owner: changed from nobody to Paul Smith
Status: newassigned

comment:3 Changed 7 years ago by Paul Smith

This should:

  • List the number of items selected on this page (merge in work from #10625)
  • Allow user to select all items (across pagination)
  • Paginator should respect "select all" so that all items are still selected when you go to the next page
  • When Go is pressed, action should be applied to all items that match currently applied filters

comment:4 Changed 7 years ago by Martin Mahner

I worked on this while fixing #10615. I have a working solution which has some edge bugs and needs proper testing. Attached is a screenshot.

Changed 7 years ago by Martin Mahner

Attachment: select-all.png added

comment:5 Changed 7 years ago by Martin Mahner

blinkylights; any problems when I reassign the ticket to me? I don't know what your work status is on this, my current patch is available on http://github.com/bartTC/django/tree/tickets/10615-acrosspages. Maybe it's worth to share ideas.

Changed 7 years ago by Jannis Leidel

Attachment: admin-selectacross.diff added

Changed 7 years ago by Jannis Leidel

Attachment: select-across.mp4 added

Current version

Changed 7 years ago by Jannis Leidel

Attachment: admin-selectacross.2.diff added

Featuring less brain farts

Changed 7 years ago by Jannis Leidel

Attachment: admin-selectacross.3.diff added

Even better now. Only needs through testing with the usual suspects (IE etc)

comment:6 Changed 7 years ago by Jannis Leidel

Has patch: set
milestone: 1.2
Needs documentation: set
Owner: changed from Paul Smith to Jannis Leidel
Status: assignednew
Triage Stage: UnreviewedAccepted
Version: 1.1SVN

comment:7 Changed 7 years ago by Jannis Leidel

Correction, the latest updates are here: http://github.com/jezdez/django/tree/admin-ui-combined

comment:8 Changed 7 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [12298]) Fixed #12282 - When paginated allow selecting all items in the admin changlist.

Thanks to Martin Mahner, Rob Hudson and Zain Memon for providing inital patches and guidance.

comment:9 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top