From 573e6c2ad244a8e41f90f525e3b94fac5dc26563 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 30 Dec 2018 12:06:20 +0100 Subject: [PATCH] Use a detailed list rather than a table on profile --- static/css/base.css | 18 +- users/templates/users/profil.html | 288 +++++++++++++++++------------- 2 files changed, 170 insertions(+), 136 deletions(-) diff --git a/static/css/base.css b/static/css/base.css index dcb88db8..05409553 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -79,19 +79,6 @@ a > i.fa { vertical-align: middle; } -/* Pull sidebars to the bottom */ -@media (min-width: 767px) { - .row { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - } - .row > [class*='col-'] { - flex-direction: column; - } -} - /* On small screens, set height to 'auto' for sidenav and grid */ @media screen and (max-width: 767px) { .sidenav { @@ -145,3 +132,8 @@ th.long_text{ .dashboard{ text-align: center; } + +/* Detailed information on profile page */ +dl.profile-info > div { + padding: 8px; +} diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index cdc9a9d1..370089ff 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -117,147 +117,189 @@ with this program; if not, write to the Free Software Foundation, Inc.,
-
-

- {% trans " Detailed information" %} +
+

+ {% trans " Detailed information" %}

-
- - - {% trans "Edit" %} - - - - {% trans "Change the password" %} - - {% can_change User state %} - - - {% trans "Change the state" %} - - {% acl_end %} - {% can_change User groups %} - - - {% trans "Edit the groups" %} - - {% acl_end %} - {% history_button users text=True %} +
+ + + {% trans "Edit" %} + + + + {% trans "Change the password" %} + + {% can_change User state %} + + + {% trans "Change the state" %} + + {% acl_end %} + {% can_change User groups %} + + + {% trans "Edit the groups" %} + + {% acl_end %} + {% history_button users text=True %}
-
- - +
+
{% if users.is_class_club %} -
- {% if users.club.mailing %} - - {% else %} - - {% endif %} - {% else %} - - - {% endif %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% if users.end_adhesion != None %} - +
{% trans "Mailing" %}
+ {% if users.club.mailing %} +
{{ users.pseudo }}(-admin)
+ {% else %} +
{% trans "Mailing disabled" %}
+ {% endif %} {% else %} - +
{% trans "Firt name" %}
+
{{ users.name }}
{% endif %} - - {% if users.end_whitelist != None %} - - {% else %} - - {% endif %} - - - {% if users.end_ban != None %} - - {% else %} - - {% endif %} - - {% if users.state == 0 %} - - {% elif users.state == 1 %} - - {% elif users.state == 2 %} - - {% elif users.state == 3 %} - + +
+
{% trans "Surname" %}
+
{{ users.surname }}
+
+ +
+
{% trans "Username" %}
+
{{ users.pseudo }}
+
+ +
+
{% trans "Email address" %}
+
{{ users.email }}
+
+ +
+
{% trans "Room" %}
+
+ {{ users.room }} {% can_view_all Port %}{% if users.room.port_set.all %} / + {{ users.room.port_set.all|join:", " }} {% endif %}{% acl_end %} +
+
+ +
+
{% trans "Telephone number" %}
+
{{ users.telephone }}
+
+ +
+
{% trans "School" %}
+
{{ users.school }}
+
+ +
+
{% trans "Comment" %}
+
{{ users.comment }}
+
+ +
+
{% trans "Registration date" %}
+
{{ users.registered }}
+
+ +
+
{% trans "Last login" %}
+
{{ users.last_login }}
+
+ +
+
{% trans "End of membership" %}
+ {% if users.end_adhesion != None %} +
{{ users.end_adhesion }}
+ {% else %} +
{% trans "Not a member" %}
{% endif %} -
- - + + +
+
{% trans "Whitelist" %}
+ {% if users.end_whitelist != None %} +
{{ users.end_whitelist }}
+ {% else %} +
{% trans "None" %}
+ {% endif %} +
+ +
+
{% trans "Ban" %}
+ {% if users.end_ban != None %} +
{{ users.end_ban }}
+ {% else %} +
{% trans "Not banned" %}
+ {% endif %} +
+ +
+
{% trans "State" %}
+ {% if users.state == 0 %} +
{% trans "Active" %}
+ {% elif users.state == 1 %} +
{% trans "Disabled" %}
+ {% elif users.state == 2 %} +
{% trans "Archived" %}
+ {% elif users.state == 3 %} +
{% trans "Not yet Member" %}
+ {% endif %} +
+ +
+
{% trans "Internet access" %}
{% if users.has_access == True %} -
+
+ {% blocktrans with end_access=users.end_access %}Active + (until {{ end_access }}){% endblocktrans %}
{% else %} - +
{% trans "Disabled" %}
{% endif %} - + + +
+
{% trans "Groups of rights" %}
{% if users.groups.all %} -
+
{{ users.groups.all|join:", " }}
{% else %} - +
{% trans "None" %}
{% endif %} - - - - - {% if users.adherent.gpg_fingerprint %} - - - {% endif %} - - - {% if users.shell %} - - - {% endif %} - -
{% trans "Mailing" %}{{ users.pseudo }}(-admin){% trans "Mailing disabled" %}{% trans "Firt name" %}{{ users.name }}{% trans "Surname" %}{{ users.surname }}
{% trans "Username" %}{{ users.pseudo }}{% trans "Email address" %}{{users.email}}
{% trans "Room" %}{{ users.room }} {% can_view_all Port %}{% if users.room.port_set.all %} / {{ users.room.port_set.all|join:", " }} {% endif %}{% acl_end %}{% trans "Telephone number" %}{{ users.telephone }}
{% trans "School" %}{{ users.school }}{% trans "Comment" %}{{ users.comment }}
{% trans "Registration date" %}{{ users.registered }}{% trans "Last login" %}{{ users.last_login }}
{% trans "End of membership" %}{{ users.end_adhesion }}{% trans "Not a member" %}{% trans "Whitelist" %}{{ users.end_whitelist }}{% trans "None" %}
{% trans "Ban" %}{{ users.end_ban }}{% trans "Not banned" %}{% trans "State" %}{% trans "Active" %}{% trans "Disabled" %}{% trans "Archived" %}{% trans "Not yet Member" %}
{% trans "Internet access" %}{% blocktrans with end_access=users.end_access %}Active (until {{ end_access }}){% endblocktrans %}{% trans "Disabled" %}{% trans "Groups of rights" %}{{ users.groups.all|join:", "}}{% trans "None" %}
{% trans "Balance" %}{{ users.solde }} € - {% if user_solde %} - - - {% trans "Refill" %} - + + +
+
{% trans "Balance" %}
+
+ {{ users.solde }} € + {% if user_solde %} + + + {% trans "Refill" %} + + {% endif %} +
+
+ +
+ {% if users.adherent.gpg_fingerprint %} +
{% trans "GPG fingerprint" %}
+
{{ users.adherent.gpg_fingerprint }}
{% endif %} -
{% trans "GPG fingerprint" %}{{ users.adherent.gpg_fingerprint }}
{% trans "Shell" %}{{ users.shell }}
-
+
+ +
+ {% if users.shell %} +
{% trans "Shell" %}
+
{{ users.shell }}
+ {% endif %} +
+