summaryrefslogtreecommitdiffstats
path: root/client/components/users/userAvatar.jade
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-06-19 14:39:38 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-06-19 14:39:38 +0200
commit8cf9ec266055f065c428216d53018c83b63675c6 (patch)
tree7277b335901d3b5a40ab2851f227691ceb97b356 /client/components/users/userAvatar.jade
parentfad4cba5e20b3273c2adc80b7a7c5c9fa57ed720 (diff)
downloadwekan-8cf9ec266055f065c428216d53018c83b63675c6.tar.gz
wekan-8cf9ec266055f065c428216d53018c83b63675c6.tar.bz2
wekan-8cf9ec266055f065c428216d53018c83b63675c6.zip
Allow a user to edit its profile or avatar from a member popover
Fixes the data context on the member popover in the details pane. Also change the way Popover detect if the click is initiated from a parent popover -- from reading Blaze context, to looking at the event target parents.
Diffstat (limited to 'client/components/users/userAvatar.jade')
-rw-r--r--client/components/users/userAvatar.jade20
1 files changed, 14 insertions, 6 deletions
diff --git a/client/components/users/userAvatar.jade b/client/components/users/userAvatar.jade
index 2ea3aa20..d6527a5d 100644
--- a/client/components/users/userAvatar.jade
+++ b/client/components/users/userAvatar.jade
@@ -9,6 +9,11 @@ template(name="userAvatar")
span.member-presence-status(class=presenceStatusClassName)
span.member-type(class=memberType)
+ if showEdit
+ if $eq currentUser._id userData._id
+ a.edit-avatar.js-change-avatar
+ i.fa.fa-pencil
+
template(name="userAvatarInitials")
svg.avatar.avatar-initials(viewBox="0 0 {{viewPortWidth}} 15")
text(x="0" y="13")= initials
@@ -18,9 +23,8 @@ template(name="userPopup")
.mini-profile-info
+userAvatar(userId=user._id)
.info
- h3.bottom
- = user.profile.fullname
- p.quiet.bottom @{{ user.username }}
+ h3= user.profile.fullname
+ p.quiet @{{ user.username }}
template(name="memberName")
if showBoth
@@ -61,10 +65,14 @@ template(name="changeAvatarPopup")
template(name="cardMemberPopup")
.board-member-menu
.mini-profile-info
- +userAvatar(userId=user._id)
+ +userAvatar(userId=user._id showEdit=true)
.info
- h3.bottom= user.profile.fullname
- p.quiet.bottom @{{ user.username }}
+ h3= user.profile.fullname
+ p.quiet @{{ user.username }}
if currentUser.isBoardMember
ul.pop-over-list
li: a.js-remove-member {{_ 'remove-member-from-card'}}
+
+ if $eq currentUser._id user._id
+ with currentUser
+ li: a.js-edit-profile Edit Profile