Restore navigation links.

Previous commit incorrectly implemented solution for avoiding showing
nav links.  This corrects that.
This commit is contained in:
Bradley M. Kuhn 2015-03-04 15:35:16 -08:00
parent 5c3a677554
commit 9d654d08ee
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@
{% if blog_entries.has_next %}<a class="next_page_button" href="?page={{ blog_entries.next_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">Next page (older) &raquo;</a>{% endif %} {% if blog_entries.has_next %}<a class="next_page_button" href="?page={{ blog_entries.next_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">Next page (older) &raquo;</a>{% endif %}
{% if blog_entries.has_previous %}<a href="?page={{ blog_entries.previous_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">&laquo; Previous page (newer)</a>{% endif %} {% if blog_entries.has_previous %}<a href="?page={{ blog_entries.previous_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">&laquo; Previous page (newer)</a>{% endif %}
</p> </p>
<p class="pagination_list">{% if blog_entries.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p> <p class="pagination_list">{% if blog_entries.paginator.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
<div class="clear"></div> <div class="clear"></div>
{% endblock %} {% endblock %}

View file

@ -31,7 +31,7 @@
{% if news.has_next %}<a class="next_page_button" href="?page={{ news.next_page_number }}">Next page (older) &raquo;</a>{% endif %} {% 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 %} {% if news.has_previous %}<a href="?page={{ news.previous_page_number }}">&laquo; Previous page (newer)</a>{% endif %}
</p> </p>
<p class="pagination_list">{% if blog_entries.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p> <p class="pagination_list">{% if news.paginator.num_pages > 1 %} {% for pagenum in news.paginator.page_range %}{% ifequal pagenum news.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
</div> </div>
</div> </div>
<div class="clear"></div> <div class="clear"></div>