summaryrefslogtreecommitdiff
path: root/app/templates/modules/invoices.html
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2022-05-16 21:11:52 +0200
committerMarius Peter <marius.peter@tutanota.com>2022-05-16 21:11:52 +0200
commiteac5bb765c8d609d3b7eb31316228f8058581796 (patch)
tree71858ed6cef43bb5dea24de1222b3c828d93b821 /app/templates/modules/invoices.html
parent196c3bbf8a140f962845c51e22f409aa6b4d7473 (diff)
Lil fixes.
Diffstat (limited to 'app/templates/modules/invoices.html')
-rw-r--r--app/templates/modules/invoices.html39
1 files changed, 21 insertions, 18 deletions
diff --git a/app/templates/modules/invoices.html b/app/templates/modules/invoices.html
index 55a4b87..293a45b 100644
--- a/app/templates/modules/invoices.html
+++ b/app/templates/modules/invoices.html
@@ -13,25 +13,28 @@ Invoices
{% block content %}
<i>Track your invoices and create new ones here.</i><br/>
+{# Pagination Links #}
+{# gotten from https://betterprogramming.pub/simple-flask-pagination-example-4190b12c2e2e #}
<center>
-{% for page_num in invoices.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
-{% if page_num %}
-<!-- Check for the active page and set the link to "Active"-->
-{% if invoices.page == page_num %}
-<a href="{{ url_for('invoices.view', page=page_num) }}"
- class="button">
- {{ page_num }}
-</a>
-{% else %}
-<a href="{{ url_for('invoices.view', page=page_num) }}"
- class="button button-light">
- {{ page_num }}
-</a>
-{% endif %}
-{% else %}
-...
-{% endif %}
-{% endfor %}
+ {# Loop through the number of pages to display a link for each #}
+ {% for page_num in invoices.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
+ {% if page_num %}
+ {# Check for the active page and set the link to "Active" #}
+ {% if invoices.page == page_num %}
+ <a href="{{ url_for('invoices.view', page=page_num) }}"
+ class="button">
+ {{ page_num }}
+ </a>
+ {% else %}
+ <a href="{{ url_for('invoices.view', page=page_num) }}"
+ class="button button-light">
+ {{ page_num }}
+ </a>
+ {% endif %}
+ {% else %}
+ ...
+ {% endif %}
+ {% endfor %}
</center>
<table>
<thead>
Copyright 2019--2024 Marius PETER