peopleBody.jade 3.0 KB

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