Private
Public Access
1
0

allow paging through search

This commit is contained in:
Sander Roosendaal
2017-02-14 11:59:29 +01:00
parent 3cf334382d
commit e90293709d

View File

@@ -158,17 +158,24 @@
<div class="grid_2 prefix_1 omega">
<span class="button gray small">
{% if workouts.has_previous %}
{% if request.GET.q %}
<a class="wh" href="?page={{ workouts.previous_page_number }}&q={{ request.GET.q }}">&lt;</a>
{% else %}
<a class="wh" href="?page={{ workouts.previous_page_number }}">&lt;</a>
{% endif %}
{% endif %}
<span>
Page {{ workouts.number }} of {{ workouts.paginator.num_pages }}.
</span>
{% if workouts.has_next %}
{% if request.GET.q %}
<a class="wh" href="?page={{ workouts.next_page_number }}&q={{ request.GET.q }}">&gt;</a>
{% else %}
<a class="wh" href="?page={{ workouts.next_page_number }}">&gt;</a>
{% endif %}
{% endif %}
</span>
{% endblock %}