sidebar.jade 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  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.js-perfect-scrollbar
  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. template(name="archiveBoardPopup")
  224. p {{_ 'close-board-pop'}}
  225. button.js-confirm.negate.full(type="submit")
  226. i.fa.fa-archive
  227. | {{_ 'archive'}}
  228. template(name="outgoingWebhooksPopup")
  229. each integrations
  230. form.integration-form
  231. a.flex
  232. span {{_ 'disable-webhook'}}
  233. b  
  234. .materialCheckBox(class="{{#unless enabled}}is-checked{{/unless}}")
  235. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title" value=title)
  236. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  237. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" value=token name="token")
  238. select.js-outgoing-webhooks-type(name="type")
  239. each _type in types
  240. if($eq _type this.type)
  241. option(value=_type selected="selected") {{_ _type}}
  242. else
  243. option(value=_type) {{_ _type}}
  244. input(type="hidden" value=this.type name="_type")
  245. input(type="hidden" value=_id name="id")
  246. input.primary.wide(type="submit" value="{{_ 'save'}}")
  247. form.integration-form
  248. input.js-outgoing-webhooks-title(placeholder="{{_ 'webhook-title'}}" type="text" name="title")
  249. input.js-outgoing-webhooks-url(placeholder="{{_ 'URL' }}" type="text" name="url")
  250. input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" name="token")
  251. select.js-outgoing-webhooks-type(name="type")
  252. each _type in types
  253. option(value=_type) {{_ _type}}
  254. input.primary.wide(type="submit" value="{{_ 'create'}}")
  255. template(name="boardMenuPopup")
  256. ul.pop-over-list
  257. li
  258. a.js-open-rules-view(title="{{_ 'rules'}}")
  259. i.fa.fa-magic
  260. | {{_ 'rules'}}
  261. li
  262. a.js-custom-fields
  263. i.fa.fa-list-alt
  264. | {{_ 'custom-fields'}}
  265. li
  266. a.js-open-archives
  267. i.fa.fa-archive
  268. | {{_ 'archived-items'}}
  269. if currentUser.isBoardAdmin
  270. li
  271. a.js-change-board-color
  272. i.fa.fa-paint-brush
  273. | {{_ 'board-change-color'}}
  274. //-
  275. XXX Language should be handled by sandstorm, but for now display a
  276. language selection link in the board menu. This link is normally present
  277. in the header bar that is not displayed on sandstorm.
  278. if isSandstorm
  279. li
  280. a.js-change-language
  281. i.fa.fa-flag
  282. | {{_ 'language'}}
  283. unless isSandstorm
  284. if currentUser.isBoardAdmin
  285. hr
  286. ul.pop-over-list
  287. li
  288. a(href="{{exportUrl}}", download="{{exportFilename}}")
  289. i.fa.fa-share-alt
  290. | {{_ 'export-board'}}
  291. li
  292. a.js-outgoing-webhooks
  293. i.fa.fa-globe
  294. | {{_ 'outgoing-webhooks'}}
  295. li
  296. a.js-card-settings
  297. i.fa.fa-id-card-o
  298. | {{_ 'card-settings'}}
  299. li
  300. a.js-subtask-settings
  301. i.fa.fa-sitemap
  302. | {{_ 'subtask-settings'}}
  303. unless currentBoard.isTemplatesBoard
  304. hr
  305. ul.pop-over-list
  306. li
  307. a.js-archive-board
  308. i.fa.fa-arrow-right
  309. i.fa.fa-archive
  310. | {{_ 'archive-board'}}
  311. if isSandstorm
  312. hr
  313. ul.pop-over-list
  314. li
  315. a(href="{{exportUrl}}", download="{{exportFilename}}")
  316. i.fa.fa-share-alt
  317. i.fa.fa-sign-out
  318. | {{_ 'export-board'}}
  319. li
  320. a.js-import-board
  321. i.fa.fa-share-alt
  322. i.fa.fa-sign-in
  323. | {{_ 'import-board-c'}}
  324. li
  325. a.js-archive-board
  326. i.fa.fa-arrow-right
  327. i.fa.fa-archive
  328. | {{_ 'archive-board'}}
  329. li
  330. a.js-outgoing-webhooks
  331. i.fa.fa-globe
  332. | {{_ 'outgoing-webhooks'}}
  333. hr
  334. ul.pop-over-list
  335. li
  336. a.js-card-settings
  337. i.fa.fa-id-card-o
  338. | {{_ 'card-settings'}}
  339. hr
  340. ul.pop-over-list
  341. li
  342. a.js-subtask-settings
  343. i.fa.fa-sitemap
  344. | {{_ 'subtask-settings'}}
  345. template(name="labelsWidget")
  346. .board-widget.board-widget-labels
  347. h3
  348. i.fa.fa-tags
  349. | {{_ 'labels'}}
  350. .board-widget-content
  351. each currentBoard.labels
  352. a.card-label(class="card-label-{{color}}"
  353. class="{{#if currentUser.isNotCommentOnly}}{{#if currentUser.isNotWorker}}js-label{{/if}}{{/if}}")
  354. span.card-label-name
  355. +viewer
  356. = name
  357. if currentUser.isBoardAdmin
  358. a.card-label.add-label.js-add-label
  359. i.fa.fa-plus
  360. template(name="memberPopup")
  361. .board-member-menu
  362. .miniprofile-header
  363. +userAvatar(userId=user._id showEdit=true)
  364. .info
  365. h3
  366. .js-profile= user.profile.fullname
  367. p.quiet @#{user.username}
  368. if isInvited
  369. p
  370. i.fa.fa-exclamation-circle
  371. | {{_ 'not-accepted-yet'}}
  372. ul.pop-over-list
  373. li
  374. a.js-filter-member {{_ 'filter-cards'}}
  375. if currentUser.isBoardAdmin
  376. li
  377. a.js-change-role
  378. | {{_ 'change-permissions'}}
  379. span.quiet (#{memberType})
  380. unless currentUser.isWorker
  381. li
  382. if $eq currentUser._id userId
  383. a.js-leave-member {{_ 'leave-board'}}
  384. else if currentUser.isBoardAdmin
  385. a.js-remove-member {{_ 'remove-from-board'}}
  386. template(name="removeMemberPopup")
  387. p {{_ 'remove-member-pop' name=user.profile.fullname username=user.username boardTitle=board.title}}
  388. button.js-confirm.negate.full(type="submit") {{_ 'remove-member'}}
  389. template(name="leaveBoardPopup")
  390. p {{_ 'leave-board-pop' boardTitle=board.title}}
  391. button.js-confirm.negate.full(type="submit") {{_ 'leave-board'}}
  392. template(name="addMemberPopup")
  393. .js-search-member
  394. +esInput(index="users")
  395. if loading.get
  396. +spinner
  397. else if error.get
  398. .warning {{_ error.get}}
  399. else
  400. ul.pop-over-list
  401. +esEach(index="users")
  402. li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
  403. a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
  404. +userAvatar(userId=_id esSearch=true)
  405. span.full-name
  406. = profile.fullname
  407. | (<span class="username">{{username}}</span>)
  408. if isBoardMember
  409. .quiet ({{_ 'joined'}})
  410. +ifEsIsSearching(index='users')
  411. +spinner
  412. +ifEsHasNoResults(index="users")
  413. .manage-member-section
  414. p.quiet {{_ 'no-results'}}
  415. button.js-email-invite.primary.full {{_ 'email-invite'}}
  416. template(name="changePermissionsPopup")
  417. ul.pop-over-list
  418. li
  419. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-admin{{/if}}")
  420. | {{_ 'admin'}}
  421. if isAdmin
  422. i.fa.fa-check
  423. span.sub-name {{_ 'admin-desc'}}
  424. li
  425. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-normal{{/if}}")
  426. | {{_ 'normal'}}
  427. if isNormal
  428. i.fa.fa-check
  429. span.sub-name {{_ 'normal-desc'}}
  430. li
  431. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}")
  432. | {{_ 'no-comments'}}
  433. if isNoComments
  434. i.fa.fa-check
  435. span.sub-name {{_ 'no-comments-desc'}}
  436. li
  437. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}")
  438. | {{_ 'comment-only'}}
  439. if isCommentOnly
  440. i.fa.fa-check
  441. span.sub-name {{_ 'comment-only-desc'}}
  442. li
  443. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-worker{{/if}}")
  444. | {{_ 'worker'}}
  445. if isWorker
  446. i.fa.fa-check
  447. span.sub-name {{_ 'worker-desc'}}
  448. if isLastAdmin
  449. hr
  450. p.quiet.bottom {{_ 'last-admin-desc'}}