2021-07-01 13:36:07 +02:00
|
|
|
{% load django_tables2 %}
|
2021-07-20 14:05:44 +02:00
|
|
|
{% load i18n static fontawesome_5 %}
|
|
|
|
<div class="col-md">
|
2021-07-01 13:36:07 +02:00
|
|
|
{% if table.title is not None %}
|
2021-07-20 14:05:44 +02:00
|
|
|
<div class="row">
|
|
|
|
<h3>
|
|
|
|
{{ table.title }}
|
|
|
|
</h3>
|
|
|
|
</div>
|
2021-07-01 13:36:07 +02:00
|
|
|
{% endif %}
|
2021-07-20 14:05:44 +02:00
|
|
|
<div class="row">
|
|
|
|
{% if table.add_new_entries %}
|
|
|
|
<div class="col-md">
|
|
|
|
<a href="{{ table.add_new_url }}">
|
|
|
|
<button class="btn btn-default" title="{% trans 'New entry' %}">
|
|
|
|
<i class="fas fa-plus mr-2"></i>
|
|
|
|
{% trans 'New' %}
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-07-01 13:36:07 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-07-20 14:23:16 +02:00
|
|
|
|
|
|
|
{% comment %}
|
|
|
|
Search input and rpp selector
|
|
|
|
{% endcomment %}
|
2021-07-20 14:05:44 +02:00
|
|
|
<div class="row my-1">
|
2021-07-20 17:10:49 +02:00
|
|
|
<div class="col-sm-12 col-md-8 col-lg-6">
|
2021-07-20 14:05:44 +02:00
|
|
|
<form method="get" action="{{table.filter}}">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="form-control" aria-label="{% trans 'Search for keywords' %}" placeholder="{% trans 'Search' %}">
|
|
|
|
<div class="input-group-append" title="{% trans 'Start search' %}">
|
|
|
|
<button type="submit" class="btn btn-default input-group-text">
|
|
|
|
<span class="">
|
|
|
|
{% fa5_icon 'search' %}
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="col-md d-flex justify-content-end">
|
|
|
|
<div class="dropdown show">
|
|
|
|
<div class="btn btn-default dropdown-toggle" href="#" role="button" id="rppToggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
{% trans 'Results per page' %}
|
|
|
|
</div>
|
|
|
|
<div class="dropdown-menu dropdown-menu-right">
|
|
|
|
{% for rpp_option in table.results_per_page_choices %}
|
|
|
|
<a class="dropdown-item {% if table.results_per_page_chosen == rpp_option %}selected{% endif %}" href="{% querystring table.results_per_page_parameter=rpp_option %}">
|
|
|
|
{{ rpp_option }}
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-01 13:36:07 +02:00
|
|
|
</div>
|
2021-07-20 14:05:44 +02:00
|
|
|
|
2021-07-20 14:23:16 +02:00
|
|
|
|
|
|
|
{% comment %}
|
|
|
|
Filter section
|
|
|
|
{% endcomment %}
|
2021-07-20 14:05:44 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md">
|
|
|
|
<div class="card">
|
|
|
|
<div id="filterHeader" class="card-header cursor-pointer" data-toggle="collapse" data-target="#filter" aria-expanded="true" aria-controls="filter">
|
|
|
|
<h5>
|
|
|
|
{% fa5_icon 'filter' %}
|
|
|
|
{% trans 'Filter' %}
|
|
|
|
</h5>
|
|
|
|
</div>
|
|
|
|
<div id="filter" class="collapse" aria-labelledby="filterHeader">
|
|
|
|
<div class="card-body">
|
|
|
|
<form method="get">
|
|
|
|
{{ table.filter.form.as_p }}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-01 13:36:07 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-20 14:23:16 +02:00
|
|
|
{% comment %}
|
|
|
|
Table section
|
|
|
|
{% endcomment %}
|
|
|
|
{% render_table table %}
|