Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#21510 closed Bug (fixed)

Admin change list search field is missing the "show all" link

Reported by: moritz.pfeiffer@… Owned by: Claude Paroz
Component: contrib.admin Version: 1.6
Severity: Release blocker Keywords: search field show all missing link
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

The admin change list search field is missing the link to reset the search term.
In Django 1.5 there was a link with wording like "1 result (4 total)" to the right of the search field. This link is missing in Django 1.6. The only way to see all of the items in the change list is to perform a search with an empty string search term.

Attachments (4)

search_test.zip (10.0 KB ) - added by moritz.pfeiffer@… 10 years ago.
Sample project to demonstrate the issue
changelist_with_search_term.png (151.1 KB ) - added by moritz.pfeiffer@… 10 years ago.
Screen shot of the change list from the sample project, demonstrating the missing "show all" link
Expected_behavior.png (51.3 KB ) - added by moritz.pfeiffer@… 10 years ago.
Screen shot of Django 1.5 demonstrating the expected behavior, e.g. a link that resets the search term is present
21510.diff (645 bytes ) - added by Tim Graham 10 years ago.

Download all attachments as: .zip

Change History (13)

by moritz.pfeiffer@…, 10 years ago

Attachment: search_test.zip added

Sample project to demonstrate the issue

by moritz.pfeiffer@…, 10 years ago

Screen shot of the change list from the sample project, demonstrating the missing "show all" link

by moritz.pfeiffer@…, 10 years ago

Attachment: Expected_behavior.png added

Screen shot of Django 1.5 demonstrating the expected behavior, e.g. a link that resets the search term is present

comment:1 by anonymous, 10 years ago

The admin login for the sample project is
user: moritz
password: pass

comment:2 by Baptiste Mispelon, 10 years ago

Triage Stage: UnreviewedAccepted

Hi,

I can indeed reproduce the issue you're describing.

From what I can tell, this removal wasn't intentional since the code in django/contrib/admin/templates/admin/search_form.html was basically untouched between 1.5 and 1.6 [1]

[1] https://github.com/django/django/commits/master/django/contrib/admin/templates/admin/search_form.html

comment:3 by Baptiste Mispelon, 10 years ago

Looks like the problem was introduced by commit f07a5f0a21857204465019b4e68f914d31cb396a (found with git bisect).

comment:4 by Claude Paroz, 10 years ago

Severity: NormalRelease blocker

Blocker, as a regression in 1.6.

by Tim Graham, 10 years ago

Attachment: 21510.diff added

comment:5 by Tim Graham, 10 years ago

Has patch: set
Needs tests: set

Attached is a patch that seems to fix the issue although I haven't run the tests or checked the code in a comprehensive fashion.

comment:6 by Claude Paroz, 10 years ago

Owner: changed from nobody to Claude Paroz
Status: newassigned

comment:8 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In c7c647419cb857fe53cf1368c10223c6e042c216:

Fixed #21510 -- Readded search reset link in changelist search bar

Thanks moritz.pfeiffer at alp-phone.ch for the report and
Tim Graham for the initial patch.

comment:9 by Claude Paroz <claude@…>, 10 years ago

In d32637d81b6b4adf6440bead756fb5a063e4d28d:

[1.6.x] Fixed #21510 -- Readded search reset link in changelist search bar

Thanks moritz.pfeiffer at alp-phone.ch for the report and
Tim Graham for the initial patch.
Backport of c7c647419c from master.

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