From 49da8ee0bf259d5ecca9a4e31baad7b73fa3d825 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 27 Jan 2018 12:50:11 +0100 Subject: [PATCH 01/10] On a besoin de pycrypto. --- install_re2o.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install_re2o.sh b/install_re2o.sh index 479eaa43..4b7157b1 100755 --- a/install_re2o.sh +++ b/install_re2o.sh @@ -241,6 +241,7 @@ apt-get -y install python3-django python3-dateutil texlive-latex-base texlive-fo pip3 install django-bootstrap3 pip3 install django-ldapdb pip3 install django-macaddress +pip3 install pycrypto if [ $sql_bdd_type == 1 ] then From e1f002b09af29dd202ebbbbd91d9803dd13ea8ce Mon Sep 17 00:00:00 2001 From: root Date: Sat, 27 Jan 2018 13:02:24 +0100 Subject: [PATCH 02/10] =?UTF-8?q?pip=20c'est=20la=20vie,=20mais=20askip=20?= =?UTF-8?q?=C3=A7a=20pla=C3=AEt=20pas.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install_re2o.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_re2o.sh b/install_re2o.sh index 4b7157b1..80379bdb 100755 --- a/install_re2o.sh +++ b/install_re2o.sh @@ -237,11 +237,11 @@ install_base=$(dialog --clear \ $HEIGHT $WIDTH \ 2>&1 >/dev/tty) +echo "Installation des paquets de base" apt-get -y install python3-django python3-dateutil texlive-latex-base texlive-fonts-recommended python3-djangorestframework python3-django-reversion python3-pip libsasl2-dev libldap2-dev libssl-dev python3-crypto pip3 install django-bootstrap3 pip3 install django-ldapdb pip3 install django-macaddress -pip3 install pycrypto if [ $sql_bdd_type == 1 ] then From 3f8814edd80de9c5cb8c16d2d13483b68e374b49 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 27 Jan 2018 17:35:33 +0100 Subject: [PATCH 03/10] =?UTF-8?q?Menu=20en=20accord=C3=A9on.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/templates/users/profil.html | 466 +++++++++++++++++------------- 1 file changed, 267 insertions(+), 199 deletions(-) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index f41ce8cd..21e455db 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -28,206 +28,274 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block title %}Profil{% endblock %} {% block content %} -

{{ users.class_name }} : {{ users.surname }} {{users.name}}

-
- - - Editer - - - - Changer le mot de passe - - {% can_change User state %} - - - Changer le statut - - {% acl_end %} - {% can_change User groups %} - - - Gérer les groupes - - {% acl_end %} - - - Historique - -
-

-
-

