diff --git a/search/templates/search/index.html b/search/templates/search/index.html
index bf02d7c8..13b6afc6 100644
--- a/search/templates/search/index.html
+++ b/search/templates/search/index.html
@@ -51,6 +51,7 @@
Prix unitaire |
Moyen de paiement |
Date |
+ |
{% for facture in facture_list %}
@@ -61,6 +62,7 @@
{{ facture.prix }} |
{{ facture.paiement }} |
{{ facture.date }} |
+ Editer |
{% endfor %}
@@ -74,6 +76,7 @@
Raison |
Date de début |
Date de fin |
+ |
{% for ban in ban_list %}
@@ -82,9 +85,16 @@
{{ ban.raison }} |
{{ ban.date_start }} |
{{ ban.date_end }} |
+ Editer |
{% endfor %}
{% endif %}
+ {% if not ban_list and not machine_list and not users_list and not facture_list%}
+ Aucun résultat
+ {% endif %}
+
+
+
{% endblock %}
diff --git a/search/templates/search/search.html b/search/templates/search/search.html
index 063ee55d..511f8eba 100644
--- a/search/templates/search/search.html
+++ b/search/templates/search/search.html
@@ -1,4 +1,4 @@
-{% extends "search/sidebar.html" %}
+{% extends "users/sidebar.html" %}
{% load bootstrap3 %}
{% block title %}Création et modification d'utilisateur{% endblock %}
diff --git a/templates/base.html b/templates/base.html
index a746be2c..8142bc93 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -34,14 +34,15 @@
Statistiques
- Login
diff --git a/users/__pycache__/views.cpython-34.pyc b/users/__pycache__/views.cpython-34.pyc
index a7e395d9..4bef2323 100644
Binary files a/users/__pycache__/views.cpython-34.pyc and b/users/__pycache__/views.cpython-34.pyc differ
diff --git a/users/views.py b/users/views.py
index db53acda..5fb9c650 100644
--- a/users/views.py
+++ b/users/views.py
@@ -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))