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

@@ -5,8 +5,10 @@
{% block title %}Workouts{% endblock %}
{% block content %}
<div class="grid_12">
<h1>My Workouts</h1>
{% if workouts %}
{% if workouts %}
<table width="70%" class="listtable">
<thead>
<tr>
@@ -49,4 +51,35 @@
{% else %}
<p> No workouts found </p>
{% endif %}
</div>
<div class="grid_6 alpha">
<form id="searchform" action="."
method="get" accept-charset="utf-8">
<div class="grid_3 alpha">
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
</div>
<div class="grid_1 suffix_2 omega">
<button class="button blue small" type="submit">
Search
</button>
</div>
</form>
</div>
<div class="grid_2 prefix_4 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>
{% endblock %}