mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #11057: having no actions in the admin (actions=None) no longer messes up the layout. Thanks, rvdrijst.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#changelist table thead th:first-child {
|
||||
#changelist table thead th.action-checkbox-column {
|
||||
width: 1.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,11 @@ def result_headers(cl):
|
||||
else:
|
||||
header = field_name
|
||||
header = header.replace('_', ' ')
|
||||
# if the field is the action checkbox: no sorting and special class
|
||||
if field_name == 'action_checkbox':
|
||||
yield {"text": header,
|
||||
"class_attrib": mark_safe(' class="action-checkbox-column"')}
|
||||
continue
|
||||
|
||||
# It is a non-field, but perhaps one that is sortable
|
||||
admin_order_field = getattr(attr, "admin_order_field", None)
|
||||
|
||||
Reference in New Issue
Block a user