2020-10-15 10:57:20 +00:00
|
|
|
{% extends 'base.html' %}
|
2020-10-15 14:03:08 +00:00
|
|
|
|
2020-10-15 18:39:34 +00:00
|
|
|
{% load crispy_forms_filters highlight i18n search_results_tables django_tables2 %}
|
2020-10-15 10:57:20 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2020-10-15 14:03:08 +00:00
|
|
|
<h2>{% trans "Search" %}</h2>
|
|
|
|
|
|
|
|
<form>
|
|
|
|
{{ form|crispy }}
|
|
|
|
<button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<h3>{% trans "Results" %}</h3>
|
2020-10-15 10:57:20 +00:00
|
|
|
|
2020-10-15 14:03:08 +00:00
|
|
|
<div id="search-results">
|
2020-10-15 19:07:18 +00:00
|
|
|
{% regroup object_list by model_name as categories %}
|
2020-10-15 17:50:12 +00:00
|
|
|
{% for category in categories %}
|
|
|
|
<h4>{% trans category.grouper|capfirst %}</h4>
|
2020-10-15 18:39:34 +00:00
|
|
|
{% with table=category.list|search_table %}
|
|
|
|
{% render_table table %}
|
|
|
|
{% endwith %}
|
2020-10-15 14:03:08 +00:00
|
|
|
{% empty %}
|
2020-10-15 15:14:25 +00:00
|
|
|
<p>{% trans "No results found." %}</p>
|
2020-10-15 14:03:08 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-10-15 10:57:20 +00:00
|
|
|
{% endblock %}
|