Commit d6e03b84 authored by Dalahro's avatar Dalahro

Barre de recherche fonctionnelle

parent 7de6ca4d
......@@ -51,6 +51,7 @@
<th>Prix unitaire</th>
<th>Moyen de paiement</th>
<th>Date</th>
<th></th>
</tr>
</thead>
{% for facture in facture_list %}
......@@ -61,6 +62,7 @@
<td>{{ facture.prix }}</td>
<td>{{ facture.paiement }}</td>
<td>{{ facture.date }}</td>
<td><a href="{% url 'cotisations:edit-facture' facture.id %}">Editer</a></td>
</tr>
{% endfor %}
</table>
......@@ -74,6 +76,7 @@
<th>Raison</th>
<th>Date de début</th>
<th>Date de fin</th>
<th></th>
</tr>
</thead>
{% for ban in ban_list %}
......@@ -82,9 +85,16 @@
<td>{{ ban.raison }}</td>
<td>{{ ban.date_start }}</td>
<td>{{ ban.date_end }}</td>
<td><a href="{% url 'users:edit-ban' ban.id %}">Editer</a></td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if not ban_list and not machine_list and not users_list and not facture_list%}
<h3>Aucun résultat</h3>
{% endif %}
<br />
<br />
<br />
{% endblock %}
{% extends "search/sidebar.html" %}
{% extends "users/sidebar.html" %}
{% load bootstrap3 %}
{% block title %}Création et modification d'utilisateur{% endblock %}
......
......@@ -34,14 +34,15 @@
<li><a href="#">Statistiques</a></li>
</ul>
<div class="col-sm-3 col-md-3 navbar-right">
<form class="navbar-form" role="search">
<form action="{% url "search:search"%}" method="POST" class="navbar-form" role="search">
{% csrf_token %}
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="srch-term" id="srch-term">
<input type="text" class="form-control" placeholder="Search" name="search_field" id="search-term">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</form>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
......
......@@ -12,6 +12,11 @@ from users.forms import PassForm
from re2o.login import makeSecret, hashNT
def end_ban(user):
""" Renvoie la date de fin de ban d'un user, False sinon """
date_max = Ban.objects.all().filter(user=user).aggregate(Max('date_end'))['date_end__max']
return date_max
def form(ctx, template, request):
c = ctx
c.update(csrf(request))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment