peopleBody.jade 15 KB

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