mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 09:22:38 +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
|
@ -9,7 +9,7 @@
|
|||
|
||||
{% block title %} - {{ g.project.name }}{% endblock %}
|
||||
{% block js %}
|
||||
{% if add_bill %} $('#new-bill > a').click(); {% endif %}
|
||||
{% if add_bill %} $('#new-bill > a').click(); {% endif %}
|
||||
|
||||
// focus on first field when adding a bill
|
||||
$("#bill-form").on('shown.bs.modal', function(){
|
||||
|
@ -78,22 +78,22 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="bill-form" class="modal fade show" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">{{ _('Add a bill') }}</h3>
|
||||
<a href="#" class="close" data-dismiss="modal">×</a>
|
||||
<div id="bill-form" class="modal fade show" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">{{ _('Add a bill') }}</h3>
|
||||
<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>
|
||||
<form action="{{ url_for(".add_bill") }}" method="post" class="modal-body container">
|
||||
{{ forms.add_bill(bill_form, title=False) }}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
{% 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 %}
|
||||
|
@ -103,21 +103,21 @@
|
|||
{% 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 %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{{ _("Filter") }}
|
||||
</button>
|
||||
</div>
|
||||
<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">
|
||||
{{ _("Filter") }}
|
||||
</button>
|
||||
</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 %}>
|
||||
<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>
|
||||
{{ _("Add a new bill") }}
|
||||
</a>
|
||||
</span>
|
||||
<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>
|
||||
<i class="icon icon-white before-text">{{ static_include("images/plus.svg") | safe }}</i>
|
||||
{{ _("Add a new bill") }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="collapse {% if search_active %}show{% endif %} mb-3" id="filterCollapse">
|
||||
|
@ -165,15 +165,15 @@
|
|||
</div>
|
||||
|
||||
{% if bills.total > 0 %}
|
||||
<table id="bill_table" class="col table table-striped table-hover table-responsive-sm">
|
||||
<thead>
|
||||
<tr><th>{{ _("When?") }}
|
||||
</th><th>{{ _("Who paid?") }}
|
||||
</th><th>{{ _("For what?") }}
|
||||
</th><th>{{ _("For whom?") }}
|
||||
</th><th>{{ _("How much?") }}
|
||||
</th><th>{{ _("Actions") }}</th></tr>
|
||||
</thead>
|
||||
<table id="bill_table" class="col table table-striped table-hover table-responsive-sm">
|
||||
<thead>
|
||||
<tr><th>{{ _("When?") }}
|
||||
</th><th>{{ _("Who paid?") }}
|
||||
</th><th>{{ _("For what?") }}
|
||||
</th><th>{{ _("For whom?") }}
|
||||
</th><th>{{ _("How much?") }}
|
||||
</th><th>{{ _("Actions") }}</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for (weights, bill) in bills.items %}
|
||||
<tr owers="{{bill.owers|join(',','id')}}" payer="{{bill.payer.id}}">
|
||||
|
@ -213,7 +213,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
{% 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-body text-center text-muted">
|
||||
<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]
|
||||
|
||||
# Extract filter values from request
|
||||
# filters from form
|
||||
filters = {
|
||||
"search": request.args.get("search", "").strip(),
|
||||
"date_from": request.args.get("date_from", "").strip(),
|
||||
|
@ -683,7 +683,7 @@ def list_bills():
|
|||
|
||||
filters_active = any(filters.values())
|
||||
|
||||
# Fetch bills
|
||||
# standard query if no filters are active
|
||||
if not filters_active:
|
||||
weighted_bills = g.project.get_bill_weights_ordered().paginate(per_page=100, error_out=True)
|
||||
else:
|
||||
|
@ -1082,4 +1082,4 @@ def favicon():
|
|||
os.path.join(main.root_path, "static"),
|
||||
"favicon.ico",
|
||||
mimetype="image/vnd.microsoft.icon",
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue