mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
More whiteline reversions and re-adding old comment
This commit is contained in:
parent
fb02684fd2
commit
391c4219a2
2 changed files with 12 additions and 9 deletions
|
@ -94,15 +94,15 @@
|
|||
<div class="d-flex flex-wrap w-100 pt-2 mt-2" id="bill-toolbar">
|
||||
{% if bills.pages > 1 %}
|
||||
<ul class="pagination mr-2 mb-0 pb-2 flex-wrap" id="pagination-top">
|
||||
<li class="page-item {% if bills.page == 1 %}disabled{% endif %}"><a class="page-link" href="{{ url_for('main.list_bills', page=bills.prev_num) }}">« {{ _("Newer bills") }}</a></li>
|
||||
{%- for page in bills.iter_pages() %}
|
||||
{% if page %}
|
||||
<li class="page-item {% if page == bills.page %}active{% endif %}"><a class="page-link" href="{{ url_for('main.list_bills', page=page) }}">{{ page }}</a></li>
|
||||
{% else %}
|
||||
<li class="page-item disabled"><span class="ellipsis page-link">…</span></li>
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
<li class="page-item {% if bills.page == bills.pages %}disabled{% endif %}"><a class="page-link" href="{{ url_for('main.list_bills', page=bills.next_num) }}">{{ _("Older bills") }} »</a></li>
|
||||
<li class="page-item {% if bills.page == 1 %}disabled{% endif %}"><a class="page-link" href="{{ url_for('main.list_bills', page=bills.prev_num) }}">« {{ _("Newer bills") }}</a></li>
|
||||
{%- for page in bills.iter_pages() %}
|
||||
{% if page %}
|
||||
<li class="page-item {% if page == bills.page %}active{% endif %}"><a class="page-link" href="{{ url_for('main.list_bills', page=page) }}">{{ page }}</a></li>
|
||||
{% else %}
|
||||
<li class="page-item disabled"><span class="ellipsis page-link">…</span></li>
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
<li class="page-item {% if bills.page == bills.pages %}disabled{% endif %}"><a class="page-link" href="{{ url_for('main.list_bills', page=bills.next_num) }}">{{ _("Older bills") }} »</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -685,6 +685,9 @@ def list_bills():
|
|||
|
||||
# standard query if no filters are active
|
||||
if not filters_active:
|
||||
# Each item will be a (weight_sum, Bill) tuple.
|
||||
# TODO: improve this awkward result using column_property:
|
||||
# https://docs.sqlalchemy.org/en/14/orm/mapped_sql_expr.html.
|
||||
weighted_bills = g.project.get_bill_weights_ordered().paginate(per_page=100, error_out=True)
|
||||
else:
|
||||
query = Bill.query.join(Person).filter(Person.project_id == g.project.id)
|
||||
|
|
Loading…
Reference in a new issue