profil.html 2.96 KB
Newer Older
Gabriel Detraz's avatar
Gabriel Detraz committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
{% extends "users/sidebar.html" %}
{% load bootstrap3 %}

{% block title %}Profil{% endblock %}

{% block content %}
    <h2>Adhérent</h2>
    <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' user.id %}"><i class="glyphicon glyphicon-edit"></i> Editer</a>  
    <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' user.id %}"><i class="glyphicon glyphicon-lock"></i> Changer le mot de passe</a>  
    {% if is_bureau %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' user.id %}"><i class="glyphicon glyphicon-flash"></i> Changer le statut</a>
    <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-right' user.id %}"><i class="glyphicon glyphicon-ok"></i> Ajouter un droit</a>{% endif %}
    <a class="btn btn-info btn-sm" role="button" href="{% url 'users:history' 'user' user.id %}"><i class="glyphicon glyphicon-repeat"></i> Historique</a>
    <br />
    <br />
    <table class="table table-striped">
        <tr>
            <th>Prénom</th>
            <td>{{ user.name }}</td>
            <th>Nom</th>
            <td>{{ user.surname }}</td>
        </tr>
        <tr>
            <th>Pseudo</th>
            <td>{{ user.pseudo }}</td>
            <th>E-mail</th>
            <td>{{ user.email }}</td>
        </tr>
28 29 30 31
        <tr>
            <th>Telephone</th>
            <td>{{ user.telephone }}</td>
            <th>Solde</th>
32
            <td>{{ user.solde }} €</td>
33
        </tr>
Gabriel Detraz's avatar
Gabriel Detraz committed
34 35 36
        <tr>
            <th>Date d'inscription</th>
            <td>{{ user.registered }}</td>
37 38 39 40 41 42 43
            <th>ENS</th>
            {% if user.is_ens %}
            <td><font color="green">Oui</font></td>
            {% else %}
            <td><font color="red">Non</font></td>
            {% endif %}
        </tr>
Gabriel Detraz's avatar
Gabriel Detraz committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
        <tr>
            <th>Statut</th>
            {% if user.state == 0 %}
            <td><font color="green">Actif</font></td>
            {% elif user.state == 1 %}
            <td><font color="red">Désactivé</font></td>
            {% else %}
            <td><font color="orange">Archivé</font></td>
            {% endif %}
            <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>
61 62 63
            <th>Commentaire</th>
            <td>{{ user.comment }}</td>
        </tr>
Gabriel Detraz's avatar
Gabriel Detraz committed
64
    </table>
65 66 67

<h2>Commandes et crédits</h2>
{% if is_bureau %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'panier:add-credit' user.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Enregistrer un crédit</a>{% endif %}
68
<a class="btn btn-primary btn-sm" role="button" href="{% url 'panier:new-commande' user.id %}"><i class="glyphicon glyphicon-shopping-cart"></i> Nouvelle commande</a>
69 70 71 72 73 74
<br/>

{%  include "panier/aff_paniers.html" %}
<br/>
<br/>
<br/>
Gabriel Detraz's avatar
Gabriel Detraz committed
75 76
{% endblock %}

77