summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-10-27 20:57:13 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-10-27 20:57:13 +0000
commit1ab0b23df6bfe91c214ccae740287af3151d5a95 (patch)
treebcdeaf2191411926e9b3cc529d784e0b0c5e8e1a /django
parent97ee7a3baf89690ded3a13843d8f9c86fbb1e857 (diff)
[1.1.X] Fixed #11057: having no actions in the admin (`actions=None`) no longer messes up the layout. Thanks, rvdrijst.
Backport of [11670] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/media/css/changelists.css2
-rw-r--r--django/contrib/admin/templatetags/admin_list.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/django/contrib/admin/media/css/changelists.css b/django/contrib/admin/media/css/changelists.css
index 5eb66b4d36..43033780ac 100644
--- a/django/contrib/admin/media/css/changelists.css
+++ b/django/contrib/admin/media/css/changelists.css
@@ -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;
}
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
index 9a4ce3b266..5a02ab01be 100644
--- a/django/contrib/admin/templatetags/admin_list.py
+++ b/django/contrib/admin/templatetags/admin_list.py
@@ -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)