Commit 9dd0f8c4 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

fixed pagination

parent 414391b8
...@@ -37,42 +37,22 @@ SRCT Bookshare • Latest Listings ...@@ -37,42 +37,22 @@ SRCT Bookshare • Latest Listings
{% endfor %} {% endfor %}
</div> </div>
<div class="row"> {% if is_paginated %}
<div class="col-lg-4 col-lg-offset-4"> <nav>
<ul class="pager"> <ul class="pager">
{% if page_obj.has_next %}
{% if listings.has_previous %}
<li class="previous">
<a href="?page={{ listings.previous_page_number }}">
<h4>&larr; Newer</h4>
</a>
</li>
{% else %}
<li class="previous disabled">
<a>
<h4>&larr; Newer</h4>
</a>
</li>
{% endif %}
{% if listings.has_next %}
<li class="next"> <li class="next">
<a href="?page={{ listings.next_page_number }}"> <a href="/share/all/?page={{ page_obj.next_page_number }}"><strong>next &rarr;</strong></a>
<h4>Older &rarr;</h4>
</a>
</li> </li>
{% else %} {% endif %}
<li class="next disabled"> {% if page_obj.has_previous %}
<a> <li class="previous">
<h4>Older &rarr;</h4> <a href="/share/all/?page={{ page_obj.previous_page_number }}"><strong>&larr; previous</strong></a>
</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</nav>
</div> {% endif %}
</div>
{% else %} {% else %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment