Merge branch 'project-admin-display' into 'staging'

project team displaying is_admin and avatar correctly

See merge request startinblox/applications/sib-app!98
This commit is contained in:
Jean-Baptiste Pasquier 2020-01-09 09:03:48 +00:00
commit 9ad8126311
3 changed files with 8 additions and 27 deletions

View File

@ -56,6 +56,7 @@
grid-template-columns: 7vh auto;
grid-template-rows: repeat(2, 5.2vh);
>[name='user.account.picture'],
>[name='account.picture'] {
align-items: center;
align-self: center;

View File

@ -4,17 +4,22 @@ sib-widget(name='hd-project-team')
template
sib-display(
data-src='${await value}'
fields='account.picture, sup(user.name, user.groups), sub(user.profile.city, name)'
fields='user.account.picture, sup(user.name, is_admin, user.groups), sub(user.profile.city, name)'
class-user.name='user-name'
class-is_admin='tag-admin'
class-user.groups='tag-group'
class-user.profile.city='city'
widget-account.picture='hd-user-avatar'
widget-user.account.picture='hd-user-avatar'
widget-is_admin='hd-user-admin'
widget-user.groups='hd-user-groups'
multiple-user.groups=''
)
sib-widget(name='hd-user-admin')
template ${await value ? "Administrator" : ""}
sib-widget(name='hd-user-groups')
template ${await value.name}

View File

@ -1,25 +0,0 @@
include hd-user-avatar.pug
sib-widget(name='project-team-template')
template
sib-display(
data-src='${await value}'
fields='account.picture, sup(user.name, is_admin, user.groups), sub(user.profile.city)'
class-user.name='user-name'
class-is_admin='tag-admin'
class-user.groups='tag-group'
class-user.profile.city='city'
widget-account.picture='hd-user-avatar'
widget-is_admin='hd-user-admin'
widget-user.groups='hd-user-groups'
multiple-user.groups=''
)
sib-widget(name='hd-user-admin')
template ${await value ? "Administrator" : ""}
sib-widget(name='hd-user-groups')
template ${await value.name}