52 lines
1.1 KiB
Django/Jinja
52 lines
1.1 KiB
Django/Jinja
{% extends "layout.jinja2" %}
|
|
|
|
{% block content %}
|
|
|
|
<form id="search-form" class="form-horizontal" role="form" action="/blog_search" method="post">
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-sm-8">
|
|
<div class="input-group" align="center">
|
|
<input class="form-control" name="criteria" type="text" value="{{criteria}}" required>
|
|
<span class="input-group-btn">
|
|
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
|
Rechercher
|
|
</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="row">
|
|
{% if items %}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Titre</th>
|
|
<th>Tags</th>
|
|
<th>Date</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
{% for entry in items %}
|
|
<tr>
|
|
<td>
|
|
<a href="{{ request.route_url('blog', id=entry.id, slug='slug') }}">
|
|
{{ entry.title }}
|
|
</a>
|
|
</td>
|
|
<td>{{ entry.tag }}</td>
|
|
<td>{{ entry.edit_date }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
{{ liste | safe }}
|
|
{% endif %}
|
|
</div>
|
|
<br />
|
|
<br />
|
|
|
|
{% endblock %}
|