peopleBody.jade 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  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. if loading.get
  9. +spinner
  10. else if orgSetting.get
  11. span
  12. i.fa.fa-sitemap
  13. unless isMiniScreen
  14. | {{_ 'organizations'}}
  15. input#searchOrgInput(placeholder="{{_ 'search'}}")
  16. button#searchOrgButton
  17. i.fa.fa-search
  18. | {{_ 'search'}}
  19. .ext-box-right
  20. span {{#unless isMiniScreen}}{{_ 'org-number'}}{{/unless}} #{orgNumber}
  21. else if teamSetting.get
  22. span
  23. i.fa.fa-users
  24. unless isMiniScreen
  25. | {{_ 'teams'}}
  26. input#searchTeamInput(placeholder="{{_ 'search'}}")
  27. button#searchTeamButton
  28. i.fa.fa-search
  29. | {{_ 'search'}}
  30. .ext-box-right
  31. span {{#unless isMiniScreen}}{{_ 'team-number'}}{{/unless}} #{teamNumber}
  32. else if peopleSetting.get
  33. span
  34. i.fa.fa-user
  35. unless isMiniScreen
  36. | {{_ 'people'}}
  37. input#searchInput(placeholder="{{_ 'search'}}")
  38. button#searchButton
  39. i.fa.fa-search
  40. | {{_ 'search'}}
  41. .ext-box-right
  42. span {{#unless isMiniScreen}}{{_ 'people-number'}}{{/unless}} #{peopleNumber}
  43. .content-body
  44. .side-menu
  45. ul
  46. li.active
  47. a.js-org-menu(data-id="org-setting")
  48. i.fa.fa-sitemap
  49. | {{_ 'organizations'}}
  50. li
  51. a.js-team-menu(data-id="team-setting")
  52. i.fa.fa-users
  53. | {{_ 'teams'}}
  54. li
  55. a.js-people-menu(data-id="people-setting")
  56. i.fa.fa-user
  57. | {{_ 'people'}}
  58. .main-body
  59. if loading.get
  60. +spinner
  61. else if orgSetting.get
  62. +orgGeneral
  63. else if teamSetting.get
  64. +teamGeneral
  65. else if peopleSetting.get
  66. +peopleGeneral
  67. template(name="orgGeneral")
  68. table
  69. tbody
  70. tr
  71. th {{_ 'displayName'}}
  72. th {{_ 'description'}}
  73. th {{_ 'shortName'}}
  74. th {{_ 'website'}}
  75. th {{_ 'teams'}}
  76. th {{_ 'createdAt'}}
  77. th {{_ 'active'}}
  78. th
  79. +newOrgRow
  80. each org in orgList
  81. +orgRow(orgId=org._id)
  82. template(name="teamGeneral")
  83. table
  84. tbody
  85. tr
  86. th {{_ 'displayName'}}
  87. th {{_ 'description'}}
  88. th {{_ 'shortName'}}
  89. th {{_ 'website'}}
  90. th {{_ 'createdAt'}}
  91. th {{_ 'active'}}
  92. th
  93. +newTeamRow
  94. each team in teamList
  95. +teamRow(teamId=team._id)
  96. template(name="peopleGeneral")
  97. table
  98. tbody
  99. tr
  100. th {{_ 'username'}}
  101. th {{_ 'fullname'}}
  102. th {{_ 'initials'}}
  103. th {{_ 'admin'}}
  104. th {{_ 'email'}}
  105. th {{_ 'verified'}}
  106. th {{_ 'createdAt'}}
  107. th {{_ 'active'}}
  108. th {{_ 'authentication-method'}}
  109. th
  110. +newUserRow
  111. each user in peopleList
  112. +peopleRow(userId=user._id)
  113. template(name="newOrgRow")
  114. a.new-org
  115. i.fa.fa-edit
  116. | {{_ 'new'}}
  117. template(name="newTeamRow")
  118. a.new-team
  119. i.fa.fa-edit
  120. | {{_ 'new'}}
  121. template(name="newUserRow")
  122. a.new-user
  123. i.fa.fa-edit
  124. | {{_ 'new'}}
  125. template(name="orgRow")
  126. tr
  127. if orgData.loginDisabled
  128. td <s>{{ orgData.displayName }}</s>
  129. else
  130. td {{ orgData.displayName }}
  131. if orgData.loginDisabled
  132. td <s>{{ orgData.orgDesc }}</s>
  133. else
  134. td {{ orgData.desc }}
  135. if orgData.loginDisabled
  136. td <s>{{ orgData.name }}</s>
  137. else
  138. td {{ orgData.name }}
  139. if orgData.loginDisabled
  140. td <s>{{ orgData.website }}</s>
  141. else
  142. td {{ orgData.website }}
  143. if orgData.loginDisabled
  144. td <s>{{ orgData.teams }}</s>
  145. else
  146. td {{ orgData.teams }}
  147. if orgData.loginDisabled
  148. td <s>{{ moment orgData.createdAt 'LLL' }}</s>
  149. else
  150. td {{ moment orgData.createdAt 'LLL' }}
  151. td
  152. if orgData.loginDisabled
  153. | {{_ 'no'}}
  154. else
  155. | {{_ 'yes'}}
  156. td
  157. a.edit-org
  158. i.fa.fa-edit
  159. | {{_ 'edit'}}
  160. a.more-settings-org
  161. i.fa.fa-ellipsis-h
  162. template(name="teamRow")
  163. tr
  164. if teamData.loginDisabled
  165. td <s>{{ teamData.displayName }}</s>
  166. else
  167. td {{ teamData.displayName }}
  168. if teamData.loginDisabled
  169. td <s>{{ teamData.desc }}</s>
  170. else
  171. td {{ teamData.desc }}
  172. if teamData.loginDisabled
  173. td <s>{{ teamData.dame }}</s>
  174. else
  175. td {{ teamData.name }}
  176. if teamData.loginDisabled
  177. td <s>{{ teamData.website }}</s>
  178. else
  179. td {{ teamData.website }}
  180. if orgData.loginDisabled
  181. td <s>{{ moment teamData.createdAt 'LLL' }}</s>
  182. else
  183. td {{ moment teamData.createdAt 'LLL' }}
  184. td
  185. if teamData.loginDisabled
  186. | {{_ 'no'}}
  187. else
  188. | {{_ 'yes'}}
  189. td
  190. a.edit-team
  191. i.fa.fa-edit
  192. | {{_ 'edit'}}
  193. a.more-settings-team
  194. i.fa.fa-ellipsis-h
  195. template(name="peopleRow")
  196. tr
  197. if userData.loginDisabled
  198. td.username <s>{{ userData.username }}</s>
  199. else
  200. td.username {{ userData.username }}
  201. if userData.loginDisabled
  202. td <s>{{ userData.profile.fullname }}</s>
  203. else
  204. td {{ userData.profile.fullname }}
  205. if userData.loginDisabled
  206. td <s>{{ userData.profile.initials }}</s>
  207. else
  208. td {{ userData.profile.initials }}
  209. if userData.loginDisabled
  210. td
  211. if userData.isAdmin
  212. | <s>{{_ 'yes'}}</s>
  213. else
  214. | <s>{{_ 'no'}}</s>
  215. else
  216. td
  217. if userData.isAdmin
  218. | {{_ 'yes'}}
  219. else
  220. | {{_ 'no'}}
  221. if userData.loginDisabled
  222. td <s>{{ userData.emails.[0].address }}</s>
  223. else
  224. td {{ userData.emails.[0].address }}
  225. if userData.loginDisabled
  226. td
  227. if userData.emails.[0].verified
  228. | <s>{{_ 'yes'}}</s>
  229. else
  230. | <s>{{_ 'no'}}</s>
  231. else
  232. td
  233. if userData.emails.[0].verified
  234. | {{_ 'yes'}}
  235. else
  236. | {{_ 'no'}}
  237. if userData.loginDisabled
  238. td <s>{{ moment userData.createdAt 'LLL' }}</s>
  239. else
  240. td {{ moment userData.createdAt 'LLL' }}
  241. td
  242. if userData.loginDisabled
  243. | {{_ 'no'}}
  244. else
  245. | {{_ 'yes'}}
  246. if userData.loginDisabled
  247. td <s>{{_ userData.authenticationMethod }}</s>
  248. else
  249. td {{_ userData.authenticationMethod }}
  250. td
  251. a.edit-user
  252. i.fa.fa-edit
  253. | {{_ 'edit'}}
  254. a.more-settings-user
  255. i.fa.fa-ellipsis-h
  256. template(name="editOrgPopup")
  257. form
  258. label.hide.orgId(type="text" value=org._id)
  259. label
  260. | {{_ 'orgDisplayName'}}
  261. input.js-orgDisplayName(type="text" value=org.displayName required)
  262. span.error.hide.orgname-taken
  263. | {{_ 'error-orgname-taken'}}
  264. label
  265. | {{_ 'orgDesc'}}
  266. input.js-orgDesc(type="text" value=org.desc required)
  267. label
  268. | {{_ 'orgName'}}
  269. input.js-orgName(type="text" value=org.name required)
  270. label
  271. | {{_ 'orgWebsite'}}
  272. input.js-orgWebsite(type="text" value=org.website required)
  273. label
  274. | {{_ 'active'}}
  275. select.select-active.js-org-isactive
  276. option(value="false") {{_ 'yes'}}
  277. option(value="true" selected="{{org.loginDisabled}}") {{_ 'no'}}
  278. hr
  279. div.buttonsContainer
  280. input.primary.wide(type="submit" value="{{_ 'save'}}")
  281. template(name="editTeamPopup")
  282. form
  283. label.hide.teamId(type="text" value=team._id)
  284. label
  285. | {{_ 'displayName'}}
  286. input.js-teamDisplayName(type="text" value=team.displayName required)
  287. span.error.hide.teamname-taken
  288. | {{_ 'error-teamname-taken'}}
  289. label
  290. | {{_ 'description'}}
  291. input.js-orgDesc(type="text" value=org.desc required)
  292. label
  293. | {{_ 'name'}}
  294. input.js-orgName(type="text" value=org.name required)
  295. label
  296. | {{_ 'website'}}
  297. input.js-orgWebsite(type="text" value=org.website required)
  298. label
  299. | {{_ 'active'}}
  300. select.select-active.js-team-isactive
  301. option(value="false") {{_ 'yes'}}
  302. option(value="true" selected="{{team.loginDisabled}}") {{_ 'no'}}
  303. hr
  304. div.buttonsContainer
  305. input.primary.wide(type="submit" value="{{_ 'save'}}")
  306. template(name="editUserPopup")
  307. form
  308. label.hide.userId(type="text" value=user._id)
  309. label
  310. | {{_ 'username'}}
  311. span.error.hide.username-taken
  312. | {{_ 'error-username-taken'}}
  313. if isLdap
  314. input.js-profile-username(type="text" value=user.username readonly)
  315. else
  316. input.js-profile-username(type="text" value=user.username required)
  317. label
  318. | {{_ 'fullname'}}
  319. input.js-profile-fullname(type="text" value=user.profile.fullname required)
  320. label
  321. | {{_ 'initials'}}
  322. input.js-profile-initials(type="text" value=user.profile.initials)
  323. label
  324. | {{_ 'admin'}}
  325. select.select-role.js-profile-isadmin
  326. option(value="false") {{_ 'no'}}
  327. option(value="true" selected="{{user.isAdmin}}") {{_ 'yes'}}
  328. label
  329. | {{_ 'email'}}
  330. span.error.hide.email-taken
  331. | {{_ 'error-email-taken'}}
  332. if isLdap
  333. input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
  334. else
  335. input.js-profile-email(type="email" value="{{user.emails.[0].address}}" required)
  336. label
  337. | {{_ 'verified'}}
  338. select.select-verified.js-profile-email-verified
  339. option(value="false") {{_ 'no'}}
  340. option(value="true" selected="{{userData.emails.[0].verified}}") {{_ 'yes'}}
  341. label
  342. | {{_ 'active'}}
  343. select.select-active.js-profile-isactive
  344. option(value="false") {{_ 'yes'}}
  345. option(value="true" selected="{{user.loginDisabled}}") {{_ 'no'}}
  346. label
  347. | {{_ 'authentication-type'}}
  348. select.select-authenticationMethod.js-authenticationMethod
  349. each authentications
  350. if isSelected value
  351. option(value="{{value}}" selected) {{_ value}}
  352. else
  353. option(value="{{value}}") {{_ value}}
  354. hr
  355. label
  356. | {{_ 'password'}}
  357. input.js-profile-password(type="password")
  358. div.buttonsContainer
  359. input.primary.wide(type="submit" value="{{_ 'save'}}")
  360. template(name="newOrgPopup")
  361. form
  362. //label.hide.userId(type="text" value=user._id)
  363. label
  364. | {{_ 'displayName'}}
  365. input.js-displayName(type="text" value="" required)
  366. label
  367. | {{_ 'description'}}
  368. input.js-desc(type="text" value="" required)
  369. label
  370. | {{_ 'shortName'}}
  371. input.js-name(type="text" value="")
  372. label
  373. | {{_ 'teams'}}
  374. input.js-teams(type="text" value="")
  375. label
  376. | {{_ 'website'}}
  377. input.js-website(type="text" value="")
  378. label
  379. | {{_ 'active'}}
  380. select.select-active.js-profile-isactive
  381. option(value="false" selected="selected") {{_ 'yes'}}
  382. option(value="true") {{_ 'no'}}
  383. hr
  384. div.buttonsContainer
  385. input.primary.wide(type="submit" value="{{_ 'save'}}")
  386. template(name="newTeamPopup")
  387. form
  388. //label.hide.teamId(type="text" value=team._id)
  389. label
  390. | {{_ 'displayName'}}
  391. input.js-teamDisplayName(type="text" value="" required)
  392. label
  393. | {{_ 'description'}}
  394. input.js-teamDesc(type="text" value="" required)
  395. label
  396. | {{_ 'shortName'}}
  397. input.js-teamName(type="text" value="")
  398. label
  399. | {{_ 'website'}}
  400. input.js-teamWebsite(type="text" value="")
  401. label
  402. | {{_ 'active'}}
  403. select.select-active.js-profile-isactive
  404. option(value="false" selected="selected") {{_ 'yes'}}
  405. option(value="true") {{_ 'no'}}
  406. hr
  407. div.buttonsContainer
  408. input.primary.wide(type="submit" value="{{_ 'save'}}")
  409. template(name="newUserPopup")
  410. form
  411. //label.hide.userId(type="text" value=user._id)
  412. label
  413. | {{_ 'fullname'}}
  414. input.js-profile-fullname(type="text" value="" required)
  415. label
  416. | {{_ 'username'}}
  417. span.error.hide.username-taken
  418. | {{_ 'error-username-taken'}}
  419. //if isLdap
  420. // input.js-profile-username(type="text" value=user.username readonly)
  421. //else
  422. input.js-profile-username(type="text" value="" required)
  423. label
  424. | {{_ 'email'}}
  425. span.error.hide.email-taken
  426. | {{_ 'error-email-taken'}}
  427. //if isLdap
  428. // input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
  429. //else
  430. input.js-profile-email(type="email" value="" required)
  431. label
  432. | {{_ 'admin'}}
  433. select.select-role.js-profile-isadmin
  434. option(value="false" selected="selected") {{_ 'no'}}
  435. option(value="true") {{_ 'yes'}}
  436. label
  437. | {{_ 'active'}}
  438. select.select-active.js-profile-isactive
  439. option(value="false" selected="selected") {{_ 'yes'}}
  440. option(value="true") {{_ 'no'}}
  441. label
  442. | {{_ 'authentication-type'}}
  443. select.select-authenticationMethod.js-authenticationMethod
  444. each authentications
  445. if isSelected value
  446. option(value="{{value}}" selected) {{_ value}}
  447. else
  448. option(value="{{value}}") {{_ value}}
  449. hr
  450. label
  451. | {{_ 'password'}}
  452. input.js-profile-password(type="password" required)
  453. div.buttonsContainer
  454. input.primary.wide(type="submit" value="{{_ 'save'}}")
  455. template(name="settingsOrgPopup")
  456. ul.pop-over-list
  457. li
  458. a.impersonate-org
  459. i.fa.fa-user
  460. | {{_ 'impersonate-org'}}
  461. // Delete is not enabled yet, because it does leave empty user avatars
  462. // to boards: boards members, card members and assignees have
  463. // empty users. See:
  464. // - wekan/client/components/settings/peopleBody.jade deleteButton
  465. // - wekan/client/components/settings/peopleBody.js deleteButton
  466. // - wekan/client/components/sidebar/sidebar.js Popup.afterConfirm('removeMember'
  467. // that does now remove member from board, card members and assignees correctly,
  468. // but that should be used to remove user from all boards similarly
  469. // - wekan/models/users.js Delete is not enabled
  470. //li
  471. // br
  472. // br
  473. // hr
  474. //li
  475. // form
  476. // label.hide.userId(type="text" value=user._id)
  477. // div.buttonsContainer
  478. // input#deleteButton.card-details-red.right.wide(type="button" value="{{_ 'delete'}}")
  479. template(name="settingsUserPopup")
  480. ul.pop-over-list
  481. li
  482. a.impersonate-user
  483. i.fa.fa-user
  484. | {{_ 'impersonate-user'}}
  485. // Delete is not enabled yet, because it does leave empty user avatars
  486. // to boards: boards members, card members and assignees have
  487. // empty users. See:
  488. // - wekan/client/components/settings/peopleBody.jade deleteButton
  489. // - wekan/client/components/settings/peopleBody.js deleteButton
  490. // - wekan/client/components/sidebar/sidebar.js Popup.afterConfirm('removeMember'
  491. // that does now remove member from board, card members and assignees correctly,
  492. // but that should be used to remove user from all boards similarly
  493. // - wekan/models/users.js Delete is not enabled
  494. //li
  495. // br
  496. // br
  497. // hr
  498. //li
  499. // form
  500. // label.hide.userId(type="text" value=user._id)
  501. // div.buttonsContainer
  502. // input#deleteButton.card-details-red.right.wide(type="button" value="{{_ 'delete'}}")