summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-06-10 20:40:04 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-06-10 20:40:04 +0200
commitae3eb5ff7ab20b4c7033c616fb33d790da83c022 (patch)
tree6018ef8f2f0d6df30fc2762cb37f07b1f42c7d3c /templates
parent994452c91ee9d1f6eb4aa6bc293e64a09f55c4b9 (diff)
downloadjokevote-ae3eb5ff7ab20b4c7033c616fb33d790da83c022.tar.gz
jokevote-ae3eb5ff7ab20b4c7033c616fb33d790da83c022.zip
paginate filtered results properly
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/index.html b/templates/index.html
index dc75288..c83d78c 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -35,7 +35,7 @@
</form>
{% endif %}
<div class="col s2 m12 l2 right">
- <a class="btn-floating btn-large right" href="/export"><i class="material-icons">file_download</i></a>
+ <a class="btn-floating btn-large right" href="/export{% if query %}?{{ query }}{% endif %}"><i class="material-icons">file_download</i></a>
</div>
</div>
</header>
@@ -111,11 +111,11 @@
</ul>
<div class="section center">
<ul class="pagination">
- <li{% if currentpage==0 %} class="disabled"{% endif %}><a href="/page/{{ currentpage-1 }}"><i class="material-icons">chevron_left</i></a></li>
+ <li{% if currentpage==0 %} class="disabled"{% endif %}><a href="/page/{{ currentpage-1 }}{% if query %}?{{ query }}{% endif %}"><i class="material-icons">chevron_left</i></a></li>
{% for page in range((jokes|length/perpage)|round(0, 'ceil')|int) %}
- <li{% if currentpage==loop.index0 %} class="active"{% endif %}><a href="/page/{{ loop.index0 }}">{{ loop.index }}</a></li>
+ <li{% if currentpage==loop.index0 %} class="active"{% endif %}><a href="/page/{{ loop.index0 }}{% if query %}?{{ query }}{% endif %}">{{ loop.index }}</a></li>
{% endfor %}
- <li{% if currentpage==loop.length-1 %} class="disabled"{% endif %}><a href="/page/{{ currentpage+1 }}"><i class="material-icons">chevron_right</i></a></li>
+ <li{% if currentpage==loop.length-1 %} class="disabled"{% endif %}><a href="/page/{{ currentpage+1 }}{% if query %}?{{ query }}{% endif %}"><i class="material-icons">chevron_right</i></a></li>
</ul>
</div>
<div class="divider"></div>