Skip to content

Commit

Permalink
refactor: move column selector from form to table
Browse files Browse the repository at this point in the history
Closes: #173
  • Loading branch information
b1rger committed Oct 18, 2023
1 parent 025186f commit 63701a7
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions apis_core/apis_metainfo/templates/generic_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ <h3 style="margin-bottom:15px;">
<!--Search mask-->
{% load django_tables2 crispy_forms_tags %}
<form action="." class="uniForm" method="get">

{% if togglable_colums %}
<legend>Select additional columns</legend>
{% column_selector %}
{% endif %}

<br />
{% crispy filter.form filter.form.helper %}
</form>

Expand Down Expand Up @@ -118,14 +111,29 @@ <h1>{{ data.title }}</h1>
{% endif %}

{% endblock %}

</div>
</div>
</div>
<div class="col-md-8" id="results">
<div class="card">
<div class="card-body">
{% with table.paginator.count as total %}
<legend>Result: {{ total }} items</legend>
<div class="row">
<div class="col">
<h3>Result: {{ total }} items</h3>
</div>
<div class="col">

{% if togglable_colums %}
<form method="get" class="form-inline float-right">
{% column_selector %}
<button type="submit" class="form-control">Show</button>
</form>
{% endif %}

</div>
</div>

{% if conf_items %}
<div class="dropdown">
Expand Down

0 comments on commit 63701a7

Please sign in to comment.