mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 00:43:46 +00:00
Barre de recherche fonctionnelle
This commit is contained in:
parent
c486cc03f2
commit
87a182a9ca
5 changed files with 20 additions and 4 deletions
|
@ -51,6 +51,7 @@
|
||||||
<th>Prix unitaire</th>
|
<th>Prix unitaire</th>
|
||||||
<th>Moyen de paiement</th>
|
<th>Moyen de paiement</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for facture in facture_list %}
|
{% for facture in facture_list %}
|
||||||
|
@ -61,6 +62,7 @@
|
||||||
<td>{{ facture.prix }}</td>
|
<td>{{ facture.prix }}</td>
|
||||||
<td>{{ facture.paiement }}</td>
|
<td>{{ facture.paiement }}</td>
|
||||||
<td>{{ facture.date }}</td>
|
<td>{{ facture.date }}</td>
|
||||||
|
<td><a href="{% url 'cotisations:edit-facture' facture.id %}">Editer</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
@ -74,6 +76,7 @@
|
||||||
<th>Raison</th>
|
<th>Raison</th>
|
||||||
<th>Date de début</th>
|
<th>Date de début</th>
|
||||||
<th>Date de fin</th>
|
<th>Date de fin</th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for ban in ban_list %}
|
{% for ban in ban_list %}
|
||||||
|
@ -82,9 +85,16 @@
|
||||||
<td>{{ ban.raison }}</td>
|
<td>{{ ban.raison }}</td>
|
||||||
<td>{{ ban.date_start }}</td>
|
<td>{{ ban.date_start }}</td>
|
||||||
<td>{{ ban.date_end }}</td>
|
<td>{{ ban.date_end }}</td>
|
||||||
|
<td><a href="{% url 'users:edit-ban' ban.id %}">Editer</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "search/sidebar.html" %}
|
{% extends "users/sidebar.html" %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% block title %}Création et modification d'utilisateur{% endblock %}
|
{% block title %}Création et modification d'utilisateur{% endblock %}
|
||||||
|
|
|
@ -34,9 +34,10 @@
|
||||||
<li><a href="#">Statistiques</a></li>
|
<li><a href="#">Statistiques</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="col-sm-3 col-md-3 navbar-right">
|
<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">
|
<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">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
|
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Binary file not shown.
|
@ -12,6 +12,11 @@ from users.forms import PassForm
|
||||||
|
|
||||||
from re2o.login import makeSecret, hashNT
|
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):
|
def form(ctx, template, request):
|
||||||
c = ctx
|
c = ctx
|
||||||
c.update(csrf(request))
|
c.update(csrf(request))
|
||||||
|
|
Loading…
Reference in a new issue