sidebar.jade 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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. hr
  25. unless currentUser.isNoComments
  26. h3
  27. i.fa.fa-comments-o
  28. | {{_ 'activities'}}
  29. +activities(mode="board")
  30. template(name="membersWidget")
  31. .board-widget.board-widget-members
  32. h3
  33. i.fa.fa-user
  34. | {{_ 'members'}}
  35. a.board-header-btn.js-open-board-menu(title="{{_ 'boardMenuPopup-title'}}").right
  36. i.board-header-btn-icon.fa.fa-cog
  37. .board-widget-content
  38. each currentBoard.activeMembers
  39. +userAvatar(userId=this.userId showStatus=true)
  40. if isSandstorm
  41. if currentUser.isBoardMember
  42. a.member.add-member.sandstorm-powerbox-request-identity
  43. i.fa.fa-plus
  44. else if currentUser.isBoardAdmin
  45. a.member.add-member.js-manage-board-members
  46. i.fa.fa-plus
  47. .clearfix
  48. if isInvited
  49. hr
  50. p
  51. i.fa.fa-exclamation-circle
  52. | {{_ 'just-invited'}}
  53. button.js-member-invite-accept.primary {{_ 'accept'}}
  54. button.js-member-invite-decline {{_ 'decline'}}
  55. template(name="boardChangeVisibilityPopup")
  56. +boardVisibilityList
  57. template(name="boardChangeWatchPopup")
  58. ul.pop-over-list
  59. li
  60. with "watching"
  61. a.js-select-watch
  62. i.fa.fa-eye.colorful
  63. | {{_ 'watching'}}
  64. if watchCheck
  65. i.fa.fa-check
  66. span.sub-name {{_ 'watching-info'}}
  67. li
  68. with "tracking"
  69. a.js-select-watch
  70. i.fa.fa-bell.colorful
  71. | {{_ 'tracking'}}
  72. if watchCheck
  73. i.fa.fa-check
  74. span.sub-name {{_ 'tracking-info'}}
  75. li
  76. with "muted"
  77. a.js-select-watch
  78. i.fa.fa-bell-slash.colorful
  79. | {{_ 'muted'}}
  80. if watchCheck
  81. i.fa.fa-check
  82. span.sub-name {{_ 'muted-info'}}
  83. template(name="boardChangeColorPopup")
  84. .board-backgrounds-list.clearfix
  85. each backgroundColors
  86. .board-background-select.js-select-background
  87. span.background-box(class="board-color-{{this}}")
  88. if isSelected
  89. i.fa.fa-check
  90. template(name="boardSubtaskSettingsPopup")
  91. form.board-subtask-settings
  92. h3 {{_ 'show-parent-in-minicard'}}
  93. a#prefix-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  94. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  95. span {{_ 'prefix-with-full-path'}}
  96. a#prefix-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  97. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  98. span {{_ 'prefix-with-parent'}}
  99. a#subtext-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  100. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  101. span {{_ 'subtext-with-full-path'}}
  102. a#subtext-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  103. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  104. span {{_ 'subtext-with-parent'}}
  105. a#no-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  106. .materialCheckBox(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  107. span {{_ 'no-parent'}}
  108. div
  109. hr
  110. div.check-div
  111. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  112. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  113. span {{_ 'show-subtasks-field'}}
  114. label
  115. | {{_ 'deposit-subtasks-board'}}
  116. select.js-field-deposit-board(disabled="{{#unless allowsSubtasks}}disabled{{/unless}}")
  117. each boards
  118. if isBoardSelected
  119. option(value=_id selected="selected") {{title}}
  120. else
  121. option(value=_id) {{title}}
  122. if isNullBoardSelected
  123. option(value='null' selected="selected") {{_ 'custom-field-dropdown-none'}}
  124. else
  125. option(value='null') {{_ 'custom-field-dropdown-none'}}
  126. div
  127. hr
  128. label
  129. | {{_ 'deposit-subtasks-list'}}
  130. select.js-field-deposit-list(disabled="{{#unless hasLists}}disabled{{/unless}}")
  131. each lists
  132. if isListSelected
  133. option(value=_id selected="selected") {{title}}
  134. else
  135. option(value=_id) {{title}}
  136. template(name="chooseBoardSource")
  137. ul.pop-over-list
  138. li
  139. a(href="{{pathFor '/import/trello'}}") {{_ 'from-trello'}}
  140. li
  141. a(href="{{pathFor '/import/wekan'}}") {{_ 'from-wekan'}}
  142. template(name="archiveBoardPopup")
  143. p {{_ 'close-board-pop'}}
  144. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
  145. template(name="outgoingWebhooksPopup")
  146. each integrations
  147. form.integration-form
  148. if title
  149. h4 {{title}}
  150. else
  151. h4 {{_ 'no-name'}}
  152. label
  153. | URL
  154. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  155. input(type="hidden" value=_id name="id")
  156. input.primary.wide(type="submit" value="{{_ 'save'}}")
  157. form.integration-form
  158. h4
  159. | {{_ 'new-outgoing-webhook'}}
  160. label
  161. | URL
  162. input.js-outgoing-webhooks-url(type="text" name="url" autofocus)
  163. input.primary.wide(type="submit" value="{{_ 'save'}}")
  164. template(name="boardMenuPopup")
  165. ul.pop-over-list
  166. li: a.js-custom-fields {{_ 'custom-fields'}}
  167. li: a.js-open-archives {{_ 'archived-items'}}
  168. if currentUser.isBoardAdmin
  169. li: a.js-change-board-color {{_ 'board-change-color'}}
  170. //-
  171. XXX Language should be handled by sandstorm, but for now display a
  172. language selection link in the board menu. This link is normally present
  173. in the header bar that is not displayed on sandstorm.
  174. if isSandstorm
  175. li: a.js-change-language {{_ 'language'}}
  176. unless isSandstorm
  177. if currentUser.isBoardAdmin
  178. hr
  179. ul.pop-over-list
  180. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  181. unless currentBoard.isTemplatesBoard
  182. li: a.js-archive-board {{_ 'archive-board'}}
  183. li: a.js-outgoing-webhooks {{_ 'outgoing-webhooks'}}
  184. hr
  185. ul.pop-over-list
  186. li: a.js-subtask-settings {{_ 'subtask-settings'}}
  187. if isSandstorm
  188. hr
  189. ul.pop-over-list
  190. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  191. li: a.js-import-board {{_ 'import-board-c'}}
  192. li: a.js-archive-board {{_ 'archive-board'}}
  193. li: a.js-outgoing-webhooks {{_ 'outgoing-webhooks'}}
  194. hr
  195. ul.pop-over-list
  196. li: a.js-subtask-settings {{_ 'subtask-settings'}}
  197. template(name="labelsWidget")
  198. .board-widget.board-widget-labels
  199. h3
  200. i.fa.fa-tags
  201. | {{_ 'labels'}}
  202. .board-widget-content
  203. each currentBoard.labels
  204. a.card-label(class="card-label-{{color}}"
  205. class="{{#if currentUser.isNotCommentOnly}}js-label{{/if}}")
  206. span.card-label-name= name
  207. if currentUser.isBoardAdmin
  208. a.card-label.add-label.js-add-label
  209. i.fa.fa-plus
  210. template(name="memberPopup")
  211. .board-member-menu
  212. .miniprofile-header
  213. +userAvatar(userId=user._id showEdit=true)
  214. .info
  215. h3
  216. .js-profile= user.profile.fullname
  217. p.quiet @#{user.username}
  218. if isInvited
  219. p
  220. i.fa.fa-exclamation-circle
  221. | {{_ 'not-accepted-yet'}}
  222. ul.pop-over-list
  223. li
  224. a.js-filter-member {{_ 'filter-cards'}}
  225. if currentUser.isBoardAdmin
  226. li
  227. a.js-change-role
  228. | {{_ 'change-permissions'}}
  229. span.quiet (#{memberType})
  230. li
  231. if $eq currentUser._id userId
  232. a.js-leave-member {{_ 'leave-board'}}
  233. else if currentUser.isBoardAdmin
  234. a.js-remove-member {{_ 'remove-from-board'}}
  235. template(name="removeMemberPopup")
  236. p {{_ 'remove-member-pop' name=user.profile.fullname username=user.username boardTitle=board.title}}
  237. button.js-confirm.negate.full(type="submit") {{_ 'remove-member'}}
  238. template(name="leaveBoardPopup")
  239. p {{_ 'leave-board-pop' boardTitle=board.title}}
  240. button.js-confirm.negate.full(type="submit") {{_ 'leave-board'}}
  241. template(name="addMemberPopup")
  242. .js-search-member
  243. +esInput(index="users")
  244. if loading.get
  245. +spinner
  246. else if error.get
  247. .warning {{_ error.get}}
  248. else
  249. ul.pop-over-list
  250. +esEach(index="users")
  251. li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
  252. a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
  253. +userAvatar(userId=_id esSearch=true)
  254. span.full-name
  255. = profile.fullname
  256. | (<span class="username">{{username}}</span>)
  257. if isBoardMember
  258. .quiet ({{_ 'joined'}})
  259. +ifEsIsSearching(index='users')
  260. +spinner
  261. +ifEsHasNoResults(index="users")
  262. .manage-member-section
  263. p.quiet {{_ 'no-results'}}
  264. button.js-email-invite.primary.full {{_ 'email-invite'}}
  265. template(name="changePermissionsPopup")
  266. ul.pop-over-list
  267. li
  268. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-admin{{/if}}")
  269. | {{_ 'admin'}}
  270. if isAdmin
  271. i.fa.fa-check
  272. span.sub-name {{_ 'admin-desc'}}
  273. li
  274. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-normal{{/if}}")
  275. | {{_ 'normal'}}
  276. if isNormal
  277. i.fa.fa-check
  278. span.sub-name {{_ 'normal-desc'}}
  279. li
  280. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}")
  281. | {{_ 'no-comments'}}
  282. if isNoComments
  283. i.fa.fa-check
  284. span.sub-name {{_ 'no-comments-desc'}}
  285. li
  286. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}")
  287. | {{_ 'comment-only'}}
  288. if isCommentOnly
  289. i.fa.fa-check
  290. span.sub-name {{_ 'comment-only-desc'}}
  291. if isLastAdmin
  292. hr
  293. p.quiet.bottom {{_ 'last-admin-desc'}}