Private
Public Access
1
0

Search form and pagination

This commit is contained in:
Sander Roosendaal
2016-11-22 13:58:32 +01:00
parent f57efd0166
commit 4fb1bee385
6 changed files with 151 additions and 8 deletions

View File

@@ -30,6 +30,14 @@
<th>Weight Category:</th><td>{{ workout.weightcategory }}</td>
</tr>
</table>
<form id="searchform" action="."
method="get" accept-charset="utf-8">
<button class="button blue small" type="submit">
Search
</button>
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
</form>
</div>
<div id="comparison" class="grid_8 omega">
@@ -73,5 +81,21 @@
{% else %}
<p> No workouts found </p>
{% endif %}
<div class="grid_2 prefix_5 suffix_1 omega">
<span class="button gray small">
{% if workouts.has_previous %}
<a class="wh" href="?page={{ workouts.previous_page_number }}">&lt;</a>
{% endif %}
<span>
Page {{ workouts.number }} of {{ workouts.paginator.num_pages }}.
</span>
{% if workouts.has_next %}
<a class="wh" href="?page={{ workouts.next_page_number }}">&gt;</a>
{% endif %}
</span>
</div>
</div>
{% endblock %}