- - - {% if users.is_class_club %} - - {% if users.club.mailing %} - - {% else %} - - {% endif %} - {% else %} - - - {% endif %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% if users.end_adhesion != None %} - - {% else %} - - {% endif %} - - {% if users.end_whitelist != None %} - - {% else %} - - {% endif %} - - - {% if users.end_ban != None %} - - {% else %} - - {% endif %} - - {% if users.state == 0 %} - - {% elif users.state == 1 %} - - {% else %} - - {% endif %} - - - - {% if users.has_access == True %} - - {% else %} - - {% endif %} - - {% if users.groups.all %} - - {% else %} - - {% endif %} - - {% if allow_online_payment %} - - - - {% endif %} - {% if users.shell %} - - - {% endif %} - -
Mailing{{ users.pseudo }}(-admin)Mailing désactivéePrénom{{ users.name }}Nom{{ users.surname }}
Pseudo{{ users.pseudo }}E-mail{{ users.email }}
Chambre{{ users.room }}Téléphone{{ users.telephone }}
École{{ users.school }}Commentaire{{ users.comment }}
Date d'inscription{{ users.registered }}Dernière connexion{{ users.last_login }}
Fin d'adhésion{{ users.end_adhesion }}Non adhérentAccès gracieux{{ users.end_whitelist }}Aucun
Bannissement{{ users.end_ban }}Non banniStatutActifDésactivéArchivé
Accès internetActif (jusqu'au {{ users.end_access }})DésactivéGroupes{{ users.groups.all|join:", "}}Aucun
Solde{{ users.solde }} € - - - Recharger +

{{ 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 %} +

+
Shell{{ users.shell }}
+ + +
+
+ + + Editer + + + + Changer le mot de passe + + {% can_change User state %} + + + Changer le statut + + {% acl_end %} + {% can_change User groups %} + + + Gérer les groupes + + {% acl_end %} + + + Historique + +

+
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if users.end_adhesion != None %} + + {% else %} + + {% endif %} + + {% if users.end_whitelist != None %} + + {% else %} + + {% endif %} + + + {% if users.end_ban != None %} + + {% else %} + + {% endif %} + + {% if users.state == 0 %} + + {% elif users.state == 1 %} + + {% else %} + + {% endif %} + + + + {% if users.has_access == True %} + + {% else %} + + {% endif %} + + {% if users.groups.all %} + + {% else %} + + {% endif %} + + {% if allow_online_payment %} + + + + {% endif %} + {% if users.shell %} + + + {% endif %} + +
Prénom{{ users.name }}Nom{{ users.surname }}
Pseudo{{ users.pseudo }}E-mail{{ users.email }}
Chambre{{ users.room }}Téléphone{{ users.telephone }}
École{{ users.school }}Commentaire{{ users.comment }}
Date d'inscription{{ users.registered }}Dernière connexion{{ users.last_login }}
Fin d'adhésion{{ users.end_adhesion }}Non adhérentAccès gracieux{{ users.end_whitelist }}Aucun
Bannissement{{ users.end_ban }}Non banniStatutActifDésactivéArchivé
Accès internetActif (jusqu'au {{ users.end_access }})DésactivéGroupes{{ users.groups.all|join:", "}}Aucun
Solde{{ users.solde }} € + + + Recharger + + Shell{{ users.shell }}
+
+
+ {% if users.is_class_club %} - - - Gérer admin et membres - -

Administrateurs du club

- - - - - - - - - {% for admin in users.club.administrators.all %} - - - - - - {% endfor %} -
NomPrenomPseudo
{{ admin.surname }}{{ admin.name }}{{ admin.pseudo }}
-

Membres

- - - - - - - - - {% for admin in users.club.members.all %} - - - - - - {% endfor %} -
NomPrenomPseudo
{{ admin.surname }}{{ admin.name }}{{ admin.pseudo }}
+
+
+

+ Gérer le club +

+
+
+
+ + + Gérer admin et membres + +

Administrateurs du club

+ + + + + + + + + {% for admin in users.club.administrators.all %} + + + + + + {% endfor %} +
NomPrenomPseudo
{{ admin.surname }}{{ admin.name }}{{ admin.pseudo }}
+

Membres

+ + + + + + + + + {% for admin in users.club.members.all %} + + + + + + {% endfor %} +
NomPrenomPseudo
{{ admin.surname }}{{ admin.name }}{{ admin.pseudo }}
+
+
+
{% endif %} -

Machines

- {% can_create Machine users.id %} -

Ajouter une machine

- {% acl_end %} - {% if machines_list %} - {% include "machines/aff_machines.html" with machines_list=machines_list %} - {% else %} -

Aucune machine

- {% endif %} -

Cotisations

-

{% can_create Facture %} Ajouter une cotisation {% if user_solde %} Modifier le solde{% endif%}{% acl_else %}{% if user_solde %} Ajouter une cotisation par solde{% endif %}{% acl_end %}

- {% if facture_list %} - {% include "cotisations/aff_cotisations.html" with facture_list=facture_list %} - {% else %} -

Aucune facture

- {% endif %} -

Bannissements

- {% can_create Ban %}

Ajouter un bannissement

{% acl_end %} - {% if ban_list %} - {% include "users/aff_bans.html" with ban_list=ban_list %} - {% else %} -

Aucun bannissement

- {% endif %} -

Accès à titre gracieux :

- {% can_create Whitelist %}

Accorder un accès à titre gracieux

{% acl_end %} - {% if white_list %} - {% include "users/aff_whitelists.html" with white_list=white_list %} - {% else %} -

Aucun accès gracieux

- {% endif %} -
-
-
+
+
+

+ Machines +

+ +
+
+
+

Ajouter une machine

+ {% if machines_list %} + {% include "machines/aff_machines.html" with machines_list=machines_list %} + {% else %} +

Aucune machine

+ {% endif %} +
+
+
+
+
+

+ Cotisations +

+
+
+
+

{% can_create Facture %} Ajouter une cotisation {% if user_solde %} Modifier le solde{% endif%}{% acl_else %}{% if user_solde %} Ajouter une cotisation par solde{% endif %}{% acl_end %}

+ {% if facture_list %} + {% include "cotisations/aff_cotisations.html" with facture_list=facture_list %} + {% else %} +

Aucune facture

+ {% endif %} +
+
+
+
+
+

+ Bannissements +

+
+
+
+ {% can_create Ban %}

Ajouter un bannissement

{% acl_end %} + {% if ban_list %} + {% include "users/aff_bans.html" with ban_list=ban_list %} + {% else %} +

Aucun bannissement

+ {% endif %} +
+
+
+
+ +
+
+ {% can_create Whitelist %}

Accorder un accès à titre gracieux

{% acl_end %} + {% if white_list %} + {% include "users/aff_whitelists.html" with white_list=white_list %} + {% else %} +

Aucun accès gracieux

+ {% endif %} +
+
+
+ +
+
+
{% endblock %} From 8a3adcc99b6265b9d174400e526d9aed95105dfa Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 27 Jan 2018 17:46:58 +0100 Subject: [PATCH 04/10] Couleurs dans les informations. --- users/templates/users/profil.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index 21e455db..fe0b6c55 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -32,19 +32,29 @@ with this program; if not, write to the Free Software Foundation, Inc.,

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 %}

-
+ + +

From da0e2a3e967607ee939209cfa1dcde82b64ae85d Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 27 Jan 2018 21:58:31 +0100 Subject: [PATCH 05/10] WIP : boutons dans les dropdowns. --- users/templates/users/profil.html | 160 +++++++++++++++++++++--------- 1 file changed, 111 insertions(+), 49 deletions(-) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index fe0b6c55..30503950 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -26,66 +26,96 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load bootstrap3 %} {% 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. - +

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 %} +
- -
-
-

