userHeader.jade 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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-settings {{_ 'change-settings'}}
  15. li: a.js-change-avatar {{_ 'edit-avatar'}}
  16. li: a.js-change-password {{_ 'changePasswordPopup-title'}}
  17. li: a.js-change-language {{_ 'changeLanguagePopup-title'}}
  18. li: a.js-edit-notification {{_ 'editNotificationPopup-title'}}
  19. if currentUser.isAdmin
  20. li: a.js-go-setting(href="{{pathFor 'setting'}}") {{_ 'admin-panel'}}
  21. hr
  22. ul.pop-over-list
  23. li: a.js-logout {{_ 'log-out'}}
  24. template(name="editProfilePopup")
  25. form
  26. label
  27. | {{_ 'fullname'}}
  28. input.js-profile-fullname(type="text" value=profile.fullname autofocus)
  29. label
  30. | {{_ 'username'}}
  31. span.error.hide.username-taken
  32. | {{_ 'error-username-taken'}}
  33. input.js-profile-username(type="text" value=username)
  34. label
  35. | {{_ 'initials'}}
  36. input.js-profile-initials(type="text" value=profile.initials)
  37. label
  38. | {{_ 'email'}}
  39. span.error.hide.email-taken
  40. | {{_ 'error-email-taken'}}
  41. if allowEmailChange
  42. input.js-profile-email(type="email" value="{{emails.[0].address}}")
  43. else
  44. input.js-profile-email(type="email" value="{{emails.[0].address}}" readonly)
  45. input.primary.wide(type="submit" value="{{_ 'save'}}")
  46. template(name="editNotificationPopup")
  47. ul.pop-over-list
  48. li
  49. a.js-toggle-tag-notify-watch
  50. i.fa.fa-eye.colorful
  51. | {{_ 'watching'}}
  52. if hasTag "notify-watch"
  53. i.fa.fa-check
  54. span.sub-name {{_ 'notify-watch'}}
  55. li
  56. a.js-toggle-tag-notify-participate
  57. i.fa.fa-bell.colorful
  58. | {{_ 'tracking'}}
  59. if hasTag "notify-participate"
  60. i.fa.fa-check
  61. span.sub-name {{_ 'notify-participate'}}
  62. template(name="changePasswordPopup")
  63. +atForm(state='changePwd')
  64. template(name="changeLanguagePopup")
  65. ul.pop-over-list
  66. each languages
  67. li(class="{{# if isCurrentLanguage}}active{{/if}}")
  68. a.js-set-language
  69. = name
  70. if isCurrentLanguage
  71. i.fa.fa-check
  72. template(name="changeSettingsPopup")
  73. ul.pop-over-list
  74. li
  75. a.js-toggle-system-messages
  76. | {{_ 'hide-system-messages'}}
  77. if hiddenSystemMessages
  78. i.fa.fa-check
  79. li
  80. label.bold
  81. | {{_ 'show-cards-minimum-count'}}
  82. input#show-cards-count-at.inline-input.left(type="number" value="#{showCardsCountAt}" min="1" max="99" onkeydown="return false")
  83. input.js-apply-show-cards-at.left(type="submit" value="{{_ 'apply'}}")