forked from CGM_Public/pretix_original
* Filter banktransfer comments aswell * Make the filtering button actually filter bank imports * Show empty list if search matches nothing
This commit is contained in:
committed by
Raphael Michel
parent
9662b956ed
commit
b64fef4b08
@@ -32,7 +32,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if transactions_unhandled|length > 0 %}
|
{% if transactions_unhandled|length > 0 or request.GET.search %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">{% trans "Unresolved transactions" %}</h3>
|
<h3 class="panel-title">{% trans "Unresolved transactions" %}</h3>
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
<form class="form-inline helper-display-inline" action="" method="get">
|
<form class="form-inline helper-display-inline" action="" method="get">
|
||||||
<input type="text" name="search" class="form-control" placeholder="{% trans "Search" %}"
|
<input type="text" name="search" class="form-control" placeholder="{% trans "Search" %}"
|
||||||
value="{{ request.GET.search }}">
|
value="{{ request.GET.search }}">
|
||||||
|
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
||||||
</form>
|
</form>
|
||||||
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
|
||||||
{% if not request.GET.search %}
|
{% if not request.GET.search %}
|
||||||
<form action="" method="post" class="helper-display-inline pull-right">
|
<form action="" method="post" class="helper-display-inline pull-right">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
@@ -55,9 +55,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% if transactions_unhandled|length > 0 %}
|
||||||
{% include "pretixplugins/banktransfer/transaction_list.html" with list=transactions_unhandled %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixplugins/banktransfer/transaction_list.html" with list=transactions_unhandled %}
|
||||||
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
{% else %}
|
||||||
|
<div>{% trans "Your search matched no transactions." %}</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ class ImportView(EventPermissionRequiredMixin, ListView):
|
|||||||
if 'search' in self.request.GET:
|
if 'search' in self.request.GET:
|
||||||
q = self.request.GET.get('search')
|
q = self.request.GET.get('search')
|
||||||
qs = qs.filter(
|
qs = qs.filter(
|
||||||
Q(payer__icontains=q) | Q(reference__icontains=q)
|
Q(payer__icontains=q) | Q(reference__icontains=q) | Q(comment__icontains=q)
|
||||||
)
|
)
|
||||||
|
|
||||||
return qs
|
return qs
|
||||||
|
|||||||
Reference in New Issue
Block a user