Deprecate collapsible advanced search and re-implement field-based filtering on object views

This commit is contained in:
checktheroads
2021-08-01 21:24:22 -07:00
parent e9801a8953
commit b4c03189c0
20 changed files with 534 additions and 260 deletions

View File

@@ -1,42 +1,24 @@
{% extends 'base/layout.html' %}
{% load buttons %}
{% load render_table from django_tables2 %}
{% block title %}{{ title }}{% endblock %}
{% block extra_controls %}{% export_button content_type %}{% endblock %}
{% block content %}
{% if filter_form %}
<div class="col col-md-12 noprint">
{% include 'inc/advanced_search.html' %}
</div>
{% endif %}
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col col-md-4 offset-md-8 d-flex noprint table-controls">
<div class="input-group input-group-sm">
<input type="text" class="form-control object-filter" placeholder="Filter" title="Filter text (regular expressions supported)" />
{% if filter_form %}
<button
type="button"
class="btn btn-sm btn-outline-dark"
data-bs-toggle="collapse"
data-bs-target="#advanced-search-content">
Advanced Search
</button>
{% endif %}
</div>
</div>
</div>
</div>
<div class="card-body">
{% include 'inc/responsive_table.html' %}
<div class="row mb-3">
<div class="col col-md-7 col-lg-8 col-xl-9 col-xxl-10">
{% include 'inc/table_controls.html' %}
<div class="table-responsive">
{% render_table table 'inc/table.html' %}
</div>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
</div>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% if filter_form %}
{% include 'inc/filter_list.html' %}
{% endif %}
</div>
</div>
{% endblock %}