sidebar.jade 21 KB

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