peopleBody.jade 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. template(name="people")
  2. .setting-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-title
  7. span {{_ 'people'}}
  8. .content-body
  9. .side-menu
  10. ul
  11. li.active
  12. a.js-setting-menu(data-id="people-setting") {{_ 'people'}}
  13. .main-body
  14. if loading.get
  15. +spinner
  16. else if people.get
  17. +peopleGeneral
  18. template(name="peopleGeneral")
  19. table
  20. tbody
  21. tr
  22. th {{_ 'username'}}
  23. th {{_ 'fullname'}}
  24. th {{_ 'admin'}}
  25. th {{_ 'email'}}
  26. th {{_ 'verified'}}
  27. th {{_ 'createdAt'}}
  28. th {{_ 'active'}}
  29. th {{_ 'authentication-method'}}
  30. th
  31. each user in peopleList
  32. +peopleRow(userId=user._id)
  33. template(name="peopleRow")
  34. tr
  35. td.username {{ userData.username }}
  36. td {{ userData.profile.fullname }}
  37. td
  38. if userData.isAdmin
  39. | {{_ 'yes'}}
  40. else
  41. | {{_ 'no'}}
  42. td {{ userData.emails.[0].address }}
  43. td
  44. if userData.emails.[0].verified
  45. | {{_ 'yes'}}
  46. else
  47. | {{_ 'no'}}
  48. td {{ moment userData.createdAt 'LLL' }}
  49. td
  50. if userData.loginDisabled
  51. | {{_ 'no'}}
  52. else
  53. | {{_ 'yes'}}
  54. td {{_ userData.authenticationMethod }}
  55. td
  56. a.edit-user
  57. | {{_ 'edit'}}
  58. template(name="editUserPopup")
  59. form
  60. label.hide.userId(type="text" value=user._id)
  61. label
  62. | {{_ 'fullname'}}
  63. input.js-profile-fullname(type="text" value=user.profile.fullname autofocus)
  64. label
  65. | {{_ 'username'}}
  66. span.error.hide.username-taken
  67. | {{_ 'error-username-taken'}}
  68. if isLdap
  69. input.js-profile-username(type="text" value=user.username readonly)
  70. else
  71. input.js-profile-username(type="text" value=user.username)
  72. label
  73. | {{_ 'email'}}
  74. span.error.hide.email-taken
  75. | {{_ 'error-email-taken'}}
  76. if isLdap
  77. input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
  78. else
  79. input.js-profile-email(type="email" value="{{user.emails.[0].address}}")
  80. label
  81. | {{_ 'admin'}}
  82. select.select-role.js-profile-isadmin
  83. option(value="false") {{_ 'no'}}
  84. option(value="true" selected="{{user.isAdmin}}") {{_ 'yes'}}
  85. label
  86. | {{_ 'active'}}
  87. select.select-active.js-profile-isactive
  88. option(value="false") {{_ 'yes'}}
  89. option(value="true" selected="{{user.loginDisabled}}") {{_ 'no'}}
  90. label
  91. | {{_ 'authentication-type'}}
  92. select.select-authenticationMethod.js-authenticationMethod
  93. each authentications
  94. if isSelected value
  95. option(value="{{value}}" selected) {{_ value}}
  96. else
  97. option(value="{{value}}") {{_ value}}
  98. hr
  99. label
  100. | {{_ 'password'}}
  101. input.js-profile-password(type="password")
  102. input.primary.wide(type="submit" value="{{_ 'save'}}")