userHeader.jade 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. template(name="headerUserBar")
  2. a#header-user-bar
  3. .header-user-bar-name.js-open-header-member-menu
  4. i.fa.fa-chevron-down
  5. if currentUser.profile.name
  6. = currentUser.profile.name
  7. else
  8. = currentUser.username
  9. .header-user-bar-avatar.js-change-avatar
  10. +userAvatar(user=currentUser)
  11. template(name="memberMenuPopup")
  12. ul.pop-over-list
  13. with currentUser
  14. li: a.js-edit-profile Edit Profile…
  15. li: a.js-change-avatar Change Avatar…
  16. li: a.js-change-password Change Password…
  17. li: a.js-change-language Change Language…
  18. hr
  19. ul.pop-over-list
  20. li: a.js-logout {{_ 'log-out'}}
  21. template(name="editProfilePopup")
  22. form
  23. label
  24. | {{_ "fullname"}}
  25. input.js-profile-fullname(type="text" value=profile.name autofocus)
  26. label
  27. | {{_ "username"}}
  28. input.js-profile-username(type="text" value=username)
  29. label
  30. | Initials
  31. input.js-profile-initials(type="text" value=profile.initials)
  32. input.primary.wide(type="submit" value="{{_ 'save'}}")
  33. template(name="changeAvatarPopup")
  34. template(name="changePasswordPopup")
  35. +atForm(state='changePwd')
  36. template(name="changeLanguagePopup")
  37. ul.pop-over-list
  38. each languages
  39. li(class="{{# if isCurrentLanguage}}active{{/if}}")
  40. a.js-set-language
  41. = name
  42. if isCurrentLanguage
  43. i.fa.fa-check