mirror of
https://github.com/wekan/wekan.git
synced 2026-02-09 09:44:22 +01:00
Updates to userAvatar and cardDetails template
* enable userAvatar to work with member and assignee * remove userAvatarAssignee template
This commit is contained in:
parent
5a6f84ce34
commit
03d29dd674
4 changed files with 29 additions and 164 deletions
|
|
@ -1,5 +1,5 @@
|
|||
template(name="userAvatar")
|
||||
a.member.js-member(title="{{userData.profile.fullname}} ({{userData.username}}) {{_ memberType}}")
|
||||
a.member(class="js-{{#if assignee}}assignee{{else}}member{{/if}}" title="{{userData.profile.fullname}} ({{userData.username}}) {{_ memberType}}")
|
||||
if userData.profile.avatarUrl
|
||||
img.avatar.avatar-image(src="{{userData.profile.avatarUrl}}")
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
import Cards from '/models/cards';
|
||||
import Avatars from '/models/avatars';
|
||||
import Users from '/models/users';
|
||||
|
||||
Template.userAvatar.helpers({
|
||||
userData() {
|
||||
// We need to handle a special case for the search results provided by the
|
||||
|
|
@ -30,11 +34,6 @@ Template.userAvatar.helpers({
|
|||
},
|
||||
});
|
||||
|
||||
Template.userAvatar.events({
|
||||
'click .js-change-avatar': Popup.open('changeAvatar'),
|
||||
'click .js-member': Popup.open('cardMember'),
|
||||
});
|
||||
|
||||
Template.userAvatarInitials.helpers({
|
||||
initials() {
|
||||
const user = Users.findOne(this.userId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue