2
0

sidebar.jade 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. template(name="sidebar")
  2. .board-sidebar.sidebar(class="{{#if isOpen}}is-open{{/if}}")
  3. //a.sidebar-tongue.js-toggle-sidebar(
  4. // class="{{#if isTongueHidden}}is-hidden{{/if}}",
  5. // title="{{showTongueTitle}}")
  6. // i.fa.fa-navicon
  7. .sidebar-shadow
  8. .sidebar-content.js-board-sidebar-content
  9. //a.hide-btn.js-hide-sidebar
  10. // i.fa.fa-navicon
  11. unless isDefaultView
  12. h2
  13. a.fa.fa-chevron-left.js-back-home
  14. = getViewTitle
  15. +Template.dynamic(template=getViewTemplate)
  16. template(name='homeSidebar')
  17. hr
  18. +membersWidget
  19. hr
  20. +labelsWidget
  21. ul#cards.label-text-hidden
  22. a.flex.js-toggle-minicard-label-text(title="{{_ 'hide-minicard-label-text'}}")
  23. span {{_ 'hide-minicard-label-text'}}
  24. b  
  25. .materialCheckBox(class="{{#if hiddenMinicardLabelText}}is-checked{{/if}}")
  26. hr
  27. unless currentUser.isNoComments
  28. h3
  29. i.fa.fa-comments-o
  30. | {{_ 'activities'}}
  31. +activities(mode="board")
  32. template(name="membersWidget")
  33. unless currentUser.isCommentOnly
  34. unless currentUser.isWorker
  35. h3
  36. a.board-header-btn.js-open-board-menu(title="{{_ 'boardMenuPopup-title'}}")
  37. i.board-header-btn-icon.fa.fa-cog
  38. | {{_ 'boardMenuPopup-title'}}
  39. .board-widget.board-widget-members
  40. .sidebar-shortcuts
  41. a.board-header-btn.js-shortcuts(title="{{_ 'keyboard-shortcuts' }}")
  42. i.fa.fa-keyboard-o
  43. span {{_ 'keyboard-shortcuts' }}
  44. hr
  45. h3
  46. i.fa.fa-users
  47. | {{_ 'members'}}
  48. +basicTabs(tabs=tabs)
  49. +tabContent(slug="people")
  50. unless currentUser.isWorker
  51. p.quiet
  52. .board-widget-content
  53. each currentBoard.activeMembers
  54. +userAvatar(userId=this.userId showStatus=true)
  55. if isSandstorm
  56. if currentUser.isBoardMember
  57. a.member.add-member.sandstorm-powerbox-request-identity(title="{{_ 'add-members'}}")
  58. i.fa.fa-plus
  59. else if currentUser.isBoardAdmin
  60. a.member.add-member.js-manage-board-members(title="{{_ 'add-members'}}")
  61. i.fa.fa-plus
  62. .clearfix
  63. if isInvited
  64. hr
  65. p
  66. i.fa.fa-exclamation-circle
  67. | {{_ 'just-invited'}}
  68. button.js-member-invite-accept.primary {{_ 'accept'}}
  69. button.js-member-invite-decline {{_ 'decline'}}
  70. +tabContent(slug='organizations')
  71. unless currentUser.isWorker
  72. p.quiet
  73. if AtLeastOneOrgWasCreated
  74. .board-widget.board-widget-members
  75. .board-widget-content
  76. +boardOrgGeneral
  77. .clearfix
  78. +tabContent(slug="teams")
  79. unless currentUser.isWorker
  80. p.quiet
  81. if AtLeastOneTeamWasCreated
  82. .board-widget.board-widget-members
  83. .board-widget-content
  84. +boardTeamGeneral
  85. .clearfix
  86. template(name="boardOrgGeneral")
  87. table
  88. tbody
  89. tr
  90. th
  91. | {{_ 'add-organizations'}}
  92. br
  93. i.addOrganizationsLabel
  94. | {{_ 'to-create-organizations-contact-admin'}}
  95. br
  96. i.addOrganizationsLabel
  97. | {{_ 'add-organizations-label'}}
  98. th
  99. if currentUser.isBoardAdmin
  100. a.member.orgOrTeamMember.add-member.js-manage-board-addOrg(title="{{_ 'add-members'}}")
  101. i.addTeamFaPlus.fa.fa-plus
  102. .divaddfaplusminus
  103. | {{_ 'add'}}
  104. each org in currentBoard.activeOrgs
  105. +boardOrgRow(orgId=org.orgId)
  106. template(name="boardTeamGeneral")
  107. table
  108. tbody
  109. tr
  110. th
  111. | {{_ 'add-teams'}}
  112. br
  113. i.addTeamsLabel
  114. | {{_ 'to-create-teams-contact-admin'}}
  115. br
  116. i.addTeamsLabel
  117. | {{_ 'add-teams-label'}}
  118. th
  119. if currentUser.isBoardAdmin
  120. a.member.orgOrTeamMember.add-member.js-manage-board-addTeam(title="{{_ 'add-members'}}")
  121. i.addTeamFaPlus.fa.fa-plus
  122. .divaddfaplusminus
  123. | {{_ 'add'}}
  124. each currentBoard.activeTeams
  125. +boardTeamRow(teamId=this.teamId)
  126. template(name="boardChangeColorPopup")
  127. .board-backgrounds-list.clearfix
  128. each backgroundColors
  129. .board-background-select.js-select-background
  130. span.background-box(class="board-color-{{this}}")
  131. span {{this}}
  132. if isSelected
  133. i.fa.fa-check
  134. template(name="boardInfoOnMyBoardsPopup")
  135. form.board-info-on-my-boards
  136. h3 {{_ 'show-at-all-boards-page'}}
  137. unless currentSetting.hideCardCounterList
  138. div.check-div
  139. a.flex.js-field-has-cardcounterlist(class="{{#if allowsCardCounterList}}is-checked{{/if}}")
  140. .materialCheckBox(class="{{#if allowsCardCounterList}}is-checked{{/if}}")
  141. span
  142. i.fa.fa-sign-out
  143. | {{_ 'show-card-counter-per-list'}}
  144. unless currentSetting.hideBoardMemberList
  145. div.check-div
  146. a.flex.js-field-has-boardmemberlist(class="{{#if allowsBoardMemberList}}is-checked{{/if}}")
  147. .materialCheckBox(class="{{#if allowsBoardMemberList}}is-checked{{/if}}")
  148. span
  149. i.fa.fa-hourglass-start
  150. | {{_ 'show-board_members-avatar'}}
  151. template(name="boardCardSettingsPopup")
  152. form.board-card-settings
  153. h3 {{_ 'show-on-card'}}
  154. div.check-div
  155. a.flex.js-field-has-receiveddate(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
  156. .materialCheckBox(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
  157. span
  158. i.fa.fa-sign-out
  159. | {{_ 'card-received'}}
  160. div.check-div
  161. a.flex.js-field-has-startdate(class="{{#if allowsStartDate}}is-checked{{/if}}")
  162. .materialCheckBox(class="{{#if allowsStartDate}}is-checked{{/if}}")
  163. span
  164. i.fa.fa-hourglass-start
  165. | {{_ 'card-start'}}
  166. div.check-div
  167. a.flex.js-field-has-duedate(class="{{#if allowsDueDate}}is-checked{{/if}}")
  168. .materialCheckBox(class="{{#if allowsDueDate}}is-checked{{/if}}")
  169. span
  170. i.fa.fa-sign-in
  171. | {{_ 'card-due'}}
  172. div.check-div
  173. a.flex.js-field-has-enddate(class="{{#if allowsEndDate}}is-checked{{/if}}")
  174. .materialCheckBox(class="{{#if allowsEndDate}}is-checked{{/if}}")
  175. span
  176. i.fa.fa-hourglass-end
  177. | {{_ 'card-end'}}
  178. div.check-div
  179. a.flex.js-field-has-members(class="{{#if allowsMembers}}is-checked{{/if}}")
  180. .materialCheckBox(class="{{#if allowsMembers}}is-checked{{/if}}")
  181. span
  182. i.fa.fa-users
  183. | {{_ 'members'}}
  184. div.check-div
  185. a.flex.js-field-has-creator(class="{{#if allowsCreator}}is-checked{{/if}}")
  186. .materialCheckBox(class="{{#if allowsCreator}}is-checked{{/if}}")
  187. span
  188. i.fa.fa-user
  189. | {{_ 'creator'}}
  190. div.check-div
  191. a.flex.js-field-has-assignee(class="{{#if allowsAssignee}}is-checked{{/if}}")
  192. .materialCheckBox(class="{{#if allowsAssignee}}is-checked{{/if}}")
  193. span
  194. i.fa.fa-user
  195. | {{_ 'assignee'}}
  196. div.check-div
  197. a.flex.js-field-has-assigned-by(class="{{#if allowsAssignedBy}}is-checked{{/if}}")
  198. .materialCheckBox(class="{{#if allowsAssignedBy}}is-checked{{/if}}")
  199. span
  200. i.fa.fa-shopping-cart
  201. | {{_ 'assigned-by'}}
  202. div.check-div
  203. a.flex.js-field-has-requested-by(class="{{#if allowsRequestedBy}}is-checked{{/if}}")
  204. .materialCheckBox(class="{{#if allowsRequestedBy}}is-checked{{/if}}")
  205. span
  206. i.fa.fa-user-plus
  207. | {{_ 'requested-by'}}
  208. div.check-div
  209. a.flex.js-field-has-card-sorting-by-number(class="{{#if allowsCardSortingByNumber}}is-checked{{/if}}")
  210. .materialCheckBox(class="{{#if allowsCardSortingByNumber}}is-checked{{/if}}")
  211. span
  212. i.fa.fa-sort
  213. | {{_ 'card-sorting-by-number'}}
  214. div.check-div
  215. a.flex.js-field-has-card-show-lists(class="{{#if allowsShowLists}}is-checked{{/if}}")
  216. .materialCheckBox(class="{{#if allowsShowLists}}is-checked{{/if}}")
  217. span
  218. i.fa.fa-list
  219. | {{_ 'card-show-lists'}}
  220. div.check-div
  221. a.flex.js-field-has-labels(class="{{#if allowsLabels}}is-checked{{/if}}")
  222. .materialCheckBox(class="{{#if allowsLabels}}is-checked{{/if}}")
  223. span
  224. i.fa.fa-tags
  225. | {{_ 'labels'}}
  226. div.check-div
  227. a.flex.js-field-has-card-number(class="{{#if allowsCardNumber}}is-checked{{/if}}")
  228. .materialCheckBox(class="{{#if allowsCardNumber}}is-checked{{/if}}")
  229. span
  230. i.fa.fa-hashtag
  231. | {{_ 'card'}}
  232. | {{_ 'number'}}
  233. div.check-div
  234. a.flex.js-field-has-description-title(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
  235. .materialCheckBox(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
  236. span
  237. i.fa.fa-align-left
  238. | {{_ 'description'}}
  239. | {{_ 'title'}}
  240. div.check-div
  241. a.flex.js-field-has-description-text(class="{{#if allowsDescriptionText}}is-checked{{/if}}")
  242. .materialCheckBox(class="{{#if allowsDescriptionText}}is-checked{{/if}}")
  243. span
  244. i.fa.fa-align-left
  245. | {{_ 'description'}}
  246. | {{_ 'custom-field-text'}}
  247. div.check-div
  248. a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}")
  249. .materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}")
  250. span
  251. i.fa.fa-check
  252. | {{_ 'checklists'}}
  253. div.check-div
  254. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  255. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  256. span
  257. i.fa.fa-sitemap
  258. | {{_ 'subtasks'}}
  259. div.check-div
  260. a.flex.js-field-has-attachments(class="{{#if allowsAttachments}}is-checked{{/if}}")
  261. .materialCheckBox(class="{{#if allowsAttachments}}is-checked{{/if}}")
  262. span
  263. i.fa.fa-paperclip
  264. | {{_ 'attachments'}}
  265. //div.check-div
  266. // a.flex.js-field-has-comments(class="{{#if allowsComments}}is-checked{{/if}}")
  267. // .materialCheckBox(class="{{#if allowsComments}}is-checked{{/if}}")
  268. // span
  269. // i.fa.fa-comment-o
  270. // | {{_ 'comment'}}
  271. //div.check-div
  272. // a.flex.js-field-has-activities(class="{{#if allowsActivities}}is-checked{{/if}}")
  273. // .materialCheckBox(class="{{#if allowsActivities}}is-checked{{/if}}")
  274. // span
  275. // i.fa.fa-history
  276. // | {{_ 'activities'}}
  277. template(name="boardMinicardSettingsPopup")
  278. form.board-minicard-settings
  279. h3 {{_ 'show-on-minicard'}}
  280. div.check-div
  281. a.flex.js-field-has-description-text-on-minicard(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
  282. .materialCheckBox(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
  283. span
  284. i.fa.fa-align-left
  285. | {{_ 'description-on-minicard'}}
  286. template(name="boardSubtaskSettingsPopup")
  287. form.board-subtask-settings
  288. h3 {{_ 'show-parent-in-minicard'}}
  289. a#prefix-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  290. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  291. span {{_ 'prefix-with-full-path'}}
  292. a#prefix-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  293. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  294. span {{_ 'prefix-with-parent'}}
  295. a#subtext-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  296. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  297. span {{_ 'subtext-with-full-path'}}
  298. a#subtext-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  299. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  300. span {{_ 'subtext-with-parent'}}
  301. a#no-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  302. .materialCheckBox(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  303. span {{_ 'no-parent'}}
  304. div
  305. hr
  306. div.check-div
  307. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  308. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  309. span {{_ 'show-subtasks-field'}}
  310. label
  311. | {{_ 'deposit-subtasks-board'}}
  312. select.js-field-deposit-board(disabled="{{#unless allowsSubtasks}}disabled{{/unless}}")
  313. each boards
  314. if isBoardSelected
  315. option(value=_id selected="selected") {{title}}
  316. else
  317. option(value=_id) {{title}}
  318. if isNullBoardSelected
  319. option(value='null' selected="selected") {{_ 'custom-field-dropdown-none'}}
  320. else
  321. option(value='null') {{_ 'custom-field-dropdown-none'}}
  322. div
  323. hr
  324. label
  325. | {{_ 'deposit-subtasks-list'}}
  326. select.js-field-deposit-list(disabled="{{#unless hasLists}}disabled{{/unless}}")
  327. each lists
  328. if isListSelected
  329. option(value=_id selected="selected") {{title}}
  330. else
  331. option(value=_id) {{title}}
  332. template(name="chooseBoardSource")
  333. ul.pop-over-list
  334. li
  335. a(href="{{pathFor '/import/trello'}}") {{_ 'from-trello'}}
  336. li
  337. a(href="{{pathFor '/import/wekan'}}") {{_ 'from-wekan'}}
  338. li
  339. a(href="{{pathFor '/import/csv'}}") {{_ 'from-csv'}}
  340. template(name="archiveBoardPopup")
  341. p {{_ 'close-board-pop'}}
  342. button.js-confirm.negate.full(type="submit")
  343. i.fa.fa-archive
  344. | {{_ 'archive'}}
  345. template(name="outgoingWebhooksPopup")
  346. each integrations
  347. form.integration-form
  348. a.flex
  349. span {{_ 'disable-webhook'}}
  350. b  
  351. .materialCheckBox(class="{{#unless enabled}}is-checked{{/unless}}")
  352. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title" value=title)
  353. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  354. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" value=token name="token")
  355. select.js-outgoing-webhooks-type(name="type")
  356. each _type in types
  357. if($eq _type this.type)
  358. option(value=_type selected="selected") {{_ _type}}
  359. else
  360. option(value=_type) {{_ _type}}
  361. input(type="hidden" value=this.type name="_type")
  362. input(type="hidden" value=_id name="id")
  363. input.primary.wide(type="submit" value="{{_ 'save'}}")
  364. form.integration-form
  365. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title")
  366. input.js-outgoing-webhooks-url(placeholder="{{_ 'URL' }}" type="text" name="url")
  367. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" name="token")
  368. select.js-outgoing-webhooks-type(name="type")
  369. each _type in types
  370. option(value=_type) {{_ _type}}
  371. input.primary.wide(type="submit" value="{{_ 'create'}}")
  372. template(name="boardMenuPopup")
  373. ul.pop-over-list
  374. if currentUser.isBoardAdmin
  375. li
  376. a.js-open-rules-view(title="{{_ 'rules'}}")
  377. i.fa.fa-magic
  378. | {{_ 'rules'}}
  379. if currentUser.isBoardAdmin
  380. li
  381. a.js-custom-fields
  382. i.fa.fa-list-alt
  383. | {{_ 'custom-fields'}}
  384. li
  385. a.js-open-archives
  386. i.fa.fa-archive
  387. | {{_ 'archived-items'}}
  388. if currentUser.isBoardAdmin
  389. li
  390. a.js-change-board-color
  391. i.fa.fa-paint-brush
  392. | {{_ 'board-change-color'}}
  393. if currentUser.isBoardAdmin
  394. unless currentSetting.hideBoardMemberList
  395. unless currentSetting.hideCardCounterList
  396. li
  397. a.js-board-info-on-my-boards(title="{{_ 'board-info-on-my-boards'}}")
  398. i.fa.fa-id-card-o
  399. | {{_ 'board-info-on-my-boards'}}
  400. hr
  401. ul.pop-over-list
  402. if withApi
  403. li
  404. a.js-export-board
  405. i.fa.fa-share-alt
  406. | {{_ 'export-board'}}
  407. if currentUser.isBoardAdmin
  408. li
  409. a.js-outgoing-webhooks
  410. i.fa.fa-globe
  411. | {{_ 'outgoing-webhooks'}}
  412. li
  413. a.js-card-settings
  414. i.fa.fa-id-card-o
  415. | {{_ 'card-settings'}}
  416. li
  417. a.js-minicard-settings
  418. i.fa.fa-id-card-o
  419. | {{_ 'minicard-settings'}}
  420. li
  421. a.js-subtask-settings
  422. i.fa.fa-sitemap
  423. | {{_ 'subtask-settings'}}
  424. unless currentBoard.isTemplatesBoard
  425. if currentUser.isBoardAdmin
  426. hr
  427. ul.pop-over-list
  428. li
  429. a.js-archive-board
  430. i.fa.fa-arrow-right
  431. i.fa.fa-archive
  432. | {{_ 'archive-board'}}
  433. template(name="exportBoard")
  434. ul.pop-over-list
  435. li
  436. a.download-json-link(href="{{exportUrl}}", download="{{exportJsonFilename}}")
  437. i.fa.fa-share-alt
  438. | {{_ 'export-board-json'}}
  439. li
  440. a(href="{{exportUrlExcel}}", download="{{exportFilenameExcel}}")
  441. i.fa.fa-share-alt
  442. | {{_ 'export-board-excel'}}
  443. li
  444. a(href="{{exportCsvUrl}}", download="{{exportCsvFilename}}")
  445. i.fa.fa-share-alt
  446. | {{_ 'export-board-csv'}} ,
  447. li
  448. a(href="{{exportScsvUrl}}", download="{{exportCsvFilename}}")
  449. i.fa.fa-share-alt
  450. | {{_ 'export-board-csv'}} ;
  451. li
  452. a(href="{{exportTsvUrl}}", download="{{exportTsvFilename}}")
  453. i.fa.fa-share-alt
  454. | {{_ 'export-board-tsv'}}
  455. li
  456. a.html-export-board
  457. i.fa.fa-archive
  458. | {{_ 'export-board-html'}}
  459. template(name="labelsWidget")
  460. .board-widget.board-widget-labels
  461. h3
  462. i.fa.fa-tags
  463. | {{_ 'labels'}}
  464. .board-widget-content
  465. each currentBoard.labels
  466. a.card-label(class="card-label-{{color}}"
  467. class="{{#if currentUser.isNotCommentOnly}}{{#if currentUser.isNotWorker}}js-label{{/if}}{{/if}}")
  468. span.card-label-name
  469. +viewer
  470. = name
  471. if currentUser.isBoardAdmin
  472. a.card-label.add-label.js-add-label(title="{{_ 'label-create'}}")
  473. i.fa.fa-plus
  474. template(name="memberPopup")
  475. .board-member-menu
  476. .miniprofile-header
  477. +userAvatar(userId=user._id showEdit=true)
  478. .info
  479. h3
  480. .js-profile= user.profile.fullname
  481. p.quiet @#{user.username}
  482. if isInvited
  483. p
  484. i.fa.fa-exclamation-circle
  485. | {{_ 'not-accepted-yet'}}
  486. ul.pop-over-list
  487. li
  488. a.js-filter-member {{_ 'filter-cards'}}
  489. if currentUser.isBoardAdmin
  490. li
  491. a.js-change-role
  492. | {{_ 'change-permissions'}}
  493. span.quiet (#{memberType})
  494. unless currentUser.isWorker
  495. li
  496. if $eq currentUser._id userId
  497. a.js-leave-member {{_ 'leave-board'}}
  498. else if currentUser.isBoardAdmin
  499. a.js-remove-member {{_ 'remove-from-board'}}
  500. template(name="removeMemberPopup")
  501. p {{_ 'remove-member-pop' name=user.profile.fullname username=user.username boardTitle=board.title}}
  502. button.js-confirm.negate.full(type="submit") {{_ 'remove-member'}}
  503. template(name="leaveBoardPopup")
  504. p {{_ 'leave-board-pop' boardTitle=board.title}}
  505. button.js-confirm.negate.full(type="submit") {{_ 'leave-board'}}
  506. template(name="addBoardOrgPopup")
  507. select.js-boardOrgs#jsBoardOrgs
  508. option(value="-1") {{_ 'organizations'}} :
  509. each value in orgsDatas
  510. option(value="{{value._id}}") {{value.orgDisplayName}}
  511. template(name="removeBoardOrgPopup")
  512. form
  513. input.hide#hideOrgId(type="text" value=org._id)
  514. label
  515. | {{_ 'remove-organization-from-board'}}
  516. br
  517. hr
  518. div.buttonsContainer
  519. input.primary.wide.leaveBoardBtn#leaveBoardBtn(type="submit" value="{{_ 'confirm-btn'}}")
  520. input.primary.wide.cancelLeaveBoardBtn#cancelLeaveBoardBtn(type="submit" value="{{_ 'cancel'}}")
  521. template(name="addBoardTeamPopup")
  522. select.js-boardTeams#jsBoardTeams
  523. option(value="-1") {{_ 'teams'}} :
  524. each value in teamsDatas
  525. option(value="{{value._id}}") {{_ value.teamDisplayName}}
  526. template(name="removeBoardTeamPopup")
  527. form
  528. input.hide#hideTeamId(type="text" value=team._id)
  529. label
  530. | {{_ 'remove-team-from-table'}}
  531. br
  532. hr
  533. div.buttonsContainer
  534. input.primary.wide.leaveBoardBtn#leaveBoardTeamBtn(type="submit" value="{{_ 'confirm-btn'}}")
  535. input.primary.wide.cancelLeaveBoardBtn#cancelLeaveBoardTeamBtn(type="submit" value="{{_ 'cancel'}}")
  536. template(name="addMemberPopup")
  537. .js-search-member
  538. +EasySearch.Input(index=searchIndex)
  539. if loading.get
  540. +spinner
  541. else if error.get
  542. .warning {{_ error.get}}
  543. else
  544. ul.pop-over-list
  545. +EasySearch.Each(index=searchIndex)
  546. li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
  547. a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
  548. +userAvatar(userId=__originalId)
  549. span.full-name
  550. = profile.fullname
  551. | (<span class="username">{{username}}</span>)
  552. if isBoardMember
  553. .quiet ({{_ 'joined'}})
  554. +EasySearch.IfSearching(index=searchIndex)
  555. +spinner
  556. +EasySearch.IfNoResults(index=searchIndex)
  557. .manage-member-section
  558. p.quiet {{_ 'no-results'}}
  559. button.js-email-invite.primary.full {{_ 'email-invite'}}
  560. template(name="changePermissionsPopup")
  561. ul.pop-over-list
  562. li
  563. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-admin{{/if}}")
  564. | {{_ 'admin'}}
  565. if isAdmin
  566. i.fa.fa-check
  567. span.sub-name {{_ 'admin-desc'}}
  568. li
  569. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-normal{{/if}}")
  570. | {{_ 'normal'}}
  571. if isNormal
  572. i.fa.fa-check
  573. span.sub-name {{_ 'normal-desc'}}
  574. li
  575. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}")
  576. | {{_ 'no-comments'}}
  577. if isNoComments
  578. i.fa.fa-check
  579. span.sub-name {{_ 'no-comments-desc'}}
  580. li
  581. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}")
  582. | {{_ 'comment-only'}}
  583. if isCommentOnly
  584. i.fa.fa-check
  585. span.sub-name {{_ 'comment-only-desc'}}
  586. li
  587. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-worker{{/if}}")
  588. | {{_ 'worker'}}
  589. if isWorker
  590. i.fa.fa-check
  591. span.sub-name {{_ 'worker-desc'}}
  592. if isLastAdmin
  593. hr
  594. p.quiet.bottom {{_ 'last-admin-desc'}}