mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-21 15:18:23 +02:00
Load result data in tables
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% load crispy_forms_filters highlight i18n %}
|
||||
{% load crispy_forms_filters highlight i18n search_results_tables django_tables2 %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Search" %}</h2>
|
||||
@ -19,11 +19,9 @@
|
||||
{% regroup page.object_list by model_name as categories %}
|
||||
{% for category in categories %}
|
||||
<h4>{% trans category.grouper|capfirst %}</h4>
|
||||
{% for result in category.list %}
|
||||
<p>
|
||||
<a href="{{ result.object.get_absolute_url }}">{{ result.object }}</a>
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% with table=category.list|search_table %}
|
||||
{% render_table table %}
|
||||
{% endwith %}
|
||||
{% empty %}
|
||||
<p>{% trans "No results found." %}</p>
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user