+
+

Informations détaillées

+
-
+
- + Editer - + Changer le mot de passe {% can_change User state %} - + Changer le statut {% acl_end %} {% can_change User groups %} - + Gérer les groupes {% acl_end %} - + Historique

@@ -186,18 +216,20 @@ désactivée.

{% if users.is_class_club %}
-
-

+ -
-
+
Gérer admin et membres -

Administrateurs du club

+
+
+
+
+

Administrateurs du club

@@ -236,11 +268,12 @@ désactivée. {% endif %}
-
-

+
+

Machines + {{machines_list.count}}

- + Ajouter une machine
@@ -254,14 +287,30 @@ désactivée.
-
-

+
+

Cotisations

+
+ {% can_create Facture %} + + + Ajouter une cotisation + + {% if user_solde %} + + + Modifier le solde + + {% endif%}{% acl_else %} + {% if user_solde %} + + + Ajouter une cotisation par solde{% endif %}{% acl_end %} +
-

{% can_create Facture %} Ajouter une cotisation {% if user_solde %} Modifier le solde{% endif%}{% acl_else %}{% if user_solde %} Ajouter une cotisation par solde{% endif %}{% acl_end %}

{% if facture_list %} {% include "cotisations/aff_cotisations.html" with facture_list=facture_list %} {% else %} @@ -271,14 +320,20 @@ désactivée.
-
-

+
+

Bannissements

+
+ {% can_create Ban %} + + + Ajouter un bannissement + {% acl_end %} +
- {% can_create Ban %}

Ajouter un bannissement

{% acl_end %} {% if ban_list %} {% include "users/aff_bans.html" with ban_list=ban_list %} {% else %} @@ -288,14 +343,21 @@ désactivée.
-
-

+
+

Accès à titre gracieux

+
+ {% can_create Whitelist %} + + + Accorder un accès à titre gracieux + + {% acl_end %} +
- {% can_create Whitelist %}

Accorder un accès à titre gracieux

{% acl_end %} {% if white_list %} {% include "users/aff_whitelists.html" with white_list=white_list %} {% else %} From 4924dc50b49dd46bfa5775022cc4509edf20855b Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Wed, 7 Mar 2018 19:03:25 +0100 Subject: [PATCH 06/10] Pas de boutons redondants. --- users/templates/users/profil.html | 40 +++++-------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index 30503950..b38d4b9d 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -53,24 +53,24 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

