sidebar.jade 23 KB

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