# 61 Filter frontend
* finished filter frontend
This commit is contained in:
5
templates/filter/checkbox_filter.html
Normal file
5
templates/filter/checkbox_filter.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% for field in form %}
|
||||
<div class="form-check form-check-inline">
|
||||
{{field}} <label class="form-check-label" for="id_{{field.name}}">{{field.label}}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
10
templates/filter/query_filter.html
Normal file
10
templates/filter/query_filter.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="form-row align-items-center">
|
||||
{% for field in form %}
|
||||
{% if not field.is_hidden %}
|
||||
<div class="col-auto">
|
||||
{{field}}
|
||||
</div>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -83,12 +83,17 @@
|
||||
<div id="filter" class="collapse" aria-labelledby="filterHeader">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{table.filter.query_filter.form.as_p}}
|
||||
{% with table.filter.query_filter.form as form %}
|
||||
{% include 'filter/query_filter.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{table.filter.checkbox_filter.form.as_p}}
|
||||
<div class="row mt-3">
|
||||
{% with table.filter.checkbox_filter.form as form %}
|
||||
{% include 'filter/checkbox_filter.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<hr>
|
||||
<div class="row mt-3">
|
||||
<button class="btn btn-default" title="{% trans 'Filter' %}">
|
||||
{% fa5_icon 'filter' %}
|
||||
{% trans 'Apply filter' %}
|
||||
|
||||
Reference in New Issue
Block a user