sidebar.jade 16 KB

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