sidebar.jade 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  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. if withApi
  288. li
  289. a(href="{{exportUrl}}", download="{{exportFilename}}")
  290. i.fa.fa-share-alt
  291. | {{_ 'export-board'}}
  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. hr
  306. ul.pop-over-list
  307. li
  308. a.js-archive-board
  309. i.fa.fa-arrow-right
  310. i.fa.fa-archive
  311. | {{_ 'archive-board'}}
  312. if isSandstorm
  313. hr
  314. ul.pop-over-list
  315. if withApi
  316. li
  317. a(href="{{exportUrl}}", download="{{exportFilename}}")
  318. i.fa.fa-share-alt
  319. i.fa.fa-sign-out
  320. | {{_ 'export-board'}}
  321. li
  322. a.js-import-board
  323. i.fa.fa-share-alt
  324. i.fa.fa-sign-in
  325. | {{_ 'import-board-c'}}
  326. li
  327. a.js-archive-board
  328. i.fa.fa-arrow-right
  329. i.fa.fa-archive
  330. | {{_ 'archive-board'}}
  331. li
  332. a.js-outgoing-webhooks
  333. i.fa.fa-globe
  334. | {{_ 'outgoing-webhooks'}}
  335. hr
  336. ul.pop-over-list
  337. li
  338. a.js-card-settings
  339. i.fa.fa-id-card-o
  340. | {{_ 'card-settings'}}
  341. hr
  342. ul.pop-over-list
  343. li
  344. a.js-subtask-settings
  345. i.fa.fa-sitemap
  346. | {{_ 'subtask-settings'}}
  347. template(name="labelsWidget")
  348. .board-widget.board-widget-labels
  349. h3
  350. i.fa.fa-tags
  351. | {{_ 'labels'}}
  352. .board-widget-content
  353. each currentBoard.labels
  354. a.card-label(class="card-label-{{color}}"
  355. class="{{#if currentUser.isNotCommentOnly}}{{#if currentUser.isNotWorker}}js-label{{/if}}{{/if}}")
  356. span.card-label-name
  357. +viewer
  358. = name
  359. if currentUser.isBoardAdmin
  360. a.card-label.add-label.js-add-label
  361. i.fa.fa-plus
  362. template(name="memberPopup")
  363. .board-member-menu
  364. .miniprofile-header
  365. +userAvatar(userId=user._id showEdit=true)
  366. .info
  367. h3
  368. .js-profile= user.profile.fullname
  369. p.quiet @#{user.username}
  370. if isInvited
  371. p
  372. i.fa.fa-exclamation-circle
  373. | {{_ 'not-accepted-yet'}}
  374. ul.pop-over-list
  375. li
  376. a.js-filter-member {{_ 'filter-cards'}}
  377. if currentUser.isBoardAdmin
  378. li
  379. a.js-change-role
  380. | {{_ 'change-permissions'}}
  381. span.quiet (#{memberType})
  382. unless currentUser.isWorker
  383. li
  384. if $eq currentUser._id userId
  385. a.js-leave-member {{_ 'leave-board'}}
  386. else if currentUser.isBoardAdmin
  387. a.js-remove-member {{_ 'remove-from-board'}}
  388. template(name="removeMemberPopup")
  389. p {{_ 'remove-member-pop' name=user.profile.fullname username=user.username boardTitle=board.title}}
  390. button.js-confirm.negate.full(type="submit") {{_ 'remove-member'}}
  391. template(name="leaveBoardPopup")
  392. p {{_ 'leave-board-pop' boardTitle=board.title}}
  393. button.js-confirm.negate.full(type="submit") {{_ 'leave-board'}}
  394. template(name="addMemberPopup")
  395. .js-search-member
  396. +esInput(index="users")
  397. if loading.get
  398. +spinner
  399. else if error.get
  400. .warning {{_ error.get}}
  401. else
  402. ul.pop-over-list
  403. +esEach(index="users")
  404. li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
  405. a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
  406. +userAvatar(userId=_id esSearch=true)
  407. span.full-name
  408. = profile.fullname
  409. | (<span class="username">{{username}}</span>)
  410. if isBoardMember
  411. .quiet ({{_ 'joined'}})
  412. +ifEsIsSearching(index='users')
  413. +spinner
  414. +ifEsHasNoResults(index="users")
  415. .manage-member-section
  416. p.quiet {{_ 'no-results'}}
  417. button.js-email-invite.primary.full {{_ 'email-invite'}}
  418. template(name="changePermissionsPopup")
  419. ul.pop-over-list
  420. li
  421. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-admin{{/if}}")
  422. | {{_ 'admin'}}
  423. if isAdmin
  424. i.fa.fa-check
  425. span.sub-name {{_ 'admin-desc'}}
  426. li
  427. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-normal{{/if}}")
  428. | {{_ 'normal'}}
  429. if isNormal
  430. i.fa.fa-check
  431. span.sub-name {{_ 'normal-desc'}}
  432. li
  433. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}")
  434. | {{_ 'no-comments'}}
  435. if isNoComments
  436. i.fa.fa-check
  437. span.sub-name {{_ 'no-comments-desc'}}
  438. li
  439. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}")
  440. | {{_ 'comment-only'}}
  441. if isCommentOnly
  442. i.fa.fa-check
  443. span.sub-name {{_ 'comment-only-desc'}}
  444. li
  445. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-worker{{/if}}")
  446. | {{_ 'worker'}}
  447. if isWorker
  448. i.fa.fa-check
  449. span.sub-name {{_ 'worker-desc'}}
  450. if isLastAdmin
  451. hr
  452. p.quiet.bottom {{_ 'last-admin-desc'}}