Improve pagination links and text in template.

This should correct various issues with pagination in the press
releases.
This commit is contained in:
Bradley M. Kuhn 2015-03-04 12:48:54 -08:00
parent 47b446cd3b
commit b7e31128a0

View file

@ -13,7 +13,7 @@
<h1><a href="/feeds/news/" class="feedlink"><img src="/img/feed-icon-14x14.png" alt="[RSS]"/></a> Conservancy News</h1>
{% ifnotequal news.number 1 %}<p>(page {{ news.number }} of {{ news.paginator.num_pages }})</p>{% endifnotequal %}
{% ifnotequal news.number 1 %}<p>(Page {{ news.number }} of {{ news.paginator.num_pages }})</p>{% endifnotequal %}
{% for news_item in news %}
<div class="shaded">
@ -28,9 +28,9 @@
{% endfor %}
<p>
{% if news.has_next %}<a class="next_page_button" href="?page={{ next }}">Next page (older) &raquo;</a>{% endif %}
{% if news.has_previous %}<a href="?page={{ previous }}">&laquo; Previous page (newer)</a>{% endif %}
{% comment %}{% for pagenum in news.paginator.page_range %}{% ifequal pagenum news.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endcomment %}
{% if news.has_next %}<a class="next_page_button" href="?page={{ news.next_page_number }}">Next page (older) &raquo;</a>{% endif %}
{% if news.has_previous %}<a href="?page={{ news.previous_page_number }}">&laquo; Previous page (newer)</a>{% endif %}
{% for pagenum in news.paginator.page_range %}{% ifequal pagenum news.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}
</p>
</div>
</div>