mirror of
https://github.com/django/django.git
synced 2025-03-06 07:22:32 +00:00
Refs #26761 -- Removed extra space in admin change list result header.
This commit is contained in:
parent
9a54a9172a
commit
fbe82f8255
@ -10,7 +10,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{% for header in result_headers %}
|
{% for header in result_headers %}
|
||||||
<th scope="col" {{ header.class_attrib }}>
|
<th scope="col"{{ header.class_attrib }}>
|
||||||
{% if header.sortable %}
|
{% if header.sortable %}
|
||||||
{% if header.sort_priority > 0 %}
|
{% if header.sort_priority > 0 %}
|
||||||
<div class="sortoptions">
|
<div class="sortoptions">
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{% for header in result_headers %}
|
{% for header in result_headers %}
|
||||||
<th scope="col" {{ header.class_attrib }}>
|
<th scope="col"{{ header.class_attrib }}>
|
||||||
{% if header.sortable %}
|
{% if header.sortable %}
|
||||||
{% if header.sort_priority > 0 %}
|
{% if header.sort_priority > 0 %}
|
||||||
<div class="sortoptions">
|
<div class="sortoptions">
|
||||||
|
@ -1006,26 +1006,26 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
|||||||
)
|
)
|
||||||
response = self.client.get(reverse('admin6:admin_views_article_changelist'))
|
response = self.client.get(reverse('admin6:admin_views_article_changelist'))
|
||||||
for field_name in expected_sortable_fields:
|
for field_name in expected_sortable_fields:
|
||||||
self.assertContains(response, '<th scope="col" class="sortable column-%s">' % field_name)
|
self.assertContains(response, '<th scope="col" class="sortable column-%s">' % field_name)
|
||||||
for field_name in expected_not_sortable_fields:
|
for field_name in expected_not_sortable_fields:
|
||||||
self.assertContains(response, '<th scope="col" class="column-%s">' % field_name)
|
self.assertContains(response, '<th scope="col" class="column-%s">' % field_name)
|
||||||
|
|
||||||
def test_get_sortable_by_columns_subset(self):
|
def test_get_sortable_by_columns_subset(self):
|
||||||
response = self.client.get(reverse('admin6:admin_views_actor_changelist'))
|
response = self.client.get(reverse('admin6:admin_views_actor_changelist'))
|
||||||
self.assertContains(response, '<th scope="col" class="sortable column-age">')
|
self.assertContains(response, '<th scope="col" class="sortable column-age">')
|
||||||
self.assertContains(response, '<th scope="col" class="column-name">')
|
self.assertContains(response, '<th scope="col" class="column-name">')
|
||||||
|
|
||||||
def test_sortable_by_no_column(self):
|
def test_sortable_by_no_column(self):
|
||||||
expected_not_sortable_fields = ('title', 'book')
|
expected_not_sortable_fields = ('title', 'book')
|
||||||
response = self.client.get(reverse('admin6:admin_views_chapter_changelist'))
|
response = self.client.get(reverse('admin6:admin_views_chapter_changelist'))
|
||||||
for field_name in expected_not_sortable_fields:
|
for field_name in expected_not_sortable_fields:
|
||||||
self.assertContains(response, '<th scope="col" class="column-%s">' % field_name)
|
self.assertContains(response, '<th scope="col" class="column-%s">' % field_name)
|
||||||
self.assertNotContains(response, '<th scope="col" class="sortable column')
|
self.assertNotContains(response, '<th scope="col" class="sortable column')
|
||||||
|
|
||||||
def test_get_sortable_by_no_column(self):
|
def test_get_sortable_by_no_column(self):
|
||||||
response = self.client.get(reverse('admin6:admin_views_color_changelist'))
|
response = self.client.get(reverse('admin6:admin_views_color_changelist'))
|
||||||
self.assertContains(response, '<th scope="col" class="column-value">')
|
self.assertContains(response, '<th scope="col" class="column-value">')
|
||||||
self.assertNotContains(response, '<th scope="col" class="sortable column')
|
self.assertNotContains(response, '<th scope="col" class="sortable column')
|
||||||
|
|
||||||
|
|
||||||
@override_settings(TEMPLATES=[{
|
@override_settings(TEMPLATES=[{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user