mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 01:16:27 +00:00
WIP : boutons dans les dropdowns.
This commit is contained in:
parent
8a3adcc99b
commit
da0e2a3e96
1 changed files with 111 additions and 49 deletions
|
@ -26,66 +26,96 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% block title %}Profil{% endblock %}
|
{% block title %}Profil{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{{ users.surname }} {{users.name}}</h2>
|
<h2>{{ users.surname }} {{users.name}}</h2>
|
||||||
<p>
|
<p>Vous êtes {% if users.end_adhesion != None %}<span class="label label-success">
|
||||||
Vous êtes
|
un {{ users.class_name | lower}}</span>{% else %}<span class="label label-danger">
|
||||||
{% if users.end_adhesion != None %}
|
non adhérent</span>{% endif %} et votre connexion est {% if users.has_access %}
|
||||||
<span class="text-success">
|
<span class="label label-success">active</span>{% else %}<span class="label label-danger">désactivée</span>{% endif %}.</p>
|
||||||
un {{ users.class_name | lower}}
|
{% if user_solde %}
|
||||||
</span>
|
<p>Votre solde est de <span class="badge">{{ user.solde }}€</span>.
|
||||||
{% else %}
|
{% if allow_online_payment %}
|
||||||
<span class="text-danger">
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:recharge' %}">
|
||||||
non adhérent
|
<i class="glyphicon glyphicon-piggy-bank"></i>
|
||||||
</span>
|
Recharger
|
||||||
{% endif %}
|
</a>
|
||||||
et votre connexion est
|
|
||||||
{% if users.has_access %}
|
|
||||||
<span class="text-success">
|
|
||||||
active.
|
|
||||||
</span>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-danger">
|
|
||||||
désactivée.
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="panel-group" id="accordion">
|
<div class="panel-group" id="accordion">
|
||||||
|
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading clearfix">
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title pull-left">
|
||||||
<a data-toggle="collapse" href="#collapse1">
|
<a data-toggle="collapse" href="#collapse1">
|
||||||
Informations détaillées
|
Informations détaillées
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
<div class="dropdown pull-right">
|
||||||
<div class="panel-collapse collapse in" id="collapse1">
|
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" id="editionuser" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||||
<div class="panel-body">
|
<i class="glyphicon glyphicon-edit"></i> Édition<span class="caret"></span></button>
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' users.id %}">
|
<ul class="dropdown-menu" arialabelledby="editionuser">
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'users:edit-info' users.id %}">
|
||||||
<i class="glyphicon glyphicon-edit"></i>
|
<i class="glyphicon glyphicon-edit"></i>
|
||||||
Editer
|
Editer
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' users.id %}">
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'users:password' users.id %}">
|
||||||
<i class="glyphicon glyphicon-lock"></i>
|
<i class="glyphicon glyphicon-lock"></i>
|
||||||
Changer le mot de passe
|
Changer le mot de passe
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
|
{% can_change User state %}
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'users:state' users.id %}">
|
||||||
|
<i class="glyphicon glyphicon-flash"></i>
|
||||||
|
Changer le statut
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% acl_end %}
|
||||||
|
{% can_change User groups %}
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'users:groups' users.id %}">
|
||||||
|
<i class="glyphicon glyphicon-ok"></i>
|
||||||
|
Gérer les groupes
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% acl_end %}
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'users:history' 'user' users.id %}">
|
||||||
|
<i class="glyphicon glyphicon-time"></i>
|
||||||
|
Historique
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel-collapse collapse" 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>
|
||||||
{% can_change User state %}
|
{% can_change User state %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' users.id %}">
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' users.id %}">
|
||||||
<i class="glyphicon glyphicon-flash"></i>
|
<i class="fa fa-badge"></i>
|
||||||
Changer le statut
|
Changer le statut
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_change User groups %}
|
{% can_change User groups %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:groups' users.id %}">
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:groups' users.id %}">
|
||||||
<i class="glyphicon glyphicon-ok"></i>
|
<i class="fa fa-check"></i>
|
||||||
Gérer les groupes
|
Gérer les groupes
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-info btn-sm" role="button" href="{% url 'users:history' 'user' users.id %}">
|
<a class="btn btn-info btn-sm" role="button" href="{% url 'users:history' 'user' users.id %}">
|
||||||
<i class="glyphicon glyphicon-time"></i>
|
<i class="fa fa-history"></i>
|
||||||
Historique
|
Historique
|
||||||
</a>
|
</a>
|
||||||
<p>
|
<p>
|
||||||
|
@ -186,17 +216,19 @@ désactivée.
|
||||||
</div>
|
</div>
|
||||||
{% if users.is_class_club %}
|
{% if users.is_class_club %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading clearfix">
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title pull-left">
|
||||||
<a data-toggle="collapse" href="#collapse2">Gérer le club</a>
|
<a data-toggle="collapse" href="#collapse2">Gérer le club</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
<div class="btn-group pull-right">
|
||||||
<div class="panel-collapse collapse" id="collapse2">
|
|
||||||
<div class="panel-body">
|
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-club-admin-members' users.club.id %}">
|
<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>
|
<i class="fa fa-lock"></i>
|
||||||
Gérer admin et membres
|
Gérer admin et membres
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel-collapse collapse" id="collapse2">
|
||||||
|
<div class="panel-body">
|
||||||
<h4>Administrateurs du club</h4>
|
<h4>Administrateurs du club</h4>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -236,11 +268,12 @@ désactivée.
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading clearfix">
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title pull-left">
|
||||||
<a data-toggle="collapse" href="#collapse3">Machines</a>
|
<a data-toggle="collapse" href="#collapse3">Machines</a>
|
||||||
|
<span class="badge">{{machines_list.count}}</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
<a class="btn btn-primary btn-sm pull-right" role="button" href="{% url 'machines:new-machine' users.id %}"><i class="fa fa-desktop"></i> Ajouter une machine</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse3" class="panel-collapse collapse">
|
<div id="collapse3" class="panel-collapse collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
@ -254,14 +287,30 @@ désactivée.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading clearfix">
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title pull-left">
|
||||||
<a data-toggle="collapse" href="#collapse4">Cotisations</a>
|
<a data-toggle="collapse" href="#collapse4">Cotisations</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
{% can_create Facture %}
|
||||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}">
|
||||||
|
<i class="glyphicon glyphicon-piggy-bank"></i>
|
||||||
|
Ajouter une cotisation
|
||||||
|
</a>
|
||||||
|
{% if user_solde %}
|
||||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}">
|
||||||
|
<i class="glyphicon glyphicon-piggy-bank"></i>
|
||||||
|
Modifier le solde
|
||||||
|
</a>
|
||||||
|
{% endif%}{% acl_else %}
|
||||||
|
{% if user_solde %}
|
||||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new_facture_solde' user.id %}">
|
||||||
|
<i class="glyphicon glyphicon-piggy-bank"></i>
|
||||||
|
Ajouter une cotisation par solde</a>{% endif %}{% acl_end %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse4" class="panel-collapse collapse">
|
<div id="collapse4" class="panel-collapse collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h4>{% can_create Facture %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation</a> {% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Modifier le solde</a>{% endif%}{% acl_else %}{% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new_facture_solde' user.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation par solde</a>{% endif %}{% acl_end %}</h4>
|
|
||||||
{% if facture_list %}
|
{% if facture_list %}
|
||||||
{% include "cotisations/aff_cotisations.html" with facture_list=facture_list %}
|
{% include "cotisations/aff_cotisations.html" with facture_list=facture_list %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -271,14 +320,20 @@ désactivée.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading clearfix">
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title pull-left">
|
||||||
<a data-toggle="collapse" href="#collapse5">Bannissements</a>
|
<a data-toggle="collapse" href="#collapse5">Bannissements</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
{% 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
|
||||||
|
</a>{% acl_end %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse5" class="panel-collapse collapse">
|
<div id="collapse5" class="panel-collapse collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% can_create Ban %}<h4><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</a></h4>{% acl_end %}
|
|
||||||
{% if ban_list %}
|
{% if ban_list %}
|
||||||
{% include "users/aff_bans.html" with ban_list=ban_list %}
|
{% include "users/aff_bans.html" with ban_list=ban_list %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -288,14 +343,21 @@ désactivée.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading clearfix">
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title pull-left">
|
||||||
<a data-toggle="collapse" href="#collapse6">Accès à titre gracieux</a>
|
<a data-toggle="collapse" href="#collapse6">Accès à titre gracieux</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
{% can_create Whitelist %}
|
||||||
|
<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>
|
||||||
|
{% acl_end %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse6" class="panel-collapse collapse">
|
<div id="collapse6" class="panel-collapse collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% can_create Whitelist %}<h4><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></h4>{% acl_end %}
|
|
||||||
{% if white_list %}
|
{% if white_list %}
|
||||||
{% include "users/aff_whitelists.html" with white_list=white_list %}
|
{% include "users/aff_whitelists.html" with white_list=white_list %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue