summaryrefslogtreecommitdiff
path: root/src/jwebmail/templates/_top_nav.html
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2024-12-08 16:15:37 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2024-12-08 16:15:37 +0100
commit57423db1e342b48c970b972a6f18e84e7a7b1a22 (patch)
tree778ecf925dfd7e04eb68edf3ebca4491ae128fcb /src/jwebmail/templates/_top_nav.html
parentbdb14d5b5fff9c53ea2684a8180f7a9e55dcc8f3 (diff)
update for mail-storage version 1.1.0
Now a keyset based pagination is used instead of an offset based one. This removes the dependency flask-paginate. URL arguments are taken from the request object in the displayheaders templates instead of passing them in manually. Not needed arguments for about render_template are removed.
Diffstat (limited to 'src/jwebmail/templates/_top_nav.html')
-rw-r--r--src/jwebmail/templates/_top_nav.html38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/jwebmail/templates/_top_nav.html b/src/jwebmail/templates/_top_nav.html
index 960ae86..a9d385b 100644
--- a/src/jwebmail/templates/_top_nav.html
+++ b/src/jwebmail/templates/_top_nav.html
@@ -28,7 +28,43 @@
</form>
<div class=column>
- {{ pgn.links }}
+ <nav class="pagination" role="navigation">
+ {% if first %}
+ <a class="pagination-previous" disabled>&laquo;</a>
+ {% else %}
+ <a class="pagination-previous"
+ href="{{ url_for(
+ 'displayheaders',
+ folder=request.view_args.folder,
+ page_bound=page_bound_before,
+ page_after=0,
+ per_page=request.args.get('per_page'),
+ sort=request.args.get('sort'),
+ search=request.args.get('search'),
+ ) }}"
+ aria-label="Next">
+ &laquo;
+ </a>
+ {% endif %}
+
+ {% if last %}
+ <a class="pagination-next" disabled>&raquo;</a>
+ {% else %}
+ <a class="pagination-next"
+ href="{{ url_for(
+ 'displayheaders',
+ folder=request.view_args.folder,
+ page_bound=page_bound_after,
+ page_after=1,
+ per_page=request.args.get('per_page'),
+ sort=request.args.get('sort'),
+ search=request.args.get('search'),
+ ) }}"
+ aria-label="Next">
+ &raquo;
+ </a>
+ {% endif %}
+ </nav>
</div>
</div>