46 lines
1.3 KiB
HTML
46 lines
1.3 KiB
HTML
{% extends "base/base.html" %}
|
|
{% import "widgets/pagination.html" as widget_pagination with context %}
|
|
|
|
{% set tabtitle = "Recherche avancée" %}
|
|
|
|
{% block content %}
|
|
<section class="form search">
|
|
<h1>Recherche avancée</h1>
|
|
|
|
<form action="{{ url_for('search') }}" method="get">
|
|
{{ form.csrf_token }}
|
|
<div class="query">
|
|
{{ form.q.label }}
|
|
{{ form.q(value=request.args.get('q')) }}
|
|
</div>
|
|
<div class="date">
|
|
{{ form.date.label }}
|
|
{{ form.date(value=request.args.get('date')) }}
|
|
</div>
|
|
<div class="sort">
|
|
{{ form.sortBy.label }}
|
|
{{ form.sortBy(value=request.args.get('sortBy')) }}
|
|
</div>
|
|
<div class="scope">
|
|
{{ form.scope.label }}
|
|
{{ form.scope(value=request.args.get('scope')) }}
|
|
</div>
|
|
<div class="submit">{{ form.submit(class_="bg-ok") }}</div>
|
|
{{form.errors}}
|
|
</form>
|
|
</section>
|
|
<section class="search-results">
|
|
{{ widget_pagination.paginate(results, 'search', None, {'q': request.args.get('q')}) }}
|
|
{% for i in results.items %}
|
|
<div>
|
|
{{ i.id }} {{ i.title }} {{ i.forum }}<br>
|
|
{% if i.forum %}
|
|
<a href="{{ url_for('forum_topic', f=i.forum, page=(i , 'fin')) }}">{{ i.title }}</a>
|
|
{% endif %}
|
|
{{ i.headline }}<br>
|
|
</div>
|
|
{% endfor %}
|
|
{{ widget_pagination.paginate(results, 'search', None, {}) }}
|
|
</section>
|
|
{% endblock %}
|