2012-06-14 11:50:28 +02:00
|
|
|
|
{% extends "users_admin/base.html" %}
|
|
|
|
|
{% load i18n %}
|
2014-01-07 14:32:38 +01:00
|
|
|
|
{% load staticfiles %}
|
2012-06-14 11:50:28 +02:00
|
|
|
|
|
|
|
|
|
{% block title %}Accueil{% endblock %}
|
|
|
|
|
|
2012-06-14 23:04:20 +02:00
|
|
|
|
{% block nav %}
|
2014-01-16 18:21:34 +01:00
|
|
|
|
<li><a href="create"><i class="icon-plus"></i> Créer des utilisateurs</a></li>
|
|
|
|
|
<li><a href="import"><i class="icon-download"></i> Importer des utilisateurs</a></li>
|
2012-06-14 23:04:20 +02:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
2012-06-15 01:10:10 +02:00
|
|
|
|
{% block title_content %}
|
2014-01-09 17:38:29 +01:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="span8">
|
2012-06-14 11:50:28 +02:00
|
|
|
|
<h1>Liste des utilisateurs</h1>
|
2014-01-09 17:38:29 +01:00
|
|
|
|
</div>
|
|
|
|
|
<div class="span4">
|
2014-01-16 13:21:27 +01:00
|
|
|
|
<form method="get" action="" class="form-inline pull-right">
|
|
|
|
|
<div class="input-prepend input-append">
|
2014-01-16 17:07:15 +01:00
|
|
|
|
<span class="add-on"><a href="./?filter="><i class="icon-remove-circle"></i></a></span>
|
|
|
|
|
<input id="filter" type="text" name="filter" value="{{ filter }}" style="color: red; font-weight: bold;" placeholder="Filtre (avec * et ?)"/>
|
2014-01-16 13:21:27 +01:00
|
|
|
|
<input type="submit" value="Filtrer" class="btn" />
|
|
|
|
|
</div>
|
2014-01-09 17:38:29 +01:00
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-01-16 13:21:27 +01:00
|
|
|
|
|
2012-06-15 01:10:10 +02:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
2012-06-14 11:50:28 +02:00
|
|
|
|
|
2012-06-15 12:36:33 +02:00
|
|
|
|
<form action="multiple" method="post">
|
|
|
|
|
|
|
|
|
|
<br />
|
2012-06-14 11:50:28 +02:00
|
|
|
|
<table class="table table-condensed table-striped" id="usersTable">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2014-01-16 17:12:37 +01:00
|
|
|
|
<th></th>
|
2014-01-09 14:33:53 +01:00
|
|
|
|
<th data-sort="string">login</th>
|
|
|
|
|
<th data-sort="string">actif?</th>
|
|
|
|
|
<th data-sort="string">expiration</th>
|
|
|
|
|
<th data-sort="string">nom complet</th>
|
|
|
|
|
<th><input type="checkbox" id="check-all" /></th>
|
|
|
|
|
<script>
|
|
|
|
|
$('#check-all').click(function (event) {
|
|
|
|
|
$('input[name="users"]').each(function () {
|
|
|
|
|
this.click();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2012-06-14 11:50:28 +02:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2012-06-25 22:56:05 +02:00
|
|
|
|
{% for user in users.values|dictsort:"name" %}
|
2012-06-20 12:53:41 +02:00
|
|
|
|
<tr {% if user.disabled or user.ttl == 0 %} class="disabled"{% endif %}>
|
2014-01-16 17:12:37 +01:00
|
|
|
|
<td style="text-align: right;">
|
|
|
|
|
<a href="update/{{ user.name }}"><i class="icon-edit"></i></a>
|
|
|
|
|
</td>
|
2012-06-20 15:35:21 +02:00
|
|
|
|
<td data-order-by="{{ user.name }}">
|
2014-01-16 17:07:15 +01:00
|
|
|
|
<a href="read/{{ user.name }}" {% if user.disabled or user.ttl == 0 %} class="disabled"{% endif %}>{{ user.name }}</a>
|
2012-06-20 12:53:41 +02:00
|
|
|
|
{% if 'univnautes-idp-multiple' in user.priv %} — multiple{% endif %}
|
|
|
|
|
{% if user.disabled %} — désactivé{% endif %}
|
|
|
|
|
{% if user.ttl == 0 %} — expiré{% endif %}
|
2012-06-14 11:50:28 +02:00
|
|
|
|
</td>
|
2012-06-20 15:35:21 +02:00
|
|
|
|
<td data-order-by="{% if user.disabled %}DIS{% elif user.ttl == 0 %}EXP{% else %}ACT{% endif %}">
|
|
|
|
|
{% if user.disabled %}<i class="icon-pause"></i>
|
|
|
|
|
{% elif user.ttl == 0 %}<i class="icon-stop"></i>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</td>
|
2012-06-25 22:56:05 +02:00
|
|
|
|
<td data-order-by="{{ user.expires|date:"c"|default:"2999-12-31" }}">
|
2012-06-20 15:35:21 +02:00
|
|
|
|
{{ user.expires|default:"jamais" }}
|
2012-06-25 22:56:05 +02:00
|
|
|
|
{% if user.ttl > 0 %} ({{ user.ttl }} jour{% if user.ttl > 1 %}s{% endif %})
|
|
|
|
|
{% elif user.ttl == 0 %} — expiré{% endif %}
|
2012-06-20 15:35:21 +02:00
|
|
|
|
</td>
|
2012-06-14 11:50:28 +02:00
|
|
|
|
<td>{{ user.descr }}</td>
|
2012-06-15 01:10:10 +02:00
|
|
|
|
<td><input type="checkbox" name="users" value="{{ user.name }}" /></td>
|
2012-06-14 11:50:28 +02:00
|
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
2012-06-15 14:37:36 +02:00
|
|
|
|
<div class="form-actions">
|
2014-01-09 17:38:29 +01:00
|
|
|
|
|
2014-01-16 18:21:34 +01:00
|
|
|
|
<a href="create" class="btn"><i class="icon-plus"></i> Créer des utilisateurs</a>
|
|
|
|
|
<a href="import" class="btn"><i class="icon-download"></i> Importer des utilisateurs</a>
|
2012-06-15 14:37:36 +02:00
|
|
|
|
<div class=" pull-right">
|
2012-06-15 12:36:33 +02:00
|
|
|
|
<input type="submit" value="Ok" class="btn pull-right" />
|
|
|
|
|
<select name="action" class="pull-right">
|
|
|
|
|
<option value="none" selected="selected">Choisir une action ...</option>
|
2012-06-20 12:53:41 +02:00
|
|
|
|
<option value="desactivate">Désactiver les utilisateurs choisis</option>
|
2012-06-20 16:16:28 +02:00
|
|
|
|
<option value="activate">Activer les utilisateurs choisis</option>
|
2012-06-15 12:36:33 +02:00
|
|
|
|
<option value="delete">Supprimer les utilisateurs choisis</option>
|
2014-01-16 17:07:15 +01:00
|
|
|
|
<option value="csv">Exporter la liste en CSV</option>
|
2014-01-09 17:38:29 +01:00
|
|
|
|
<!-- option value="expire">Changer la date d'expiration des utilisateurs choisis</option -->
|
2012-06-15 12:36:33 +02:00
|
|
|
|
</select>
|
2012-06-15 01:10:10 +02:00
|
|
|
|
</div>
|
2012-06-15 14:37:36 +02:00
|
|
|
|
</div>
|
2012-06-15 01:10:10 +02:00
|
|
|
|
|
2012-06-15 14:37:36 +02:00
|
|
|
|
{% csrf_token %}
|
2012-06-15 01:10:10 +02:00
|
|
|
|
</form>
|
|
|
|
|
|
2014-01-07 14:06:27 +01:00
|
|
|
|
<script src="{% static "jquery/js/stupidtable.js" %}"></script>
|
2012-06-14 11:50:28 +02:00
|
|
|
|
<script>
|
|
|
|
|
$(function(){ $("#usersTable").stupidtable(); });
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|