Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#12282 closed (fixed)

Admin Actions: No Way to Select All

Reported by: blinkylights Owned by: jezdez
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 bartTC 5 years ago.
admin-selectacross.diff (10.0 KB) - added by jezdez 5 years ago.
Working example, from http://github.com/jezdez/django/tree/admin-selectacross
select-across.mp4 (192.9 KB) - added by jezdez 5 years ago.
Current version
admin-selectacross.2.diff (9.7 KB) - added by jezdez 5 years ago.
Featuring less brain farts
admin-selectacross.3.diff (10.1 KB) - added by jezdez 5 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 6 years ago by Alex

  • Component changed from Contrib apps to django.contrib.admin
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

This is related to #10615.

comment:2 Changed 6 years ago by blinkylights

  • Owner changed from nobody to blinkylights
  • Status changed from new to assigned

comment:3 Changed 6 years ago by blinkylights

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 5 years ago by bartTC

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 5 years ago by bartTC

comment:5 Changed 5 years ago by bartTC

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 5 years ago by jezdez

Current version

Changed 5 years ago by jezdez

Featuring less brain farts

Changed 5 years ago by jezdez

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

comment:6 Changed 5 years ago by jezdez

  • Has patch set
  • milestone set to 1.2
  • Needs documentation set
  • Owner changed from blinkylights to jezdez
  • Status changed from assigned to new
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.1 to SVN

comment:7 Changed 5 years ago by jezdez

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

comment:8 Changed 5 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

(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 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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