Opened 15 years ago
Closed 14 years ago
#11695 closed Uncategorized (duplicate)
Modified change list default sort
Reported by: | Joshua Russo | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | change list default sort model-sort |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I've tweaked the change list sort handling so that by default it uses the full list of sort columns defined in the model. It sets all of the
headers as unselected and then behaves as it currently does if someone selects a header column to sort by. I've also modified the template to
add a Reset sort (or conditionally Reset sort and filter) button to bring everything back to the original state.
Attachments (5)
Change History (14)
by , 15 years ago
by , 15 years ago
Attachment: | change_list.diff added |
---|
From \contrib\admin\templates\admin - Added the Reset button
comment:2 by , 15 years ago
"if cl.order_field != None..." should be "if cl.order_field is not None..."
comment:3 by , 15 years ago
Component: | Uncategorized → django.contrib.admin |
---|---|
Has patch: | set |
Needs documentation: | set |
Needs tests: | set |
Patch needs improvement: | set |
Better have two separate messages for i18n than creating message from chunks
<li><a href="."> {% if cl.has_filters or cl.date_hierarchy %} {% trans 'Reset sorting and filters' %} {% else %} {% trans 'Reset sorting' %} {% endif %} </a></li>
comment:4 by , 15 years ago
I've updated the code as suggested in the comments provided. (Diff done from root, IF statement fixed, and Trans split into 2 full phases)
comment:5 by , 15 years ago
Needs documentation: | unset |
---|---|
Needs tests: | unset |
Patch needs improvement: | unset |
Well I have all of the regression testing and docs added, but my upload doesn't seem to be working. It reports the correct file size but doesn't display the file when I click the file name after upload.
I also found and fixed a small bug in another of the admin_views tests.
comment:6 by , 15 years ago
milestone: | → 1.2 |
---|
comment:7 by , 15 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:8 by , 15 years ago
milestone: | 1.2 |
---|
1.2 is feature-frozen, moving this feature request off the milestone.
comment:9 by , 14 years ago
Resolution: | → duplicate |
---|---|
Severity: | → Normal |
Status: | new → closed |
Type: | → Uncategorized |
Closing as a duplicate of #11868 which, although newer, suggests a better approach UI-wise.
From \contrib\admin\views