diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html
index a5d7c866..2e289858 100644
--- a/preferences/templates/preferences/display_preferences.html
+++ b/preferences/templates/preferences/display_preferences.html
@@ -40,16 +40,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Téléphone obligatoirement requis |
{{ useroptions.is_tel_mandatory }} |
- Activation du solde pour les utilisateurs |
- {{ useroptions.user_solde }} |
+ Auto inscription |
+ {{ useroptions.self_adhesion }} |
Champ gpg fingerprint |
{{ useroptions.gpg_fingerprint }} |
- {% if useroptions.user_solde %}
- Solde négatif |
- {{ useroptions.solde_negatif }} |
- {% endif %}
+ Shell par défaut des utilisateurs |
+ {{ useroptions.shell_default }} |
Creations d'adhérents par tous |
@@ -57,20 +55,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Creations de clubs par tous |
{{ useroptions.all_can_create_club }} |
- {% if useroptions.user_solde %}
+
- Solde maximum |
- {{ useroptions.max_solde }} |
- Montant minimal de rechargement en ligne |
- {{ useroptions.min_online_payment }} |
+ Activation du solde pour les utilisateurs |
+ {{ useroptions.user_solde }} |
+ {% if useroptions.user_solde %}
+ Solde négatif |
+ {{ useroptions.solde_negatif }} |
+
+
+ Solde maximum |
+ {{ useroptions.max_solde }} |
+ Montant minimal de rechargement en ligne |
+ {{ useroptions.min_online_payment }} |
- {% endif %}
-
- Auto inscription |
- {{ useroptions.self_adhesion }} |
- Shell par défaut des utilisateurs |
- {{ useroptions.shell_default }} |
+ {% else %}
+ {% endif%}
Extension mail interne |
{{ useroptions.mail_extension }} |
diff --git a/static/css/base.css b/static/css/base.css
index ab0bf945..39ca6372 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -108,7 +108,6 @@ footer a {
overflow-y: visible;
}
-
/* For tables with long text in cells */
.table.long_text{
@@ -124,3 +123,42 @@ td.long_text{
th.long_text{
width: 60%;
}
+
+/* style for the user page */
+
+.dashboard_container{
+margin-top: 30px;
+margin-bottom: 20px;
+}
+
+
+.panel-heading.dashboard{
+ text-align: center;
+}
+
+.panel-body.dashboard{
+ text-align: center;
+ height: 60px;
+ vertical-align:middle;
+}
+#grad_red {
+ background: red; /* For browsers that do not support gradients */
+ background: linear-gradient(#ff6363, #fefefe); /* Standard syntax (must be last) */
+}
+
+#grad_green {
+ background: green; /* For browsers that do not support gradients */
+ background: linear-gradient(#C8DD58,#4FB64A); /* Standard syntax (must be last) */
+}
+
+#grad_grey {
+ background: gray; /* For browsers that do not support gradients */
+ background: linear-gradient(#d4d4ff, #fefefe); /* Standard syntax (must be last) */
+}
+
+#grad_machines{
+ background: green;
+ background: linear-gradient(#c266e0,#fefefe)
+}
+
+
diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html
index abba61a2..bc0a5ac4 100644
--- a/users/templates/users/profil.html
+++ b/users/templates/users/profil.html
@@ -27,21 +27,99 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load acl %}
{% block title %}Profil{% endblock %}
{% block content %}
-{{ users.surname }} {{users.name}}
-Vous êtes {% if users.end_adhesion != None %}
-un {{ users.class_name | lower}}{% else %}
-non adhérent{% endif %} et votre connexion est {% if users.has_access %}
-active{% else %}désactivée{% endif %}.
-{% if user_solde %}
-Votre solde est de {{ user.solde }}€.
-{% if allow_online_payment %}
-
-
- Recharger
-
-{% endif %}
-
-{% endif %}
+
+
Bienvenue {{users.name}} {{ users.surname }}
+
+
+
+ {% if solde_activated %}
+
+ {% else %}
+
+ {% endif %}
+
+ {% if users.is_ban%}
+
+
Votre compte est banni
+
+ Fin du ban : {{user.end_ban|date:"d M Y"}}
+
+
+ {% elif not users.is_connected%}
+
+
Pas d'accès à internet
+
+
+ {% else %}
+
+
Connecté
+
+ Fin de connexion: {{user.end_adhesion|date:"d M Y"}}
+
+
+ {% endif %}
+
+
+ {% if solde_activated %}
+
+ {% endif %}
+
+ {% if solde_activated %}
+
+ {% else %}
+
+ {% endif %}
+
+ {% if nb_machines %}
+
+
+ {{nb_machines}}
+ Machines
+
+
+
+
+ {% else %}
+
+ {% endif %}
+
+
+
+
+
+
@@ -50,7 +128,7 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}
Informations détaillées
-
+
{% if machines_list %}
diff --git a/users/views.py b/users/views.py
index 6525f8fb..1cf4a4de 100644
--- a/users/views.py
+++ b/users/views.py
@@ -113,8 +113,8 @@ def new_user(request):
GTU_sum_up = GeneralOption.get_cached_value('GTU_sum_up')
GTU = GeneralOption.get_cached_value('GTU')
if user.is_valid():
- user = user.save(commit=False)
- user.save()
+ #user = user.save(commit=False)
+ user = user.save()
user.reset_passwd_mail(request)
messages.success(request, "L'utilisateur %s a été crée, un mail\
pour l'initialisation du mot de passe a été envoyé" % user.pseudo)
@@ -957,6 +957,7 @@ def profil(request, users, **_kwargs):
'white_list': whitelists,
'user_solde': user_solde,
'allow_online_payment': allow_online_payment,
+ 'solde_activated': OptionalUser.objects.first().user_solde
}
)