Browse Source

Simplify pagination in browse.html

Our old pagination is incompatible with new class-based generic views,
so switch to internal django pagination for some time.
pull/1/head
Hidden Z 13 years ago
parent
commit
84836a5079
  1. 15
      pyi2phosts/templates/browse.html

15
pyi2phosts/templates/browse.html

@ -16,7 +16,20 @@
</table> </table>
{% if is_paginated %} {% if is_paginated %}
{% load paginator %}{% paginator 3 %} <div class="pager">
{% if page_obj.has_previous %}
<span class="page">
<a href="?page={{ page_obj.previous_page_number }}">&lt; Prev</a>
</span>
{% endif %}
<span class="current">Page {{ page_obj.number }} of {{ paginator.num_pages }}</span>
{% if page_obj.has_next %}
<span class="page"><a href="?page={{ page_obj.next_page_number }}">Next &gt;</a></span>
{% endif %}
{{ paginator.count }} {% trans "hosts total" %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

Loading…
Cancel
Save