- - - Editer - - - - Changer le mot de passe - - {% can_change User state %} - - - Changer le statut - - {% acl_end %} - {% can_change User groups %} - - - Gérer les groupes - - {% acl_end %} - - - Historique - -

-
-

@@ -277,7 +250,6 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}
-

Ajouter une machine

{% if machines_list %} {% include "machines/aff_machines.html" with machines_list=machines_list %} {% else %} From 9e79b117b236a7f3b04d8563bdc25d335fe46321 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Wed, 7 Mar 2018 19:40:29 +0100 Subject: [PATCH 07/10] =?UTF-8?q?La=20totalit=C3=A9e=20des=20barres=20d?= =?UTF-8?q?=C3=A9clenche=20l'affichage.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/templates/users/profil.html | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index b38d4b9d..48f37ae3 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -45,11 +45,9 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}
-
-

- +
+

Informations détaillées -

-
+

Prénom
@@ -189,9 +187,9 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %} {% if users.is_class_club %}
-
+

- Gérer le club + Gérer le club

{% endif %}
-
+

- Machines + Machines {{machines_list.count}}

Ajouter une machine @@ -259,9 +257,9 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}
-
+

- Cotisations + Cotisations

{% can_create Facture %} @@ -292,9 +290,9 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}
-
+

- Bannissements + Bannissements

{% can_create Ban %} @@ -315,9 +313,9 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}
-
+

- Accès à titre gracieux + Accès à titre gracieux

{% can_create Whitelist %} From f4a7fb7dfce706caf413db2c5645cf93eeefaad4 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 17 Mar 2018 23:52:01 +0100 Subject: [PATCH 08/10] =?UTF-8?q?Homog=C3=A9n=C3=A9isation=20des=20boutons?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/templates/users/profil.html | 143 ++++++++++++++++++++---------- 1 file changed, 95 insertions(+), 48 deletions(-) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index 48f37ae3..e7392d52 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -44,14 +44,15 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %} {% endif %}
-
+

Informations détaillées

- + @@ -155,13 +156,13 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %} {% if users.has_access == True %} - + {% else %} {% endif %} {% if users.groups.all %} - + {% else %} {% endif %} @@ -170,16 +171,16 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %} - {% endif %} - {% if users.shell %} - - - {% endif %} + {% endif %} + {% if users.shell %} + + + {% endif %}
Chambre {{ users.room }} Téléphone{{ users.telephone }}{{ users.telephone }}
École
Accès internetActif (jusqu'au {{ users.end_access }})Actif (jusqu'au {{ users.end_access }})DésactivéGroupes{{ users.groups.all|join:", "}}{{ users.groups.all|join:", "}}Aucun
Solde {{ users.solde }} € - + Recharger Shell{{ users.shell }}Shell{{ users.shell }}
@@ -191,11 +192,18 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

Gérer le club

-
@@ -213,7 +221,7 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %} {{ admin.surname }} {{ admin.name }} - {{ admin.pseudo }} + {{ admin.pseudo }} {% endfor %} @@ -230,7 +238,7 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %} {{ admin.surname }} {{ admin.name }} - {{ admin.pseudo }} + {{ admin.pseudo }} {% endfor %} @@ -244,7 +252,19 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %} Machines {{machines_list.count}}

- Ajouter une machine +
@@ -261,22 +281,34 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

Cotisations

-
- {% can_create Facture %} - - - Ajouter une cotisation +
@@ -294,12 +326,20 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

Bannissements

-
- {% can_create Ban %} - - - Ajouter un bannissement - {% acl_end %} +
@@ -317,13 +357,20 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

Accès à titre gracieux

-
- {% can_create Whitelist %} - - - Accorder un accès à titre gracieux +
From f70a16877d52b21437f2e67072cc28985b354395 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 17 Mar 2018 23:53:03 +0100 Subject: [PATCH 09/10] =?UTF-8?q?Ic=C3=B4nes=20partout.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/templates/users/profil.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index e7392d52..ce23397a 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -36,7 +36,7 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

Votre solde est de {{ user.solde }}€. {% if allow_online_payment %} - + Recharger {% endif %} @@ -47,7 +47,7 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

- Informations détaillées + Informations détaillées