aboutsummaryrefslogtreecommitdiff
path: root/app/templates/packages/list.html
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-10 22:08:52 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-10 22:08:52 +0100
commit660b813ff7e549ebbe969ea9d0e97ed9079a7169 (patch)
tree056b376593834a7c62bff6b9e06d19ad600228e7 /app/templates/packages/list.html
parentba3b1082394d12b206d10b3b183f5f41a0e2c4de (diff)
downloadcheatdb-660b813ff7e549ebbe969ea9d0e97ed9079a7169.tar.xz
Fix pagination losing query arguments
Fixes #205
Diffstat (limited to 'app/templates/packages/list.html')
-rw-r--r--app/templates/packages/list.html20
1 files changed, 4 insertions, 16 deletions
diff --git a/app/templates/packages/list.html b/app/templates/packages/list.html
index 057fe22..8f3a595 100644
--- a/app/templates/packages/list.html
+++ b/app/templates/packages/list.html
@@ -23,22 +23,10 @@
{% from "macros/packagegridtile.html" import render_pkggrid %}
{{ render_pkggrid(packages) }}
- <ul class="pagination mt-4">
- <li class="page-item {% if not prev_url %}disabled{% endif %}">
- <a class="page-link" {% if prev_url %}href="{{ prev_url }}"{% endif %}>&laquo;</a>
- </li>
- {% for n in range(1, page_max+1) %}
- <li class="page-item {% if n == page %}active{% endif %}">
- <a class="page-link"
- href="{{ url_for('packages.list_all', type=type, q=query, page=n) }}">
- {{ n }}
- </a>
- </li>
- {% endfor %}
- <li class="page-item {% if not next_url %}disabled{% endif %}">
- <a class="page-link" {% if next_url %}href="{{ next_url }}"{% endif %}>&raquo;</a>
- </li>
- </ul>
+
+ {% from "macros/pagination.html" import render_pagination %}
+ {{ render_pagination(pagination, url_builder) }}
+
{% if topics %}
<h2 style="margin-top:2em;">More content from the forums</h2>