hide footer gap on ugly search results pages if no pagination
This commit is contained in:
Родитель
1cd7a946c2
Коммит
f0867ae26a
|
@ -38,7 +38,9 @@
|
|||
</div>
|
||||
{{ collection_listing_items(pager.object_list, field=opts.sort) }}
|
||||
</div>
|
||||
<div class="listing-footer">{{ pager|paginator }}</div>
|
||||
{% if pager.paginator.num_pages > 1 %}
|
||||
<div class="listing-footer">{{ pager|paginator }}</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include 'search/no_results.html' %}
|
||||
{% endif %}
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
<div class="featured-inner">
|
||||
{{ persona_grid(pager.object_list) }}
|
||||
</div>
|
||||
<div class="listing-footer">{{ pager|paginator }}</div>
|
||||
{% if pager.paginator.num_pages > 1 %}
|
||||
<div class="listing-footer">{{ pager|paginator }}</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include 'search/no_results.html' %}
|
||||
{% endif %}
|
||||
|
|
|
@ -720,7 +720,9 @@ class TestPersonaSearch(SearchBase):
|
|||
r = self.client.get(self.url, follow=True)
|
||||
eq_(r.status_code, 200)
|
||||
eq_(self.get_results(r), personas_ids)
|
||||
eq_(pq(r.content)('.personas-grid li').length, len(personas_ids))
|
||||
doc = pq(r.content)
|
||||
eq_(doc('.personas-grid li').length, len(personas_ids))
|
||||
eq_(doc('.listing-footer').length, 0)
|
||||
|
||||
def test_results_name_query(self):
|
||||
self._generate_personas()
|
||||
|
@ -940,7 +942,9 @@ class TestCollectionSearch(SearchBase):
|
|||
r = self.client.get(self.url, follow=True)
|
||||
eq_(r.status_code, 200)
|
||||
eq_(self.get_results(r), collection_ids)
|
||||
eq_(pq(r.content)('.primary .item').length, len(collection_ids))
|
||||
doc = pq(r.content)
|
||||
eq_(doc('.primary .item').length, len(collection_ids))
|
||||
eq_(doc('.listing-footer').length, 0)
|
||||
|
||||
def test_results_name_query(self):
|
||||
# TODO: Figure out why this flakes out on jenkins every so often.
|
||||
|
|
Загрузка…
Ссылка в новой задаче