mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-07-25 15:05:24 +02:00
Continue to remove old perm system
This commit is contained in:
@ -1,96 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block title %}Profil{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Compte</h2>
|
||||
<div>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' %}">
|
||||
<i class="glyphicon glyphicon-edit"></i>
|
||||
Editer
|
||||
</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' %}">
|
||||
<i class="glyphicon glyphicon-lock"></i>
|
||||
Changer le mot de passe
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
<br/>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Prénom</th>
|
||||
<td>{{ user.first_name }}</td>
|
||||
<th>Nom</th>
|
||||
<td>{{ user.last_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pseudo</th>
|
||||
<td>{{ user.username }}</td>
|
||||
<th>E-mail</th>
|
||||
<td>{{ user.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Commentaire</th>
|
||||
<td>{{ user.comment }}</td>
|
||||
<th>Date d'inscription</th>
|
||||
<td>{{ user.date_joined }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Adresse</th>
|
||||
<td>{{ user.address }}</td>
|
||||
<th>Telephone</th>
|
||||
<td>{{ user.telephone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Emprunts maximums autorisés</th>
|
||||
<td>{{ user.maxemprunt }}</td>
|
||||
<th>Droits</th>
|
||||
{% if list_droits %}
|
||||
<td>{% for droit in list_droits %}{{ droit.right }}{% if list_droits|length != forloop.counter %} -
|
||||
{% endif %} {% endfor %}</td>
|
||||
{% else %}
|
||||
<td>Aucun</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Statut</th>
|
||||
{% if user.is_active %}
|
||||
<td><font color="green">Actif</font></td>
|
||||
{% else %}
|
||||
<td><font color="red">Désactivé</font></td>
|
||||
{% endif %}
|
||||
<th>Dernière connexion</th>
|
||||
<td>{{ user.last_login }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Adherent pour l'année en cours</th>
|
||||
{% if user.is_adherent %}
|
||||
<td><font color="green">Oui</font></td>
|
||||
{% else %}
|
||||
<td><font color="red">Non</font></td>
|
||||
{% endif %}
|
||||
{% if not user.is_adherent and is_bureau %}
|
||||
<th></th>
|
||||
<td><a class="btn btn-primary btn-sm" role="button" href="{% url 'users:adherer' user.id %}"><i
|
||||
class="glyphicon glyphicon-flag"></i> Adhérer</a></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Emprunts</h2>
|
||||
{% if is_perm or is_bureau %}
|
||||
<h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'media:add-emprunt' user.id %}"><i
|
||||
class="glyphicon glyphicon-flag"></i> Ajouter</a></h4>
|
||||
{% endif %}
|
||||
{% if emprunts_list %}
|
||||
{% include "media/aff_emprunts.html" with emprunts_list=emprunts_list %}
|
||||
{% else %}
|
||||
<p>Aucun emprunt</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -10,6 +10,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% block content %}
|
||||
{% bootstrap_form_errors userform %}
|
||||
|
||||
<a href="{% url 'users:password' %}">
|
||||
Changer le mot de passe
|
||||
</a>
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form userform %}
|
||||
|
Reference in New Issue
Block a user