1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-02-06 12:13:01 +00:00

Search bar is on navbar, don't add one other is results page

This commit is contained in:
Yohann D'ANELLO 2020-10-15 13:17:17 +02:00
parent f2cc5fb6cd
commit 11ebc6848b

View File

@ -1,25 +1,12 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% load crispy_forms_filters %}
{% block content %} {% block content %}
<h2>Search</h2>
<form method="get" action=".">
<table>
{{ form.as_table }}
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" value="Search">
</td>
</tr>
</table>
{% if query %}
<h3>Results</h3> <h3>Results</h3>
{% for result in page.object_list %} {% for result in page.object_list %}
<p> <p>
<a href="{{ result.object.get_absolute_url }}">{{ result.text }}</a> <a href="{{ result.object.get_absolute_url }}">{{ result.object }}</a>
</p> </p>
{% empty %} {% empty %}
<p>No results found.</p> <p>No results found.</p>
@ -32,8 +19,4 @@
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %} {% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %}
</div> </div>
{% endif %} {% endif %}
{% else %}
{# Show some example queries to run, maybe query syntax, something else? #}
{% endif %}
</form>
{% endblock %} {% endblock %}