From 944387b05bed784f4ca7385ec4d317b24c397249 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 26 Feb 2023 22:18:37 +0100 Subject: [PATCH] Table users: cosmetic --- app/auth/models.py | 2 +- app/scodoc/sco_users.py | 9 --------- app/static/css/scodoc.css | 11 +++++++---- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/app/auth/models.py b/app/auth/models.py index 866f08ff8..c7ef016dd 100644 --- a/app/auth/models.py +++ b/app/auth/models.py @@ -339,7 +339,7 @@ class User(UserMixin, db.Model): """string repr. of user's roles (with depts) e.g. "Ens_RT, Ens_Info, Secr_CJ" """ - return ",".join( + return ", ".join( f"{r.role.name or ''}_{r.dept or ''}" for r in self.user_roles if r is not None diff --git a/app/scodoc/sco_users.py b/app/scodoc/sco_users.py index 9fb9331ec..f9bd56922 100644 --- a/app/scodoc/sco_users.py +++ b/app/scodoc/sco_users.py @@ -213,15 +213,6 @@ def get_user_list(dept=None, with_inactives=False): return q.order_by(User.nom, User.user_name).all() -def _user_list(user_name): - "return user as a dict" - u = User.query.filter_by(user_name=user_name).first() - if u: - return u.to_dict() - else: - return None - - @cache.memoize(timeout=50) # seconds def user_info(user_name_or_id=None, user: User = None): """Dict avec infos sur l'utilisateur (qui peut ne pas etre dans notre base). diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index c0830343c..e32ff65b5 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -3547,14 +3547,17 @@ table.table_listegroupe tr td { padding-right: 0.5em; } -table.list_users td.roles { - width: 22em; -} - table.list_users td.date_modif_passwd { white-space: nowrap; } +table.list_users td.roles_string, +table.list_users th.roles_string { + word-wrap: break-word; + overflow-wrap: break-word; +} + + table.formsemestre_description tr.table_row_ue td { font-weight: bold; }