userHeader.jade 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. template(name="headerUserBar")
  2. #header-user-bar
  3. a.header-user-bar-name.js-open-header-member-menu
  4. .header-user-bar-avatar
  5. +userAvatar(userId=currentUser._id)
  6. if currentUser.profile.fullname
  7. = currentUser.profile.fullname
  8. else
  9. = currentUser.username
  10. template(name="memberMenuPopup")
  11. ul.pop-over-list
  12. with currentUser
  13. li: a.js-edit-profile {{_ 'edit-profile'}}
  14. li: a.js-change-avatar {{_ 'edit-avatar'}}
  15. li: a.js-change-password {{_ 'changePasswordPopup-title'}}
  16. li: a.js-change-language {{_ 'changeLanguagePopup-title'}}
  17. li: a.js-edit-notification {{_ 'editNotificationPopup-title'}}
  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.fullname autofocus)
  26. label
  27. | {{_ 'username'}}
  28. span.error.hide.username-taken
  29. | {{_ 'error-username-taken'}}
  30. input.js-profile-username(type="text" value=username)
  31. label
  32. | {{_ 'initials'}}
  33. input.js-profile-initials(type="text" value=profile.initials)
  34. input.primary.wide(type="submit" value="{{_ 'save'}}")
  35. template(name="editNotificationPopup")
  36. ul.pop-over-list
  37. li
  38. a.js-toggle-tag-notify-watch
  39. i.fa.fa-eye.colorful
  40. | {{_ 'watching'}}
  41. if hasTag "notify-watch"
  42. i.fa.fa-check
  43. span.sub-name {{_ 'notify-watch'}}
  44. li
  45. a.js-toggle-tag-notify-participate
  46. i.fa.fa-bell.colorful
  47. | {{_ 'tracking'}}
  48. if hasTag "notify-participate"
  49. i.fa.fa-check
  50. span.sub-name {{_ 'notify-participate'}}
  51. template(name="changePasswordPopup")
  52. +atForm(state='changePwd')
  53. template(name="changeLanguagePopup")
  54. ul.pop-over-list
  55. each languages
  56. li(class="{{# if isCurrentLanguage}}active{{/if}}")
  57. a.js-set-language
  58. = name
  59. if isCurrentLanguage
  60. i.fa.fa-check