sidebar.jade 24 KB

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