summaryrefslogtreecommitdiffstats
path: root/client/components/users/userHeader.jade
blob: 3fc25c8a20fe7e738bcfa2b03e2740dc33a37dde (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
template(name="headerUserBar")
  #header-user-bar
    a.header-user-bar-name.js-open-header-member-menu
      i.fa.fa-chevron-down
      if currentUser.profile.fullname
        = currentUser.profile.fullname
      else
        = currentUser.username
    a.header-user-bar-avatar.js-change-avatar
      +userAvatar(userId=currentUser._id)

template(name="memberMenuPopup")
  ul.pop-over-list
    with currentUser
      li: a.js-edit-profile {{_ 'edit-profile'}}
    li: a.js-change-avatar {{_ 'edit-avatar'}}
    li: a.js-change-password {{_ 'changePasswordPopup-title'}}
    li: a.js-change-language {{_ 'changeLanguagePopup-title'}}
  hr
  ul.pop-over-list
    li: a.js-logout {{_ 'log-out'}}

template(name="editProfilePopup")
  form
    label
      | {{_ 'fullname'}}
      input.js-profile-fullname(type="text" value=profile.fullname autofocus)
    label
      | {{_ 'username'}}
      input.js-profile-username(type="text" value=username)
    label
      | {{_ 'initials'}}
      input.js-profile-initials(type="text" value=profile.initials)
    input.primary.wide(type="submit" value="{{_ 'save'}}")

template(name="changePasswordPopup")
  +atForm(state='changePwd')

template(name="changeLanguagePopup")
  ul.pop-over-list
    each languages
      li(class="{{# if isCurrentLanguage}}active{{/if}}")
        a.js-set-language
          = name
          if isCurrentLanguage
            i.fa.fa-check