This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
univnautes-old/virtualenv/pfidp/templates/users_admin/index.html

85 lines
2.7 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "users_admin/base.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}Accueil{% endblock %}
{% block nav %}
<li><a href="create">Créer un utilisateur</a></li>
{% endblock %}
{% block title_content %}
<h1>Liste des utilisateurs</h1>
{% endblock %}
{% block content %}
<form action="multiple" method="post">
<br />
<table class="table table-condensed table-striped" id="usersTable">
<thead>
<tr>
<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>
</tr>
</thead>
<tbody>
{% for user in users.values|dictsort:"name" %}
<tr {% if user.disabled or user.ttl == 0 %} class="disabled"{% endif %}>
<td data-order-by="{{ user.name }}">
<a href="update/{{ user.name }}" {% if user.disabled or user.ttl == 0 %} class="disabled"{% endif %}>{{ user.name }}</a>
{% if 'univnautes-idp-multiple' in user.priv %} &mdash; multiple{% endif %}
{% if user.disabled %} &mdash; désactivé{% endif %}
{% if user.ttl == 0 %} &mdash; expiré{% endif %}
</td>
<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>
<td data-order-by="{{ user.expires|date:"c"|default:"2999-12-31" }}">
{{ user.expires|default:"jamais" }}
{% if user.ttl > 0 %} ({{ user.ttl }} jour{% if user.ttl > 1 %}s{% endif %})
{% elif user.ttl == 0 %} &mdash; expiré{% endif %}
</td>
<td>{{ user.descr }}</td>
<td><input type="checkbox" name="users" value="{{ user.name }}" /></td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="form-actions">
<a href="create" class="btn">Créer un utilisateur</a>
<div class=" pull-right">
<input type="submit" value="Ok" class="btn pull-right" />
<select name="action" class="pull-right">
<option value="none" selected="selected">Choisir une action ...</option>
<option value="desactivate">Désactiver les utilisateurs choisis</option>
<option value="activate">Activer les utilisateurs choisis</option>
<option value="delete">Supprimer les utilisateurs choisis</option>
</select>
</div>
</div>
{% csrf_token %}
</form>
<script src="{% static "jquery/js/stupidtable.js" %}"></script>
<script>
$(function(){ $("#usersTable").stupidtable(); });
</script>
{% endblock %}