diff --git a/apps/search/templates/search/search.html b/apps/search/templates/search/search.html index f3a59341..2ade305f 100644 --- a/apps/search/templates/search/search.html +++ b/apps/search/templates/search/search.html @@ -69,13 +69,13 @@

{% if page and page.has_other_pages() %}
- {% with link_txt = _('« Older Messages')|safe %} + {% with link_txt = _('« Older Messages')|safe %} {% if page.has_next() and page.number < settings.SEARCH_MAX_PAGES %} {{ link_txt }} + }}" class="older">{{ link_txt }} {% else %} - {{ link_txt }} + {{ link_txt }} {% endif %} {% endwith %} @@ -83,9 +83,9 @@

{% if page.has_previous() %} {{ link_txt }} + }}" class="newer">{{ link_txt }} {% else %} - {{ link_txt }} + {{ link_txt }} {% endif %} {% endwith %}

diff --git a/apps/search/tests/test_views.py b/apps/search/tests/test_views.py index 6806a37a..809abb91 100644 --- a/apps/search/tests/test_views.py +++ b/apps/search/tests/test_views.py @@ -58,16 +58,16 @@ def compare_2_pages(self, page1, page2): doc = pq(r.content) self.assertNotEqual(firstmsg, doc('.message').eq(1).text()) - def test_next_page(self): + def test_older_page(self): r = search_request() - assert pq(r.content)('.pager a.newer') + assert pq(r.content)('.pager a.older') - def test_no_next_page(self): + def test_no_older_page(self): """Once we're on page 50, let's not show an older messages link.""" for page in (50, 51, 100, 200): r = search_request(page=page) doc = pq(r.content) - assert not doc('.pager a.next') + assert not doc('.pager a.older') def test_page_0(self): """In bug 620296, page 0 led to an AssertionError.""" diff --git a/media/css/input.css b/media/css/input.css index f5b0f8da..704eda23 100644 --- a/media/css/input.css +++ b/media/css/input.css @@ -657,13 +657,13 @@ background-color: #B6BCC0; padding: 15px 0 10px 0; } .pager .newer { - float: left; + float: right; } .html-rtl .pager .newer { float: left; } .pager .older { - float: right; + float: left; } .html-rtl .pager .older { float: none;