Skip to content

Commit

Permalink
fix(info-user): display full name
Browse files Browse the repository at this point in the history
  • Loading branch information
ch-cbna authored and jacquesfize committed Apr 3, 2024
1 parent a70c2ca commit 1647171
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/t_roles/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def updatepass(id_role=None):
flash(strigify_dict(form.errors), "error")

return render_template(
"user_pass.html",
"user_pass.html",
form=form,
title=title,
id_role=id_role,
Expand All @@ -269,13 +269,15 @@ def info(id_role):
organisme = (
Bib_Organismes.get_one(user["id_organisme"]) if user["id_organisme"] else None
)
fullname = buildUserFullName(user)
groups = TRoles.get_user_groups(id_role)
lists = TRoles.get_user_lists(id_role)
rights = TRoles.get_user_app_profils(id_role)
return render_template(
"info_user.html",
user=user,
organisme=organisme,
fullname=fullname,
groups=groups,
lists=lists,
rights=rights,
Expand Down
6 changes: 5 additions & 1 deletion app/templates/info_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
{%set is_organisme = organisme is not none and organisme['nom_organisme'] != '' %}
{%set is_desc = user['desc_role'] is not none and user['desc_role'] != '' %}
{%set is_remarques = user['remarques'] is not none and user['remarques'] != '' %}
{%set is_champs_addi = user['champs_addi']['organisme'] is not none
and user['champs_addi']['organisme'] != '' %}
{%set is_mail = user['email'] is not none and user['email'] != '' %}
{%set is_group = groups|length > 0 %}
{%set is_list = lists|length > 0 %}
{%set is_right = rights|length > 0 %}
<div class="container main-zone ng-scope ">
<h3>Utilisateur "{{user['fullname']}}"</h3>
<h3>Utilisateur "{{fullname}}"</h3>
<div class="ml-5">
<small>
{% if is_desc %}
Expand All @@ -28,6 +30,8 @@ <h3>Utilisateur "{{user['fullname']}}"</h3>
{% endif %}
{% if is_organisme %}
<br /><strong>Organisme :</strong> {{organisme.nom_organisme}}
{% elif is_champs_addi %}
<br /><strong>Organisme :</strong> {{user['champs_addi']['organisme']}}
{% endif %}
{% if is_remarques %}
<br /><strong>Remarques :</strong> {{user['remarques']}}
Expand Down

0 comments on commit 1647171

Please sign in to comment.