Remember other arguments when changing page, etc. in statement lines listing

#3
This commit is contained in:
RunasSudo 2024-04-03 20:50:48 +11:00
parent a8966cc19e
commit 128054d965
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
{# DrCr: Web-based double-entry bookkeeping framework
Copyright (C) 2022–2023 Lee Yingtong Li (RunasSudo)
Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -24,23 +24,23 @@
<form method="POST">
<div class="py-2 d-flex bg-white sticky-top">
<div class="flex-grow-1">
<button type="submit" class="btn btn-outline-secondary" formaction="/statement-lines/reconcile-transfer">Reconcile selected as transfer</button>
<button type="submit" class="btn btn-outline-secondary" formaction="{{ url_for('statement_line_reconcile_transfer') }}">Reconcile selected as transfer</button>
<a href="{{ url_for('statement_lines_import') }}" class="btn btn-outline-secondary">Import statement</a>
{% if request.args.get('unclassified', '0') != '1' %}
<a href="?unclassified=1" class="btn btn-outline-secondary">Show only unclassified lines</a>
<a href="{{ url_for('statement_lines', **dict(request.args, unclassified=1)) }}" class="btn btn-outline-secondary">Show only unclassified lines</a>
{% endif %}
</div>
<nav class="flex-end">
<ul class="pagination">
{% if page.prev_num %}<li class="page-item"><a class="page-link" href="?page={{ page.prev_num }}">&lsaquo;</a></li>{% endif %}
{% if page.prev_num %}<li class="page-item"><a class="page-link" href="{{ url_for('statement_lines', **dict(request.args, page=page.prev_num)) }}">&lsaquo;</a></li>{% endif %}
{% for pageno in page.iter_pages() %}
{% if pageno %}
<li class="page-item{% if pageno == page.page %} active{% endif %}"><a class="page-link" href="?page={{ pageno }}">{{ pageno }}</a></li>
<li class="page-item{% if pageno == page.page %} active{% endif %}"><a class="page-link" href="{{ url_for('statement_lines', **dict(request.args, page=pageno)) }}">{{ pageno }}</a></li>
{% else %}
<li class="page-item disabled"><a class="page-link"></a></li>
{% endif %}
{% endfor %}
{% if page.next_num %}<li class="page-item"><a class="page-link" href="?page={{ page.next_num }}">&rsaquo;</a></li>{% endif %}
{% if page.next_num %}<li class="page-item"><a class="page-link" href="{{ url_for('statement_lines', **dict(request.args, page=page.next_num)) }}">&rsaquo;</a></li>{% endif %}
</ul>
</nav>
</div>