|
{% extends "calebasse/base.html" %}
|
|
|
|
{% block extrascripts %}
|
|
<script>
|
|
$(function() {
|
|
$('tr').click(function (event) {
|
|
var pk = $(this).data('pk');
|
|
if (! $(event.target).is('button')) {
|
|
window.location.href=pk+'/';
|
|
}
|
|
});
|
|
if ($('input').val()) {
|
|
$('#input-box span').show();
|
|
}
|
|
$('#input-box .clear').click(function () {
|
|
$(this).prev('input').val('');
|
|
$(this).closest('form').submit();
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
<h2>Gestion des personnes — Accès</h2>
|
|
<a href="gestion-personnes.html">Retourner à la gestion des personnes</a>
|
|
|
|
<button class="dialog-button" data-url="new/ #form-content" data-default-button="Créer">Nouvel accès</button>
|
|
{% endblock %}
|
|
|
|
{% block beforecontent %}
|
|
<div id="sidebar">
|
|
<div>
|
|
<h3>Rechercher dans les comptes</h3>
|
|
<form>
|
|
<label>Identifiant : <div class="text-input-wrapper"><input type="text"/ name='identifier' value="{{ request.GET.identifier }}"><span class="clear">✖</span></div></label>
|
|
<button>Rechercher</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="content">
|
|
{% if active_list %}
|
|
<table class="main">
|
|
<thead>
|
|
<tr>
|
|
<th>Identifiant</th>
|
|
<th>Courriel</th>
|
|
<th>Fiche Personnel</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for object in active_list %}
|
|
<tr data-pk="{{object.pk}}">
|
|
<td>{{object.username}}</td>
|
|
<td>{{object.email}}</td>
|
|
<td>{% firstof object.userworker "-" %}</td>
|
|
<td><button>⎅</button> <button>-</button> <button>Histo</button></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>Il n'y a aucun compte actif</p>
|
|
{% endif %}
|
|
|
|
{% if inactive_list %}
|
|
<h4>Comptes désactivés</h4>
|
|
|
|
<table class="main">
|
|
<thead>
|
|
<tr>
|
|
<th>Identifiant</th>
|
|
<th>Courriel</th>
|
|
<th>Fiche Personnel</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for object in object_list %}
|
|
{% if not object.is_active %}
|
|
<tr data-pk="{{object.pk}}">
|
|
<td>{{object.username}}</td>
|
|
<td>{{object.email}}</td>
|
|
<td>{% firstof object.userworker.worker "-" %}</td>
|
|
<td><button>⎅</button> <button>-</button> <button>Histo</button></td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|