peopleBody.jade 3.1 KB

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