summaryrefslogtreecommitdiffstats
path: root/client/components/users/userAvatar.jade
blob: 2ea3aa2084fbdf5f6a86ddff326b6b4a55ea32c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
template(name="userAvatar")
  a.member.js-member(title="{{userData.profile.fullname}} ({{userData.username}})")
    if userData.profile.avatarUrl
      img.avatar.avatar-image(src=userData.profile.avatarUrl)
    else
      +userAvatarInitials(userId=userData._id)

    if showStatus
      span.member-presence-status(class=presenceStatusClassName)
      span.member-type(class=memberType)

template(name="userAvatarInitials")
  svg.avatar.avatar-initials(viewBox="0 0 {{viewPortWidth}} 15")
    text(x="0" y="13")= initials

template(name="userPopup")
  .board-member-menu
    .mini-profile-info
      +userAvatar(userId=user._id)
      .info
        h3.bottom
          = user.profile.fullname
          p.quiet.bottom @{{ user.username }}

template(name="memberName")
  if showBoth
    = user.profile.fullname
    | ({{ user.username }})
  else if user.profile.fullname
    = user.profile.fullname
  else
    = user.username

template(name="changeAvatarPopup")
  ul.pop-over-list
    each uploadedAvatars
      li: a.js-select-avatar
        .member
          img.avatar.avatar-image(src="{{url avatarUrlOptions}}")
        | Uploaded avatar
        if isSelected
          i.fa.fa-check
        p.sub-name
          unless isSelected
            a.js-delete-avatar
              | Delete
            |  -
          = original.name
    li: a.js-select-initials
      .member
        +userAvatarInitials(userId=currentUser._id)
      | Initials
      if noAvatarUrl
        i.fa.fa-check
       p.sub-name Default avatar
  input.hide.js-upload-avatar-input(accept="image/*;capture=camera" type="file")
  button.full.js-upload-avatar
    i.fa.fa-upload
    | Upload an avatar

template(name="cardMemberPopup")
  .board-member-menu
    .mini-profile-info
      +userAvatar(userId=user._id)
      .info
        h3.bottom= user.profile.fullname
        p.quiet.bottom @{{ user.username }}
    if currentUser.isBoardMember
      ul.pop-over-list
        li: a.js-remove-member {{_ 'remove-member-from-card'}}