From c17912b03f31f6e5e7d63c4acc4ca8ad33f44a72 Mon Sep 17 00:00:00 2001 From: Calum Mackervoy Date: Thu, 9 Jan 2020 09:03:48 +0000 Subject: [PATCH] project team displaying is_admin and avatar correctly --- .../project-profile/project-profile.scss | 1 + src/templates/hd-project-team.pug | 9 +++++-- src/templates/template-team.pug | 25 ------------------- 3 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 src/templates/template-team.pug diff --git a/src/styles/layout/project-profile/project-profile.scss b/src/styles/layout/project-profile/project-profile.scss index 2656725..8df4271 100644 --- a/src/styles/layout/project-profile/project-profile.scss +++ b/src/styles/layout/project-profile/project-profile.scss @@ -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; diff --git a/src/templates/hd-project-team.pug b/src/templates/hd-project-team.pug index 639e2ff..c08740a 100644 --- a/src/templates/hd-project-team.pug +++ b/src/templates/hd-project-team.pug @@ -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} diff --git a/src/templates/template-team.pug b/src/templates/template-team.pug deleted file mode 100644 index 2ffd17f..0000000 --- a/src/templates/template-team.pug +++ /dev/null @@ -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}