sidebar.jade 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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.sidebar-shortcuts
  9. a.board-header-btn.js-shortcuts
  10. i.fa.fa-keyboard-o
  11. span {{_ 'keyboard-shortcuts' }}
  12. .sidebar-content.js-board-sidebar-content
  13. //a.hide-btn.js-hide-sidebar
  14. // i.fa.fa-navicon
  15. unless isDefaultView
  16. h2
  17. a.fa.fa-chevron-left.js-back-home
  18. = getViewTitle
  19. +Template.dynamic(template=getViewTemplate)
  20. template(name='homeSidebar')
  21. +membersWidget
  22. hr
  23. +labelsWidget
  24. ul#cards.label-text-hidden
  25. a.flex.js-toggle-minicard-label-text
  26. span {{_ 'hide-minicard-label-text'}}
  27. b  
  28. .materialCheckBox(class="{{#if hiddenMinicardLabelText}}is-checked{{/if}}")
  29. hr
  30. unless currentUser.isNoComments
  31. h3
  32. i.fa.fa-comments-o
  33. | {{_ 'activities'}}
  34. +activities(mode="board")
  35. template(name="membersWidget")
  36. .board-widget.board-widget-members
  37. h3
  38. i.fa.fa-users
  39. | {{_ 'members'}}
  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
  50. i.fa.fa-plus
  51. else if currentUser.isBoardAdmin
  52. a.member.add-member.js-manage-board-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-assignee(class="{{#if allowsAssignee}}is-checked{{/if}}")
  105. .materialCheckBox(class="{{#if allowsAssignee}}is-checked{{/if}}")
  106. span
  107. i.fa.fa-user
  108. | {{_ 'assignee'}}
  109. div.check-div
  110. a.flex.js-field-has-assigned-by(class="{{#if allowsAssignedBy}}is-checked{{/if}}")
  111. .materialCheckBox(class="{{#if allowsAssignedBy}}is-checked{{/if}}")
  112. span
  113. i.fa.fa-shopping-cart
  114. | {{_ 'assigned-by'}}
  115. div.check-div
  116. a.flex.js-field-has-requested-by(class="{{#if allowsRequestedBy}}is-checked{{/if}}")
  117. .materialCheckBox(class="{{#if allowsRequestedBy}}is-checked{{/if}}")
  118. span
  119. i.fa.fa-user-plus
  120. | {{_ 'requested-by'}}
  121. div.check-div
  122. a.flex.js-field-has-labels(class="{{#if allowsLabels}}is-checked{{/if}}")
  123. .materialCheckBox(class="{{#if allowsLabels}}is-checked{{/if}}")
  124. span
  125. i.fa.fa-tags
  126. | {{_ 'labels'}}
  127. div.check-div
  128. a.flex.js-field-has-description-title(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
  129. .materialCheckBox(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
  130. span
  131. i.fa.fa-align-left
  132. | {{_ 'description'}}
  133. | {{_ 'title'}}
  134. div.check-div
  135. a.flex.js-field-has-description-text(class="{{#if allowsDescriptionText}}is-checked{{/if}}")
  136. .materialCheckBox(class="{{#if allowsDescriptionText}}is-checked{{/if}}")
  137. span
  138. i.fa.fa-align-left
  139. | {{_ 'description'}}
  140. | {{_ 'custom-field-text'}}
  141. div.check-div
  142. a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}")
  143. .materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}")
  144. span
  145. i.fa.fa-check
  146. | {{_ 'checklists'}}
  147. div.check-div
  148. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  149. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  150. span
  151. i.fa.fa-sitemap
  152. | {{_ 'subtasks'}}
  153. div.check-div
  154. a.flex.js-field-has-attachments(class="{{#if allowsAttachments}}is-checked{{/if}}")
  155. .materialCheckBox(class="{{#if allowsAttachments}}is-checked{{/if}}")
  156. span
  157. i.fa.fa-paperclip
  158. | {{_ 'attachments'}}
  159. //div.check-div
  160. // a.flex.js-field-has-comments(class="{{#if allowsComments}}is-checked{{/if}}")
  161. // .materialCheckBox(class="{{#if allowsComments}}is-checked{{/if}}")
  162. // span
  163. // i.fa.fa-comment-o
  164. // | {{_ 'comment'}}
  165. //div.check-div
  166. // a.flex.js-field-has-activities(class="{{#if allowsActivities}}is-checked{{/if}}")
  167. // .materialCheckBox(class="{{#if allowsActivities}}is-checked{{/if}}")
  168. // span
  169. // i.fa.fa-history
  170. // | {{_ 'activities'}}
  171. template(name="boardSubtaskSettingsPopup")
  172. form.board-subtask-settings
  173. h3 {{_ 'show-parent-in-minicard'}}
  174. a#prefix-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  175. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  176. span {{_ 'prefix-with-full-path'}}
  177. a#prefix-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  178. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  179. span {{_ 'prefix-with-parent'}}
  180. a#subtext-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  181. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  182. span {{_ 'subtext-with-full-path'}}
  183. a#subtext-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  184. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  185. span {{_ 'subtext-with-parent'}}
  186. a#no-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  187. .materialCheckBox(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  188. span {{_ 'no-parent'}}
  189. div
  190. hr
  191. div.check-div
  192. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  193. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  194. span {{_ 'show-subtasks-field'}}
  195. label
  196. | {{_ 'deposit-subtasks-board'}}
  197. select.js-field-deposit-board(disabled="{{#unless allowsSubtasks}}disabled{{/unless}}")
  198. each boards
  199. if isBoardSelected
  200. option(value=_id selected="selected") {{title}}
  201. else
  202. option(value=_id) {{title}}
  203. if isNullBoardSelected
  204. option(value='null' selected="selected") {{_ 'custom-field-dropdown-none'}}
  205. else
  206. option(value='null') {{_ 'custom-field-dropdown-none'}}
  207. div
  208. hr
  209. label
  210. | {{_ 'deposit-subtasks-list'}}
  211. select.js-field-deposit-list(disabled="{{#unless hasLists}}disabled{{/unless}}")
  212. each lists
  213. if isListSelected
  214. option(value=_id selected="selected") {{title}}
  215. else
  216. option(value=_id) {{title}}
  217. template(name="chooseBoardSource")
  218. ul.pop-over-list
  219. li
  220. a(href="{{pathFor '/import/trello'}}") {{_ 'from-trello'}}
  221. li
  222. a(href="{{pathFor '/import/wekan'}}") {{_ 'from-wekan'}}
  223. li
  224. a(href="{{pathFor '/import/csv'}}") {{_ 'from-csv'}}
  225. template(name="archiveBoardPopup")
  226. p {{_ 'close-board-pop'}}
  227. button.js-confirm.negate.full(type="submit")
  228. i.fa.fa-archive
  229. | {{_ 'archive'}}
  230. template(name="outgoingWebhooksPopup")
  231. each integrations
  232. form.integration-form
  233. a.flex
  234. span {{_ 'disable-webhook'}}
  235. b  
  236. .materialCheckBox(class="{{#unless enabled}}is-checked{{/unless}}")
  237. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title" value=title)
  238. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  239. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" value=token name="token")
  240. select.js-outgoing-webhooks-type(name="type")
  241. each _type in types
  242. if($eq _type this.type)
  243. option(value=_type selected="selected") {{_ _type}}
  244. else
  245. option(value=_type) {{_ _type}}
  246. input(type="hidden" value=this.type name="_type")
  247. input(type="hidden" value=_id name="id")
  248. input.primary.wide(type="submit" value="{{_ 'save'}}")
  249. form.integration-form
  250. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title")
  251. input.js-outgoing-webhooks-url(placeholder="{{_ 'URL' }}" type="text" name="url")
  252. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" name="token")
  253. select.js-outgoing-webhooks-type(name="type")
  254. each _type in types
  255. option(value=_type) {{_ _type}}
  256. input.primary.wide(type="submit" value="{{_ 'create'}}")
  257. template(name="boardMenuPopup")
  258. ul.pop-over-list
  259. if currentUser.isBoardAdmin
  260. li
  261. a.js-open-rules-view(title="{{_ 'rules'}}")
  262. i.fa.fa-magic
  263. | {{_ 'rules'}}
  264. if currentUser.isBoardAdmin
  265. li
  266. a.js-custom-fields
  267. i.fa.fa-list-alt
  268. | {{_ 'custom-fields'}}
  269. li
  270. a.js-open-archives
  271. i.fa.fa-archive
  272. | {{_ 'archived-items'}}
  273. if currentUser.isBoardAdmin
  274. li
  275. a.js-change-board-color
  276. i.fa.fa-paint-brush
  277. | {{_ 'board-change-color'}}
  278. hr
  279. ul.pop-over-list
  280. if withApi
  281. li
  282. a.js-export-board
  283. i.fa.fa-share-alt
  284. | {{_ 'export-board'}}
  285. if currentUser.isBoardAdmin
  286. li
  287. a.js-outgoing-webhooks
  288. i.fa.fa-globe
  289. | {{_ 'outgoing-webhooks'}}
  290. li
  291. a.js-card-settings
  292. i.fa.fa-id-card-o
  293. | {{_ 'card-settings'}}
  294. li
  295. a.js-subtask-settings
  296. i.fa.fa-sitemap
  297. | {{_ 'subtask-settings'}}
  298. unless currentBoard.isTemplatesBoard
  299. if currentUser.isBoardAdmin
  300. hr
  301. ul.pop-over-list
  302. li
  303. a.js-archive-board
  304. i.fa.fa-arrow-right
  305. i.fa.fa-archive
  306. | {{_ 'archive-board'}}
  307. template(name="exportBoard")
  308. ul.pop-over-list
  309. li
  310. a.download-json-link(href="{{exportUrl}}", download="{{exportJsonFilename}}")
  311. i.fa.fa-share-alt
  312. | {{_ 'export-board-json'}}
  313. li
  314. a(href="{{exportUrlExcel}}", download="{{exportFilenameExcel}}")
  315. i.fa.fa-share-alt
  316. | {{_ 'export-board-excel'}}
  317. li
  318. a(href="{{exportCsvUrl}}", download="{{exportCsvFilename}}")
  319. i.fa.fa-share-alt
  320. | {{_ 'export-board-csv'}}
  321. li
  322. a(href="{{exportTsvUrl}}", download="{{exportTsvFilename}}")
  323. i.fa.fa-share-alt
  324. | {{_ 'export-board-tsv'}}
  325. li
  326. a.html-export-board
  327. i.fa.fa-archive
  328. | {{_ 'export-board-html'}}
  329. template(name="labelsWidget")
  330. .board-widget.board-widget-labels
  331. h3
  332. i.fa.fa-tags
  333. | {{_ 'labels'}}
  334. .board-widget-content
  335. each currentBoard.labels
  336. a.card-label(class="card-label-{{color}}"
  337. class="{{#if currentUser.isNotCommentOnly}}{{#if currentUser.isNotWorker}}js-label{{/if}}{{/if}}")
  338. span.card-label-name
  339. +viewer
  340. = name
  341. if currentUser.isBoardAdmin
  342. a.card-label.add-label.js-add-label
  343. i.fa.fa-plus
  344. template(name="memberPopup")
  345. .board-member-menu
  346. .miniprofile-header
  347. +userAvatar(userId=user._id showEdit=true)
  348. .info
  349. h3
  350. .js-profile= user.profile.fullname
  351. p.quiet @#{user.username}
  352. if isInvited
  353. p
  354. i.fa.fa-exclamation-circle
  355. | {{_ 'not-accepted-yet'}}
  356. ul.pop-over-list
  357. li
  358. a.js-filter-member {{_ 'filter-cards'}}
  359. if currentUser.isBoardAdmin
  360. li
  361. a.js-change-role
  362. | {{_ 'change-permissions'}}
  363. span.quiet (#{memberType})
  364. unless currentUser.isWorker
  365. li
  366. if $eq currentUser._id userId
  367. a.js-leave-member {{_ 'leave-board'}}
  368. else if currentUser.isBoardAdmin
  369. a.js-remove-member {{_ 'remove-from-board'}}
  370. template(name="removeMemberPopup")
  371. p {{_ 'remove-member-pop' name=user.profile.fullname username=user.username boardTitle=board.title}}
  372. button.js-confirm.negate.full(type="submit") {{_ 'remove-member'}}
  373. template(name="leaveBoardPopup")
  374. p {{_ 'leave-board-pop' boardTitle=board.title}}
  375. button.js-confirm.negate.full(type="submit") {{_ 'leave-board'}}
  376. template(name="addMemberPopup")
  377. .js-search-member
  378. +esInput(index="users")
  379. if loading.get
  380. +spinner
  381. else if error.get
  382. .warning {{_ error.get}}
  383. else
  384. ul.pop-over-list
  385. +esEach(index="users")
  386. li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
  387. a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
  388. +userAvatar(userId=_id esSearch=true)
  389. span.full-name
  390. = profile.fullname
  391. | (<span class="username">{{username}}</span>)
  392. if isBoardMember
  393. .quiet ({{_ 'joined'}})
  394. +ifEsIsSearching(index='users')
  395. +spinner
  396. +ifEsHasNoResults(index="users")
  397. .manage-member-section
  398. p.quiet {{_ 'no-results'}}
  399. button.js-email-invite.primary.full {{_ 'email-invite'}}
  400. template(name="changePermissionsPopup")
  401. ul.pop-over-list
  402. li
  403. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-admin{{/if}}")
  404. | {{_ 'admin'}}
  405. if isAdmin
  406. i.fa.fa-check
  407. span.sub-name {{_ 'admin-desc'}}
  408. li
  409. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-normal{{/if}}")
  410. | {{_ 'normal'}}
  411. if isNormal
  412. i.fa.fa-check
  413. span.sub-name {{_ 'normal-desc'}}
  414. li
  415. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}")
  416. | {{_ 'no-comments'}}
  417. if isNoComments
  418. i.fa.fa-check
  419. span.sub-name {{_ 'no-comments-desc'}}
  420. li
  421. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}")
  422. | {{_ 'comment-only'}}
  423. if isCommentOnly
  424. i.fa.fa-check
  425. span.sub-name {{_ 'comment-only-desc'}}
  426. li
  427. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-worker{{/if}}")
  428. | {{_ 'worker'}}
  429. if isWorker
  430. i.fa.fa-check
  431. span.sub-name {{_ 'worker-desc'}}
  432. if isLastAdmin
  433. hr
  434. p.quiet.bottom {{_ 'last-admin-desc'}}