sidebar.jade 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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. .board-widget.board-widget-members
  33. h3
  34. i.fa.fa-users
  35. | {{_ 'members'}}
  36. .sidebar-shortcuts
  37. a.board-header-btn.js-shortcuts(title="{{_ 'keyboard-shortcuts' }}")
  38. i.fa.fa-keyboard-o
  39. span {{_ 'keyboard-shortcuts' }}
  40. unless currentUser.isCommentOnly
  41. unless currentUser.isWorker
  42. a.board-header-btn.js-open-board-menu(title="{{_ 'boardMenuPopup-title'}}").right
  43. i.board-header-btn-icon.fa.fa-cog
  44. .board-widget-content
  45. each currentBoard.activeMembers
  46. +userAvatar(userId=this.userId showStatus=true)
  47. if isSandstorm
  48. if currentUser.isBoardMember
  49. a.member.add-member.sandstorm-powerbox-request-identity(title="{{_ 'add-members'}}")
  50. i.fa.fa-plus
  51. else if currentUser.isBoardAdmin
  52. a.member.add-member.js-manage-board-members(title="{{_ 'add-members'}}")
  53. i.fa.fa-plus
  54. .clearfix
  55. if isInvited
  56. hr
  57. p
  58. i.fa.fa-exclamation-circle
  59. | {{_ 'just-invited'}}
  60. button.js-member-invite-accept.primary {{_ 'accept'}}
  61. button.js-member-invite-decline {{_ 'decline'}}
  62. template(name="boardChangeColorPopup")
  63. .board-backgrounds-list.clearfix
  64. each backgroundColors
  65. .board-background-select.js-select-background
  66. span.background-box(class="board-color-{{this}}")
  67. span {{this}}
  68. if isSelected
  69. i.fa.fa-check
  70. template(name="boardCardSettingsPopup")
  71. form.board-card-settings
  72. h3 {{_ 'show-on-card'}}
  73. div.check-div
  74. a.flex.js-field-has-receiveddate(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
  75. .materialCheckBox(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
  76. span
  77. i.fa.fa-sign-out
  78. | {{_ 'card-received'}}
  79. div.check-div
  80. a.flex.js-field-has-startdate(class="{{#if allowsStartDate}}is-checked{{/if}}")
  81. .materialCheckBox(class="{{#if allowsStartDate}}is-checked{{/if}}")
  82. span
  83. i.fa.fa-hourglass-start
  84. | {{_ 'card-start'}}
  85. div.check-div
  86. a.flex.js-field-has-duedate(class="{{#if allowsDueDate}}is-checked{{/if}}")
  87. .materialCheckBox(class="{{#if allowsDueDate}}is-checked{{/if}}")
  88. span
  89. i.fa.fa-sign-in
  90. | {{_ 'card-due'}}
  91. div.check-div
  92. a.flex.js-field-has-enddate(class="{{#if allowsEndDate}}is-checked{{/if}}")
  93. .materialCheckBox(class="{{#if allowsEndDate}}is-checked{{/if}}")
  94. span
  95. i.fa.fa-hourglass-end
  96. | {{_ 'card-end'}}
  97. div.check-div
  98. a.flex.js-field-has-members(class="{{#if allowsMembers}}is-checked{{/if}}")
  99. .materialCheckBox(class="{{#if allowsMembers}}is-checked{{/if}}")
  100. span
  101. i.fa.fa-users
  102. | {{_ 'members'}}
  103. div.check-div
  104. a.flex.js-field-has-creator(class="{{#if allowsCreator}}is-checked{{/if}}")
  105. .materialCheckBox(class="{{#if allowsCreator}}is-checked{{/if}}")
  106. span
  107. i.fa.fa-user
  108. | {{_ 'creator'}}
  109. div.check-div
  110. a.flex.js-field-has-assignee(class="{{#if allowsAssignee}}is-checked{{/if}}")
  111. .materialCheckBox(class="{{#if allowsAssignee}}is-checked{{/if}}")
  112. span
  113. i.fa.fa-user
  114. | {{_ 'assignee'}}
  115. div.check-div
  116. a.flex.js-field-has-assigned-by(class="{{#if allowsAssignedBy}}is-checked{{/if}}")
  117. .materialCheckBox(class="{{#if allowsAssignedBy}}is-checked{{/if}}")
  118. span
  119. i.fa.fa-shopping-cart
  120. | {{_ 'assigned-by'}}
  121. div.check-div
  122. a.flex.js-field-has-requested-by(class="{{#if allowsRequestedBy}}is-checked{{/if}}")
  123. .materialCheckBox(class="{{#if allowsRequestedBy}}is-checked{{/if}}")
  124. span
  125. i.fa.fa-user-plus
  126. | {{_ 'requested-by'}}
  127. div.check-div
  128. a.flex.js-field-has-card-sorting-by-number(class="{{#if allowsCardSortingByNumber}}is-checked{{/if}}")
  129. .materialCheckBox(class="{{#if allowsCardSortingByNumber}}is-checked{{/if}}")
  130. span
  131. i.fa.fa-sort
  132. | {{_ 'card-sorting-by-number'}}
  133. div.check-div
  134. a.flex.js-field-has-labels(class="{{#if allowsLabels}}is-checked{{/if}}")
  135. .materialCheckBox(class="{{#if allowsLabels}}is-checked{{/if}}")
  136. span
  137. i.fa.fa-tags
  138. | {{_ 'labels'}}
  139. div.check-div
  140. a.flex.js-field-has-description-title(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
  141. .materialCheckBox(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
  142. span
  143. i.fa.fa-align-left
  144. | {{_ 'description'}}
  145. | {{_ 'title'}}
  146. div.check-div
  147. a.flex.js-field-has-description-text(class="{{#if allowsDescriptionText}}is-checked{{/if}}")
  148. .materialCheckBox(class="{{#if allowsDescriptionText}}is-checked{{/if}}")
  149. span
  150. i.fa.fa-align-left
  151. | {{_ 'description'}}
  152. | {{_ 'custom-field-text'}}
  153. div.check-div
  154. a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}")
  155. .materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}")
  156. span
  157. i.fa.fa-check
  158. | {{_ 'checklists'}}
  159. div.check-div
  160. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  161. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  162. span
  163. i.fa.fa-sitemap
  164. | {{_ 'subtasks'}}
  165. div.check-div
  166. a.flex.js-field-has-attachments(class="{{#if allowsAttachments}}is-checked{{/if}}")
  167. .materialCheckBox(class="{{#if allowsAttachments}}is-checked{{/if}}")
  168. span
  169. i.fa.fa-paperclip
  170. | {{_ 'attachments'}}
  171. //div.check-div
  172. // a.flex.js-field-has-comments(class="{{#if allowsComments}}is-checked{{/if}}")
  173. // .materialCheckBox(class="{{#if allowsComments}}is-checked{{/if}}")
  174. // span
  175. // i.fa.fa-comment-o
  176. // | {{_ 'comment'}}
  177. //div.check-div
  178. // a.flex.js-field-has-activities(class="{{#if allowsActivities}}is-checked{{/if}}")
  179. // .materialCheckBox(class="{{#if allowsActivities}}is-checked{{/if}}")
  180. // span
  181. // i.fa.fa-history
  182. // | {{_ 'activities'}}
  183. template(name="boardSubtaskSettingsPopup")
  184. form.board-subtask-settings
  185. h3 {{_ 'show-parent-in-minicard'}}
  186. a#prefix-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  187. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  188. span {{_ 'prefix-with-full-path'}}
  189. a#prefix-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  190. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  191. span {{_ 'prefix-with-parent'}}
  192. a#subtext-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  193. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  194. span {{_ 'subtext-with-full-path'}}
  195. a#subtext-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  196. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  197. span {{_ 'subtext-with-parent'}}
  198. a#no-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  199. .materialCheckBox(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  200. span {{_ 'no-parent'}}
  201. div
  202. hr
  203. div.check-div
  204. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  205. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  206. span {{_ 'show-subtasks-field'}}
  207. label
  208. | {{_ 'deposit-subtasks-board'}}
  209. select.js-field-deposit-board(disabled="{{#unless allowsSubtasks}}disabled{{/unless}}")
  210. each boards
  211. if isBoardSelected
  212. option(value=_id selected="selected") {{title}}
  213. else
  214. option(value=_id) {{title}}
  215. if isNullBoardSelected
  216. option(value='null' selected="selected") {{_ 'custom-field-dropdown-none'}}
  217. else
  218. option(value='null') {{_ 'custom-field-dropdown-none'}}
  219. div
  220. hr
  221. label
  222. | {{_ 'deposit-subtasks-list'}}
  223. select.js-field-deposit-list(disabled="{{#unless hasLists}}disabled{{/unless}}")
  224. each lists
  225. if isListSelected
  226. option(value=_id selected="selected") {{title}}
  227. else
  228. option(value=_id) {{title}}
  229. template(name="chooseBoardSource")
  230. ul.pop-over-list
  231. li
  232. a(href="{{pathFor '/import/trello'}}") {{_ 'from-trello'}}
  233. li
  234. a(href="{{pathFor '/import/wekan'}}") {{_ 'from-wekan'}}
  235. li
  236. a(href="{{pathFor '/import/csv'}}") {{_ 'from-csv'}}
  237. template(name="archiveBoardPopup")
  238. p {{_ 'close-board-pop'}}
  239. button.js-confirm.negate.full(type="submit")
  240. i.fa.fa-archive
  241. | {{_ 'archive'}}
  242. template(name="outgoingWebhooksPopup")
  243. each integrations
  244. form.integration-form
  245. a.flex
  246. span {{_ 'disable-webhook'}}
  247. b  
  248. .materialCheckBox(class="{{#unless enabled}}is-checked{{/unless}}")
  249. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title" value=title)
  250. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  251. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" value=token name="token")
  252. select.js-outgoing-webhooks-type(name="type")
  253. each _type in types
  254. if($eq _type this.type)
  255. option(value=_type selected="selected") {{_ _type}}
  256. else
  257. option(value=_type) {{_ _type}}
  258. input(type="hidden" value=this.type name="_type")
  259. input(type="hidden" value=_id name="id")
  260. input.primary.wide(type="submit" value="{{_ 'save'}}")
  261. form.integration-form
  262. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title")
  263. input.js-outgoing-webhooks-url(placeholder="{{_ 'URL' }}" type="text" name="url")
  264. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" name="token")
  265. select.js-outgoing-webhooks-type(name="type")
  266. each _type in types
  267. option(value=_type) {{_ _type}}
  268. input.primary.wide(type="submit" value="{{_ 'create'}}")
  269. template(name="boardMenuPopup")
  270. ul.pop-over-list
  271. if currentUser.isBoardAdmin
  272. li
  273. a.js-open-rules-view(title="{{_ 'rules'}}")
  274. i.fa.fa-magic
  275. | {{_ 'rules'}}
  276. if currentUser.isBoardAdmin
  277. li
  278. a.js-custom-fields
  279. i.fa.fa-list-alt
  280. | {{_ 'custom-fields'}}
  281. li
  282. a.js-open-archives
  283. i.fa.fa-archive
  284. | {{_ 'archived-items'}}
  285. if currentUser.isBoardAdmin
  286. li
  287. a.js-change-board-color
  288. i.fa.fa-paint-brush
  289. | {{_ 'board-change-color'}}
  290. hr
  291. ul.pop-over-list
  292. if withApi
  293. li
  294. a.js-export-board
  295. i.fa.fa-share-alt
  296. | {{_ 'export-board'}}
  297. if currentUser.isBoardAdmin
  298. li
  299. a.js-outgoing-webhooks
  300. i.fa.fa-globe
  301. | {{_ 'outgoing-webhooks'}}
  302. li
  303. a.js-card-settings
  304. i.fa.fa-id-card-o
  305. | {{_ 'card-settings'}}
  306. li
  307. a.js-subtask-settings
  308. i.fa.fa-sitemap
  309. | {{_ 'subtask-settings'}}
  310. unless currentBoard.isTemplatesBoard
  311. if currentUser.isBoardAdmin
  312. hr
  313. ul.pop-over-list
  314. li
  315. a.js-archive-board
  316. i.fa.fa-arrow-right
  317. i.fa.fa-archive
  318. | {{_ 'archive-board'}}
  319. template(name="exportBoard")
  320. ul.pop-over-list
  321. li
  322. a.download-json-link(href="{{exportUrl}}", download="{{exportJsonFilename}}")
  323. i.fa.fa-share-alt
  324. | {{_ 'export-board-json'}}
  325. li
  326. a(href="{{exportUrlExcel}}", download="{{exportFilenameExcel}}")
  327. i.fa.fa-share-alt
  328. | {{_ 'export-board-excel'}}
  329. li
  330. a(href="{{exportCsvUrl}}", download="{{exportCsvFilename}}")
  331. i.fa.fa-share-alt
  332. | {{_ 'export-board-csv'}}
  333. li
  334. a(href="{{exportTsvUrl}}", download="{{exportTsvFilename}}")
  335. i.fa.fa-share-alt
  336. | {{_ 'export-board-tsv'}}
  337. li
  338. a.html-export-board
  339. i.fa.fa-archive
  340. | {{_ 'export-board-html'}}
  341. template(name="labelsWidget")
  342. .board-widget.board-widget-labels
  343. h3
  344. i.fa.fa-tags
  345. | {{_ 'labels'}}
  346. .board-widget-content
  347. each currentBoard.labels
  348. a.card-label(class="card-label-{{color}}"
  349. class="{{#if currentUser.isNotCommentOnly}}{{#if currentUser.isNotWorker}}js-label{{/if}}{{/if}}")
  350. span.card-label-name
  351. +viewer
  352. = name
  353. if currentUser.isBoardAdmin
  354. a.card-label.add-label.js-add-label(title="{{_ 'label-create'}}")
  355. i.fa.fa-plus
  356. template(name="memberPopup")
  357. .board-member-menu
  358. .miniprofile-header
  359. +userAvatar(userId=user._id showEdit=true)
  360. .info
  361. h3
  362. .js-profile= user.profile.fullname
  363. p.quiet @#{user.username}
  364. if isInvited
  365. p
  366. i.fa.fa-exclamation-circle
  367. | {{_ 'not-accepted-yet'}}
  368. ul.pop-over-list
  369. li
  370. a.js-filter-member {{_ 'filter-cards'}}
  371. if currentUser.isBoardAdmin
  372. li
  373. a.js-change-role
  374. | {{_ 'change-permissions'}}
  375. span.quiet (#{memberType})
  376. unless currentUser.isWorker
  377. li
  378. if $eq currentUser._id userId
  379. a.js-leave-member {{_ 'leave-board'}}
  380. else if currentUser.isBoardAdmin
  381. a.js-remove-member {{_ 'remove-from-board'}}
  382. template(name="removeMemberPopup")
  383. p {{_ 'remove-member-pop' name=user.profile.fullname username=user.username boardTitle=board.title}}
  384. button.js-confirm.negate.full(type="submit") {{_ 'remove-member'}}
  385. template(name="leaveBoardPopup")
  386. p {{_ 'leave-board-pop' boardTitle=board.title}}
  387. button.js-confirm.negate.full(type="submit") {{_ 'leave-board'}}
  388. template(name="addMemberPopup")
  389. .js-search-member
  390. +esInput(index="users")
  391. if loading.get
  392. +spinner
  393. else if error.get
  394. .warning {{_ error.get}}
  395. else
  396. ul.pop-over-list
  397. +esEach(index="users")
  398. li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
  399. a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
  400. +userAvatar(userId=_id esSearch=true)
  401. span.full-name
  402. = profile.fullname
  403. | (<span class="username">{{username}}</span>)
  404. if isBoardMember
  405. .quiet ({{_ 'joined'}})
  406. +ifEsIsSearching(index='users')
  407. +spinner
  408. +ifEsHasNoResults(index="users")
  409. .manage-member-section
  410. p.quiet {{_ 'no-results'}}
  411. button.js-email-invite.primary.full {{_ 'email-invite'}}
  412. template(name="changePermissionsPopup")
  413. ul.pop-over-list
  414. li
  415. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-admin{{/if}}")
  416. | {{_ 'admin'}}
  417. if isAdmin
  418. i.fa.fa-check
  419. span.sub-name {{_ 'admin-desc'}}
  420. li
  421. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-normal{{/if}}")
  422. | {{_ 'normal'}}
  423. if isNormal
  424. i.fa.fa-check
  425. span.sub-name {{_ 'normal-desc'}}
  426. li
  427. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}")
  428. | {{_ 'no-comments'}}
  429. if isNoComments
  430. i.fa.fa-check
  431. span.sub-name {{_ 'no-comments-desc'}}
  432. li
  433. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}")
  434. | {{_ 'comment-only'}}
  435. if isCommentOnly
  436. i.fa.fa-check
  437. span.sub-name {{_ 'comment-only-desc'}}
  438. li
  439. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-worker{{/if}}")
  440. | {{_ 'worker'}}
  441. if isWorker
  442. i.fa.fa-check
  443. span.sub-name {{_ 'worker-desc'}}
  444. if isLastAdmin
  445. hr
  446. p.quiet.bottom {{_ 'last-admin-desc'}}