8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-07 18:36:26 +00:00
re2o/users/templates/users/profil.html

357 lines
15 KiB
HTML
Raw Normal View History

{% extends "users/sidebar.html" %}
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.
Copyright © 2017 Gabriel Détraz
Copyright © 2017 Goulven Kermarec
Copyright © 2017 Augustin Lemesle
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
2016-07-03 16:09:58 +00:00
{% load bootstrap3 %}
2017-12-27 23:10:30 +00:00
{% load acl %}
2016-07-03 16:09:58 +00:00
{% block title %}Profil{% endblock %}
{% block content %}
2018-01-27 16:35:33 +00:00
<h2>{{ users.surname }} {{users.name}}</h2>
2018-01-27 20:58:31 +00:00
<p>Vous êtes {% if users.end_adhesion != None %}<span class="label label-success">
un {{ users.class_name | lower}}</span>{% else %}<span class="label label-danger">
non adhérent</span>{% endif %} et votre connexion est {% if users.has_access %}
<span class="label label-success">active</span>{% else %}<span class="label label-danger">désactivée</span>{% endif %}.</p>
{% if user_solde %}
<p>Votre solde est de <span class="badge">{{ user.solde }}€</span>.
{% if allow_online_payment %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:recharge' %}">
2018-03-17 22:53:03 +00:00
<i class="fa fa-euro-sign"></i>
2018-01-27 20:58:31 +00:00
Recharger
</a>
2018-01-27 16:35:33 +00:00
{% endif %}
</p>
2018-01-27 20:58:31 +00:00
{% endif %}
2018-01-27 16:46:58 +00:00
2018-01-27 20:58:31 +00:00
<div class="panel-group" id="accordion">
2018-03-17 22:52:01 +00:00
<div class="panel panel-default">
<div class="panel-heading clearfix" data-parent="#accordion" data-toggle="collapse" data-target="#collapse1">
<h3 class="panel-title pull-left" >
2018-03-17 22:53:03 +00:00
<i class="fa fa-user"></i> Informations détaillées
2018-01-27 16:35:33 +00:00
</h3>
2018-03-29 21:43:43 +00:00
</div>
<div class="panel-collapse collapse in" id="collapse1">
<div class="panel-body">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' users.id %}">
<i class="fa fa-edit"></i>
Editer
</a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' users.id %}">
<i class="fa fa-lock"></i>
Changer le mot de passe
</a>
2018-03-17 22:52:01 +00:00
{% can_change User state %}
2018-03-29 21:43:43 +00:00
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' users.id %}">
<i class="fa fa-id-badge"></i>
Changer le statut
</a>
2018-03-17 22:52:01 +00:00
{% acl_end %}
2018-01-27 20:58:31 +00:00
{% can_change User groups %}
2018-03-29 21:43:43 +00:00
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:groups' users.id %}">
<i class="fa fa-check"></i>
Gérer les groupes
</a>
2018-03-17 22:52:01 +00:00
{% acl_end %}
2018-03-29 21:43:43 +00:00
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:history' 'user' users.id %}">
<i class="fa fa-history"></i>
Historique
</a>
2018-01-27 20:58:31 +00:00
</ul>
</div>
2018-03-29 21:43:43 +00:00
<div class="panel-body">
2018-03-17 23:09:57 +00:00
<div class="table-responsive">
2018-01-27 16:35:33 +00:00
<table class="table table-striped">
<tr>
{% if users.is_class_club %}
<th>Mailing</th>
{% if users.club.mailing %}
<td>{{ users.pseudo }}(-admin)</td>
{% else %}
<td>Mailing désactivée</td>
{% endif %}
{% else %}
<th>Prénom</th>
2018-01-27 16:35:33 +00:00
<td>{{ users.name }}</td>
{% endif %}
2018-01-27 16:35:33 +00:00
<th>Nom</th>
<td>{{ users.surname }}</td>
</tr>
<tr>
<th>Pseudo</th>
<td>{{ users.pseudo }}</td>
<th>E-mail</th>
<td>{{ users.email }}</td>
</tr>
<tr>
<th>Chambre</th>
<td>{{ users.room }}</td>
<th>Téléphone</th>
2018-03-17 22:52:01 +00:00
<td>{{ users.telephone }}</td>
2018-01-27 16:35:33 +00:00
</tr>
<tr>
<th>École</th>
<td>{{ users.school }}</td>
<th>Commentaire</th>
<td>{{ users.comment }}</td>
</tr>
<tr>
<th>Date d'inscription</th>
<td>{{ users.registered }}</td>
<th>Dernière connexion</th>
<td>{{ users.last_login }}</td>
</tr>
<tr>
<th>Fin d'adhésion</th>
{% if users.end_adhesion != None %}
<td><i class="text-success">{{ users.end_adhesion }}</i></td>
{% else %}
<td><i class="text-danger">Non adhérent</i></td>
{% endif %}
<th>Accès gracieux</th>
{% if users.end_whitelist != None %}
<td><i class="text-success">{{ users.end_whitelist }}</i></td>
{% else %}
<td><i class="text-warning">Aucun</i></td>
{% endif %}
<tr>
<th>Bannissement</th>
{% if users.end_ban != None %}
<td><i class="text-danger">{{ users.end_ban }}</i></td>
{% else %}
<td><i class="text-success">Non banni</i></td>
{% endif %}
<th>Statut</th>
{% if users.state == 0 %}
<td><i class="text-success">Actif</i></td>
{% elif users.state == 1 %}
<td><i class="text-danger">Désactivé</i></td>
{% else %}
<td><i class="text-warning">Archivé</i></td>
{% endif %}
</tr>
<tr>
<th>Accès internet</th>
{% if users.has_access == True %}
2018-03-17 22:52:01 +00:00
<td><i class="text-success">Actif (jusqu'au {{ users.end_access }})</i></td>
2018-01-27 16:35:33 +00:00
{% else %}
<td><i class="text-danger">Désactivé</i></td>
{% endif %}
<th>Groupes</th>
{% if users.groups.all %}
2018-03-17 22:52:01 +00:00
<td>{{ users.groups.all|join:", "}}</td>
2018-01-27 16:35:33 +00:00
{% else %}
<td>Aucun</td>
{% endif %}
</tr>
<tr>
<th>Solde</th>
<td>{{ users.solde }} €
{% if allow_online_payment %}
2018-03-17 22:52:01 +00:00
<a class="btn btn-primary btn-sm" style='float:right' role="button" href="{% url 'cotisations:recharge' %}">
2018-03-17 22:53:03 +00:00
<i class="fa fa-euro-sign"></i>
2018-01-27 16:35:33 +00:00
Recharger
</a>
{% endif %}
</td>
2018-03-17 22:52:01 +00:00
{% if users.shell %}
<th>Shell</th>
<td>{{ users.shell }}</td>
{% endif %}
2018-01-27 16:35:33 +00:00
</tr>
</table>
2018-03-17 23:09:57 +00:00
</div>
2018-01-27 16:35:33 +00:00
</div>
</div>
</div>
{% if users.is_class_club %}
2018-01-27 16:35:33 +00:00
<div class="panel panel-default">
<div class="panel-heading clearfix" data-parent="#accordion" data-toggle="collapse" data-target="#collapse2">
2018-01-27 20:58:31 +00:00
<h3 class="panel-title pull-left">
2018-03-17 22:53:03 +00:00
<i class="fa fa-users"></i> Gérer le club
2018-01-27 16:35:33 +00:00
</h3>
2018-01-27 20:58:31 +00:00
</div>
<div class="panel-collapse collapse" id="collapse2">
<div class="panel-body">
2018-03-29 21:43:43 +00:00
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-club-admin-members' users.club.id %}">
<i class="fa fa-lock"></i>
Gérer admin et membres
</a>
</div>
<div class="panel-body">
<h4>Administrateurs du club</h4>
2018-03-17 23:09:57 +00:00
<div class="table-responsive">
2018-01-27 16:35:33 +00:00
<table class="table table-striped">
<thead>
<tr>
<th>Nom</th>
<th>Prenom</th>
<th>Pseudo</th>
</tr>
</thead>
{% for admin in users.club.administrators.all %}
<tr>
<td>{{ admin.surname }}</td>
<td>{{ admin.name }}</td>
2018-03-17 22:52:01 +00:00
<td>{{ admin.pseudo }}</td>
2018-01-27 16:35:33 +00:00
</tr>
{% endfor %}
</table>
2018-03-17 23:09:57 +00:00
</div>
2018-01-27 16:35:33 +00:00
<h4>Membres</h4>
2018-03-17 23:09:57 +00:00
<div class="table-responsive">
2018-01-27 16:35:33 +00:00
<table class="table table-striped">
<thead>
<tr>
<th>Nom</th>
<th>Prenom</th>
<th>Pseudo</th>
</tr>
</thead>
{% for admin in users.club.members.all %}
<tr>
<td>{{ admin.surname }}</td>
<td>{{ admin.name }}</td>
2018-03-17 22:52:01 +00:00
<td>{{ admin.pseudo }}</td>
2018-01-27 16:35:33 +00:00
</tr>
{% endfor %}
</table>
2018-03-17 23:09:57 +00:00
</div>
2018-01-27 16:35:33 +00:00
</div>
</div>
</div>
2016-07-04 18:04:11 +00:00
{% endif %}
2018-01-27 16:35:33 +00:00
<div class="panel panel-default">
<div class="panel-heading clearfix" data-parent="#accordion" data-toggle="collapse" data-target="#collapse3">
2018-01-27 20:58:31 +00:00
<h3 class="panel-title pull-left">
2018-03-17 22:53:03 +00:00
<i class="fa fa-desktop"></i>
Machines
2018-04-16 21:57:22 +00:00
<span class="badge">{{nb_machines}}</span>
2018-01-27 16:35:33 +00:00
</h3>
2018-03-29 21:43:43 +00:00
</div>
<div id="collapse3" class="panel-collapse collapse">
<div class="panel-body">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-machine' users.id %}">
<i class="fa fa-desktop"></i>
Ajouter une machine
2018-03-17 22:52:01 +00:00
</a>
</div>
2018-01-27 16:35:33 +00:00
<div class="panel-body">
{% if machines_list %}
{% include "machines/aff_machines.html" with machines_list=machines_list %}
{% else %}
<p>Aucune machine</p>
{% endif %}
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading clearfix" data-parent="#accordion" data-toggle="collapse" data-target="#collapse4">
2018-01-27 20:58:31 +00:00
<h3 class="panel-title pull-left">
2018-03-17 22:53:03 +00:00
<i class="fa fa-euro-sign"></i>
Cotisations
2018-01-27 16:35:33 +00:00
</h3>
2018-03-29 21:43:43 +00:00
</div>
<div id="collapse4" class="panel-collapse collapse">
<div class="panel-body">
{% can_create Facture %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}">
<i class="fa fa-euro-sign"></i>
Ajouter une cotisation
2018-01-27 20:58:31 +00:00
</a>
{% if user_solde %}
2018-03-29 21:43:43 +00:00
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}">
<i class="fa fa-euro-sign"></i>
Modifier le solde
</a>
2018-01-27 20:58:31 +00:00
{% endif%}{% acl_else %}
{% if user_solde %}
2018-03-29 21:43:43 +00:00
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new_facture_solde' user.id %}">
<i class="fa fa-euro-sign"></i>
Ajouter une cotisation par solde</a>{% endif %}{% acl_end %}
</a>
2018-01-27 20:58:31 +00:00
</div>
2018-01-27 16:35:33 +00:00
<div class="panel-body">
{% if facture_list %}
{% include "cotisations/aff_cotisations.html" with facture_list=facture_list %}
{% else %}
<p>Aucune facture</p>
{% endif %}
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading clearfix" data-parent="#accordion" data-toggle="collapse" data-target="#collapse5">
2018-01-27 20:58:31 +00:00
<h3 class="panel-title pull-left">
2018-03-17 22:53:03 +00:00
<i class="fa fa-ban"></i>
Bannissements
2018-01-27 16:35:33 +00:00
</h3>
2018-03-29 21:43:43 +00:00
</div>
<div id="collapse5" class="panel-collapse collapse">
<div class="panel-body">
{% can_create Ban %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-ban' users.id %}">
<i class="fa fa-ban"></i>
Ajouter un bannissement
2018-03-17 22:52:01 +00:00
</a>
2018-03-29 21:43:43 +00:00
{% acl_end %}
2018-01-27 20:58:31 +00:00
</div>
2018-01-27 16:35:33 +00:00
<div class="panel-body">
{% if ban_list %}
{% include "users/aff_bans.html" with ban_list=ban_list %}
{% else %}
<p>Aucun bannissement</p>
{% endif %}
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading clearfix" data-parent="#accordion" data-toggle="collapse" data-target="#collapse6">
2018-01-27 20:58:31 +00:00
<h3 class="panel-title pull-left">
2018-03-17 22:53:03 +00:00
<i class="fa fa-check-circle"></i>
Accès à titre gracieux
2018-01-27 16:35:33 +00:00
</h3>
2018-03-29 21:43:43 +00:00
</div>
<div id="collapse6" class="panel-collapse collapse">
<div class="panel-body">
2018-03-17 22:52:01 +00:00
{% can_create Whitelist %}
2018-03-29 21:43:43 +00:00
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-whitelist' users.id %}">
<i class="fa fa-check-circle"></i>
Accorder un accès à titre gracieux
</a>
2018-01-27 20:58:31 +00:00
{% acl_end %}
</div>
2018-01-27 16:35:33 +00:00
<div class="panel-body">
{% if white_list %}
{% include "users/aff_whitelists.html" with white_list=white_list %}
{% else %}
<p>Aucun accès gracieux</p>
{% endif %}
</div>
</div>
</div>
</div>
<br />
<br />
<br />
2016-07-03 16:09:58 +00:00
{% endblock %}