mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-29 09:52:36 +02:00
Clean up unnecessary whitespace differences
This commit is contained in:
parent
50977078d0
commit
fb02684fd2
2 changed files with 39 additions and 39 deletions
|
@ -78,22 +78,22 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="bill-form" class="modal fade show" role="dialog">
|
<div id="bill-form" class="modal fade show" role="dialog">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="modal-title">{{ _('Add a bill') }}</h3>
|
<h3 class="modal-title">{{ _('Add a bill') }}</h3>
|
||||||
<a href="#" class="close" data-dismiss="modal">×</a>
|
<a href="#" class="close" data-dismiss="modal">×</a>
|
||||||
|
</div>
|
||||||
|
<form action="{{ url_for(".add_bill") }}" method="post" class="modal-body container">
|
||||||
|
{{ forms.add_bill(bill_form, title=False) }}
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<form action="{{ url_for(".add_bill") }}" method="post" class="modal-body container">
|
|
||||||
{{ forms.add_bill(bill_form, title=False) }}
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="d-flex flex-wrap w-100 pt-2 mt-2" id="bill-toolbar">
|
<div class="d-flex flex-wrap w-100 pt-2 mt-2" id="bill-toolbar">
|
||||||
{% if bills.pages > 1 %}
|
{% if bills.pages > 1 %}
|
||||||
<ul class="pagination mr-2 mb-0 pb-2 flex-wrap" id="pagination-top">
|
<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>
|
<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() %}
|
{%- for page in bills.iter_pages() %}
|
||||||
{% if page %}
|
{% if page %}
|
||||||
|
@ -103,21 +103,21 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor %}
|
{%- 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 == bills.pages %}disabled{% endif %}"><a class="page-link" href="{{ url_for('main.list_bills', page=bills.next_num) }}">{{ _("Older bills") }} »</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="d-flex flex-wrap align-items-center mr-2 mb-2">
|
<div class="d-flex flex-wrap align-items-center mr-2 mb-2">
|
||||||
<button class="btn btn-sm btn-outline-secondary" type="button" data-toggle="collapse" data-target="#filterCollapse" aria-expanded="false" aria-controls="filterCollapse">
|
<button class="btn btn-sm btn-outline-secondary" type="button" data-toggle="collapse" data-target="#filterCollapse" aria-expanded="false" aria-controls="filterCollapse">
|
||||||
{{ _("Filter") }}
|
{{ _("Filter") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span id="new-bill" class="ml-auto pb-2" {% if not g.project.members %} data-toggle="tooltip" title="{{_('You should start by adding participants')}}" {% endif %}>
|
<span id="new-bill" class="ml-auto pb-2" {% if not g.project.members %} data-toggle="tooltip" title="{{_('You should start by adding participants')}}" {% endif %}>
|
||||||
<a href="{{ url_for('.add_bill') }}" class="btn btn-primary {% if not g.project.members %} disabled {% endif %}" data-toggle="modal" data-keyboard="true" data-target="#bill-form" autofocus>
|
<a href="{{ url_for('.add_bill') }}" class="btn btn-primary {% if not g.project.members %} disabled {% endif %}" data-toggle="modal" data-keyboard="true" data-target="#bill-form" autofocus>
|
||||||
<i class="icon icon-white before-text">{{ static_include("images/plus.svg") | safe }}</i>
|
<i class="icon icon-white before-text">{{ static_include("images/plus.svg") | safe }}</i>
|
||||||
{{ _("Add a new bill") }}
|
{{ _("Add a new bill") }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse {% if search_active %}show{% endif %} mb-3" id="filterCollapse">
|
<div class="collapse {% if search_active %}show{% endif %} mb-3" id="filterCollapse">
|
||||||
|
@ -165,15 +165,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if bills.total > 0 %}
|
{% if bills.total > 0 %}
|
||||||
<table id="bill_table" class="col table table-striped table-hover table-responsive-sm">
|
<table id="bill_table" class="col table table-striped table-hover table-responsive-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>{{ _("When?") }}
|
<tr><th>{{ _("When?") }}
|
||||||
</th><th>{{ _("Who paid?") }}
|
</th><th>{{ _("Who paid?") }}
|
||||||
</th><th>{{ _("For what?") }}
|
</th><th>{{ _("For what?") }}
|
||||||
</th><th>{{ _("For whom?") }}
|
</th><th>{{ _("For whom?") }}
|
||||||
</th><th>{{ _("How much?") }}
|
</th><th>{{ _("How much?") }}
|
||||||
</th><th>{{ _("Actions") }}</th></tr>
|
</th><th>{{ _("Actions") }}</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for (weights, bill) in bills.items %}
|
{% for (weights, bill) in bills.items %}
|
||||||
<tr owers="{{bill.owers|join(',','id')}}" payer="{{bill.payer.id}}">
|
<tr owers="{{bill.owers|join(',','id')}}" payer="{{bill.payer.id}}">
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="py-3 d-flex justify-content-center empty-bill">
|
<div class="py-3 d-flex justify-content-center empty-bill">
|
||||||
<div class="card d-inline-flex p-2">
|
<div class="card d-inline-flex p-2">
|
||||||
<div class="card-body text-center text-muted">
|
<div class="card-body text-center text-muted">
|
||||||
<i class="icon icon-white billimg">{{ static_include("images/bill.svg") | safe }}</i>
|
<i class="icon icon-white billimg">{{ static_include("images/bill.svg") | safe }}</i>
|
||||||
|
|
|
@ -671,7 +671,7 @@ def list_bills():
|
||||||
):
|
):
|
||||||
bill_form.payed_for.data = session["last_selected_payed_for"][g.project.id]
|
bill_form.payed_for.data = session["last_selected_payed_for"][g.project.id]
|
||||||
|
|
||||||
# Extract filter values from request
|
# filters from form
|
||||||
filters = {
|
filters = {
|
||||||
"search": request.args.get("search", "").strip(),
|
"search": request.args.get("search", "").strip(),
|
||||||
"date_from": request.args.get("date_from", "").strip(),
|
"date_from": request.args.get("date_from", "").strip(),
|
||||||
|
@ -683,7 +683,7 @@ def list_bills():
|
||||||
|
|
||||||
filters_active = any(filters.values())
|
filters_active = any(filters.values())
|
||||||
|
|
||||||
# Fetch bills
|
# standard query if no filters are active
|
||||||
if not filters_active:
|
if not filters_active:
|
||||||
weighted_bills = g.project.get_bill_weights_ordered().paginate(per_page=100, error_out=True)
|
weighted_bills = g.project.get_bill_weights_ordered().paginate(per_page=100, error_out=True)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue