summaryrefslogtreecommitdiff
path: root/src/jwebmail/templates/_nav.html
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2024-12-09 13:07:42 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2024-12-09 13:07:42 +0100
commit7f9f1d40e806aaf2e0017c0c157b76fb284b049f (patch)
tree522abe138bb4b74d809e79aefe17fb5658296d36 /src/jwebmail/templates/_nav.html
parent4c911f53dc51dacc61f109cbc42b011887ce6c84 (diff)
spit of navigation element into its own file
Diffstat (limited to 'src/jwebmail/templates/_nav.html')
-rw-r--r--src/jwebmail/templates/_nav.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/jwebmail/templates/_nav.html b/src/jwebmail/templates/_nav.html
new file mode 100644
index 0000000..79b7b6e
--- /dev/null
+++ b/src/jwebmail/templates/_nav.html
@@ -0,0 +1,22 @@
+<nav class="pagination" role="navigation">
+ {% set args = dict(request.args) %}
+ {% do args.update(request.view_args) %}
+
+ {% if first %}
+ <a class="pagination-previous" disabled>&laquo;</a>
+ {% else %}
+ {% do args.update([('page_bound', page_bound_before), ('page_after', 0)]) %}
+ <a class="pagination-previous" href="{{ url_for(request.endpoint, **args) }}" aria-label="Previous">
+ &laquo;
+ </a>
+ {% endif %}
+
+ {% if last %}
+ <a class="pagination-next" disabled>&raquo;</a>
+ {% else %}
+ {% do args.update([('page_bound', page_bound_after), ('page_after', 1)]) %}
+ <a class="pagination-next" href="{{ url_for(request.endpoint, **args) }}" aria-label="Next">
+ &raquo;
+ </a>
+ {% endif %}
+</nav>