userHeader.jade 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. 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="editNotificationPopup")
  34. ul.pop-over-list
  35. li
  36. a.js-toggle-tag-notify-watch
  37. i.fa.fa-eye.colorful
  38. | {{_ 'watching'}}
  39. if hasTag "notify-watch"
  40. i.fa.fa-check
  41. span.sub-name {{_ 'notify-watch'}}
  42. li
  43. a.js-toggle-tag-notify-participate
  44. i.fa.fa-bell.colorful
  45. | {{_ 'tracking'}}
  46. if hasTag "notify-participate"
  47. i.fa.fa-check
  48. span.sub-name {{_ 'notify-participate'}}
  49. template(name="changePasswordPopup")
  50. +atForm(state='changePwd')
  51. template(name="changeLanguagePopup")
  52. ul.pop-over-list
  53. each languages
  54. li(class="{{# if isCurrentLanguage}}active{{/if}}")
  55. a.js-set-language
  56. = name
  57. if isCurrentLanguage
  58. i.fa.fa-check