Table users: cosmetic

This commit is contained in:
Emmanuel Viennet 2023-02-26 22:18:37 +01:00
parent c2f845d716
commit 944387b05b
3 changed files with 8 additions and 14 deletions

View File

@ -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

View File

@ -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).

View File

@ -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;
}