diff --git a/django/contrib/admin/media/css/changelists.css b/django/contrib/admin/media/css/changelists.css
index 282833c..4e3402f 100644
a
|
b
|
|
67 | 67 | #changelist table tbody td:first-child { |
68 | 68 | border-left: 0; |
69 | 69 | border-right: 1px solid #ddd; |
70 | | text-align: center; |
| 70 | } |
| 71 | |
| 72 | #changelist table tbody td.action-checkbox { |
| 73 | text-align:center; |
71 | 74 | } |
72 | 75 | |
73 | 76 | #changelist table tfoot { |
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
index 806be24..57e8ab7 100644
a
|
b
|
def items_for_result(cl, result, form):
|
139 | 139 | result_repr = EMPTY_CHANGELIST_VALUE |
140 | 140 | else: |
141 | 141 | if f is None: |
| 142 | if field_name == u'action_checkbox': |
| 143 | row_class = ' class="action-checkbox"' |
142 | 144 | allow_tags = getattr(attr, 'allow_tags', False) |
143 | 145 | boolean = getattr(attr, 'boolean', False) |
144 | 146 | if boolean: |
diff --git a/tests/regressiontests/admin_changelist/tests.py b/tests/regressiontests/admin_changelist/tests.py
index c3f6186..e9b2e32 100644
a
|
b
|
class ChangeListTests(TransactionTestCase):
|
35 | 35 | template = Template('{% load admin_list %}{% spaceless %}{% result_list cl %}{% endspaceless %}') |
36 | 36 | context = Context({'cl': cl}) |
37 | 37 | table_output = template.render(context) |
38 | | row_html = '<tbody><tr class="row1"><td><input type="checkbox" class="action-select" value="1" name="_selected_action" /></td><th><a href="1/">name</a></th><td>(None)</td></tr></tbody>' |
| 38 | row_html = '<tbody><tr class="row1"><td class="action-checkbox"><input type="checkbox" class="action-select" value="1" name="_selected_action" /></td><th><a href="1/">name</a></th><td>(None)</td></tr></tbody>' |
39 | 39 | self.assertFalse(table_output.find(row_html) == -1, |
40 | 40 | 'Failed to find expected row element: %s' % table_output) |
41 | 41 | |
… |
… |
class ChangeListTests(TransactionTestCase):
|
56 | 56 | template = Template('{% load admin_list %}{% spaceless %}{% result_list cl %}{% endspaceless %}') |
57 | 57 | context = Context({'cl': cl}) |
58 | 58 | table_output = template.render(context) |
59 | | row_html = '<tbody><tr class="row1"><td><input type="checkbox" class="action-select" value="1" name="_selected_action" /></td><th><a href="1/">name</a></th><td>Parent object</td></tr></tbody>' |
| 59 | row_html = '<tbody><tr class="row1"><td class="action-checkbox"><input type="checkbox" class="action-select" value="1" name="_selected_action" /></td><th><a href="1/">name</a></th><td>Parent object</td></tr></tbody>' |
60 | 60 | self.assertFalse(table_output.find(row_html) == -1, |
61 | 61 | 'Failed to find expected row element: %s' % table_output) |
62 | 62 | |