peopleBody.jade 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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
  9. i.fa.fa-users
  10. | {{_ 'people'}}
  11. input#searchInput(placeholder="{{_ 'search'}}")
  12. button#searchButton
  13. i.fa.fa-search
  14. | {{_ 'search'}}
  15. .ext-box-right
  16. span {{_ 'people-number'}} #{peopleNumber}
  17. .content-body
  18. .side-menu
  19. ul
  20. li.active
  21. a.js-setting-menu(data-id="people-setting")
  22. i.fa.fa-users
  23. | {{_ 'people'}}
  24. .main-body
  25. if loading.get
  26. +spinner
  27. else if people.get
  28. +peopleGeneral
  29. template(name="peopleGeneral")
  30. table
  31. tbody
  32. tr
  33. th {{_ 'username'}}
  34. th {{_ 'fullname'}}
  35. th {{_ 'admin'}}
  36. th {{_ 'email'}}
  37. th {{_ 'verified'}}
  38. th {{_ 'createdAt'}}
  39. th {{_ 'active'}}
  40. th {{_ 'authentication-method'}}
  41. th
  42. +newUserRow
  43. each user in peopleList
  44. +peopleRow(userId=user._id)
  45. template(name="newUserRow")
  46. a.new-user
  47. i.fa.fa-edit
  48. | {{_ 'new'}}
  49. template(name="peopleRow")
  50. tr
  51. if userData.loginDisabled
  52. td.username <s>{{ userData.username }}</s>
  53. else
  54. td.username {{ userData.username }}
  55. if userData.loginDisabled
  56. td <s>{{ userData.profile.fullname }}</s>
  57. else
  58. td {{ userData.profile.fullname }}
  59. if userData.loginDisabled
  60. td
  61. if userData.isAdmin
  62. | <s>{{_ 'yes'}}</s>
  63. else
  64. | <s>{{_ 'no'}}</s>
  65. else
  66. td
  67. if userData.isAdmin
  68. | {{_ 'yes'}}
  69. else
  70. | {{_ 'no'}}
  71. if userData.loginDisabled
  72. td <s>{{ userData.emails.[0].address }}</s>
  73. else
  74. td {{ userData.emails.[0].address }}
  75. if userData.loginDisabled
  76. td
  77. if userData.emails.[0].verified
  78. | <s>{{_ 'yes'}}</s>
  79. else
  80. | <s>{{_ 'no'}}</s>
  81. else
  82. td
  83. if userData.emails.[0].verified
  84. | {{_ 'yes'}}
  85. else
  86. | {{_ 'no'}}
  87. if userData.loginDisabled
  88. td <s>{{ moment userData.createdAt 'LLL' }}</s>
  89. else
  90. td {{ moment userData.createdAt 'LLL' }}
  91. td
  92. if userData.loginDisabled
  93. | {{_ 'no'}}
  94. else
  95. | {{_ 'yes'}}
  96. if userData.loginDisabled
  97. td <s>{{_ userData.authenticationMethod }}</s>
  98. else
  99. td {{_ userData.authenticationMethod }}
  100. td
  101. a.edit-user
  102. i.fa.fa-edit
  103. | {{_ 'edit'}}
  104. a.more-settings-user
  105. i.fa.fa-ellipsis-h
  106. template(name="editUserPopup")
  107. form
  108. label.hide.userId(type="text" value=user._id)
  109. label
  110. | {{_ 'fullname'}}
  111. input.js-profile-fullname(type="text" value=user.profile.fullname)
  112. label
  113. | {{_ 'username'}}
  114. span.error.hide.username-taken
  115. | {{_ 'error-username-taken'}}
  116. if isLdap
  117. input.js-profile-username(type="text" value=user.username readonly)
  118. else
  119. input.js-profile-username(type="text" value=user.username)
  120. label
  121. | {{_ 'email'}}
  122. span.error.hide.email-taken
  123. | {{_ 'error-email-taken'}}
  124. if isLdap
  125. input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
  126. else
  127. input.js-profile-email(type="email" value="{{user.emails.[0].address}}")
  128. label
  129. | {{_ 'admin'}}
  130. select.select-role.js-profile-isadmin
  131. option(value="false") {{_ 'no'}}
  132. option(value="true" selected="{{user.isAdmin}}") {{_ 'yes'}}
  133. label
  134. | {{_ 'active'}}
  135. select.select-active.js-profile-isactive
  136. option(value="false") {{_ 'yes'}}
  137. option(value="true" selected="{{user.loginDisabled}}") {{_ 'no'}}
  138. label
  139. | {{_ 'authentication-type'}}
  140. select.select-authenticationMethod.js-authenticationMethod
  141. each authentications
  142. if isSelected value
  143. option(value="{{value}}" selected) {{_ value}}
  144. else
  145. option(value="{{value}}") {{_ value}}
  146. hr
  147. label
  148. | {{_ 'password'}}
  149. input.js-profile-password(type="password")
  150. div.buttonsContainer
  151. input.primary.wide(type="submit" value="{{_ 'save'}}")
  152. // div
  153. // input#deleteButton.primary.wide(type="button" value="{{_ 'delete'}}")
  154. template(name="newUserPopup")
  155. form
  156. //label.hide.userId(type="text" value=user._id)
  157. label
  158. | {{_ 'fullname'}}
  159. input.js-profile-fullname(type="text" value="")
  160. label
  161. | {{_ 'username'}}
  162. span.error.hide.username-taken
  163. | {{_ 'error-username-taken'}}
  164. //if isLdap
  165. // input.js-profile-username(type="text" value=user.username readonly)
  166. //else
  167. input.js-profile-username(type="text" value="")
  168. label
  169. | {{_ 'email'}}
  170. span.error.hide.email-taken
  171. | {{_ 'error-email-taken'}}
  172. //if isLdap
  173. // input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
  174. //else
  175. input.js-profile-email(type="email" value="")
  176. label
  177. | {{_ 'admin'}}
  178. select.select-role.js-profile-isadmin
  179. option(value="false" selected="selected") {{_ 'no'}}
  180. option(value="true") {{_ 'yes'}}
  181. label
  182. | {{_ 'active'}}
  183. select.select-active.js-profile-isactive
  184. option(value="false" selected="selected") {{_ 'yes'}}
  185. option(value="true") {{_ 'no'}}
  186. label
  187. | {{_ 'authentication-type'}}
  188. select.select-authenticationMethod.js-authenticationMethod
  189. each authentications
  190. if isSelected value
  191. option(value="{{value}}" selected) {{_ value}}
  192. else
  193. option(value="{{value}}") {{_ value}}
  194. hr
  195. label
  196. | {{_ 'password'}}
  197. input.js-profile-password(type="password")
  198. div.buttonsContainer
  199. input.primary.wide(type="submit" value="{{_ 'save'}}")
  200. template(name="settingsUserPopup")
  201. ul.pop-over-list
  202. li
  203. a.impersonate-user
  204. i.fa.fa-user
  205. | {{_ 'impersonate-user'}}