boardHeader.jade 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. template(name="boardHeaderBar")
  2. h1.header-board-menu
  3. with currentBoard
  4. a(class="{{#if currentUser.isBoardAdmin}}js-edit-board-title{{else}}is-disabled{{/if}}")
  5. +viewer
  6. = title
  7. .board-header-btns.left
  8. unless isMiniScreen
  9. if currentBoard
  10. if currentUser
  11. a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
  12. title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
  13. i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
  14. if showStarCounter
  15. span
  16. = currentBoard.stars
  17. a.board-header-btn(
  18. class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
  19. title="{{_ currentBoard.permission}}")
  20. i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
  21. span {{_ currentBoard.permission}}
  22. a.board-header-btn.js-watch-board(
  23. title="{{_ watchLevel }}")
  24. if $eq watchLevel "watching"
  25. i.fa.fa-eye
  26. if $eq watchLevel "tracking"
  27. i.fa.fa-bell
  28. if $eq watchLevel "muted"
  29. i.fa.fa-bell-slash
  30. span {{_ watchLevel}}
  31. else
  32. a.board-header-btn.js-log-in(
  33. title="{{_ 'log-in'}}")
  34. i.fa.fa-sign-in
  35. span {{_ 'log-in'}}
  36. .board-header-btns.right
  37. if currentBoard
  38. if isMiniScreen
  39. if currentUser
  40. a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
  41. title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
  42. i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
  43. if showStarCounter
  44. span
  45. = currentBoard.stars
  46. a.board-header-btn(
  47. class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
  48. title="{{_ currentBoard.permission}}")
  49. i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
  50. span {{_ currentBoard.permission}}
  51. a.board-header-btn.js-watch-board(
  52. title="{{_ watchLevel }}")
  53. if $eq watchLevel "watching"
  54. i.fa.fa-eye
  55. if $eq watchLevel "tracking"
  56. i.fa.fa-bell
  57. if $eq watchLevel "muted"
  58. i.fa.fa-bell-slash
  59. span {{_ watchLevel}}
  60. else
  61. a.board-header-btn.js-log-in(
  62. title="{{_ 'log-in'}}")
  63. i.fa.fa-sign-in
  64. span {{_ 'log-in'}}
  65. if isSandstorm
  66. if currentUser
  67. a.board-header-btn.js-open-archived-board
  68. i.fa.fa-archive
  69. span {{_ 'archives'}}
  70. a.board-header-btn.js-open-filter-view(
  71. title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
  72. class="{{#if Filter.isActive}}emphasis{{/if}}")
  73. i.fa.fa-filter
  74. span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
  75. if Filter.isActive
  76. a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
  77. i.fa.fa-times-thin
  78. if currentUser.isAdmin
  79. a.board-header-btn.js-open-rules-view(title="{{_ 'rules'}}")
  80. i.fa.fa-magic
  81. span {{_ 'rules'}}
  82. a.board-header-btn.js-open-search-view(title="{{_ 'search'}}")
  83. i.fa.fa-search
  84. span {{_ 'search'}}
  85. unless currentBoard.isTemplatesBoard
  86. a.board-header-btn.js-toggle-board-view(
  87. title="{{_ 'board-view'}}")
  88. i.fa.fa-th-large
  89. span {{_ currentUser.profile.boardView}}
  90. if canModifyBoard
  91. a.board-header-btn.js-multiselection-activate(
  92. title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
  93. class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
  94. i.fa.fa-check-square-o
  95. span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
  96. if MultiSelection.isActive
  97. a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
  98. i.fa.fa-times-thin
  99. .separator
  100. a.board-header-btn.js-open-board-menu(title="{{_ 'boardMenuPopup-title'}}")
  101. i.board-header-btn-icon.fa.fa-navicon
  102. template(name="boardMenuPopup")
  103. ul.pop-over-list
  104. li: a.js-custom-fields {{_ 'custom-fields'}}
  105. li: a.js-open-archives {{_ 'archived-items'}}
  106. if currentUser.isBoardAdmin
  107. li: a.js-change-board-color {{_ 'board-change-color'}}
  108. //-
  109. XXX Language should be handled by sandstorm, but for now display a
  110. language selection link in the board menu. This link is normally present
  111. in the header bar that is not displayed on sandstorm.
  112. if isSandstorm
  113. li: a.js-change-language {{_ 'language'}}
  114. unless isSandstorm
  115. if currentUser.isBoardAdmin
  116. hr
  117. ul.pop-over-list
  118. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  119. unless currentBoard.isTemplatesBoard
  120. li: a.js-archive-board {{_ 'archive-board'}}
  121. li: a.js-outgoing-webhooks {{_ 'outgoing-webhooks'}}
  122. hr
  123. ul.pop-over-list
  124. li: a.js-subtask-settings {{_ 'subtask-settings'}}
  125. if isSandstorm
  126. hr
  127. ul.pop-over-list
  128. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  129. li: a.js-import-board {{_ 'import-board-c'}}
  130. li: a.js-archive-board {{_ 'archive-board'}}
  131. li: a.js-outgoing-webhooks {{_ 'outgoing-webhooks'}}
  132. hr
  133. ul.pop-over-list
  134. li: a.js-subtask-settings {{_ 'subtask-settings'}}
  135. template(name="boardVisibilityList")
  136. ul.pop-over-list
  137. li
  138. with "private"
  139. a.js-select-visibility
  140. i.fa.fa-lock.colorful
  141. | {{_ 'private'}}
  142. if visibilityCheck
  143. i.fa.fa-check
  144. span.sub-name {{_ 'private-desc'}}
  145. li
  146. with "public"
  147. a.js-select-visibility
  148. i.fa.fa-globe.colorful
  149. | {{_ 'public'}}
  150. if visibilityCheck
  151. i.fa.fa-check
  152. span.sub-name {{_ 'public-desc'}}
  153. template(name="boardChangeVisibilityPopup")
  154. +boardVisibilityList
  155. template(name="boardChangeWatchPopup")
  156. ul.pop-over-list
  157. li
  158. with "watching"
  159. a.js-select-watch
  160. i.fa.fa-eye.colorful
  161. | {{_ 'watching'}}
  162. if watchCheck
  163. i.fa.fa-check
  164. span.sub-name {{_ 'watching-info'}}
  165. li
  166. with "tracking"
  167. a.js-select-watch
  168. i.fa.fa-bell.colorful
  169. | {{_ 'tracking'}}
  170. if watchCheck
  171. i.fa.fa-check
  172. span.sub-name {{_ 'tracking-info'}}
  173. li
  174. with "muted"
  175. a.js-select-watch
  176. i.fa.fa-bell-slash.colorful
  177. | {{_ 'muted'}}
  178. if watchCheck
  179. i.fa.fa-check
  180. span.sub-name {{_ 'muted-info'}}
  181. template(name="boardChangeColorPopup")
  182. .board-backgrounds-list.clearfix
  183. each backgroundColors
  184. .board-background-select.js-select-background
  185. span.background-box(class="board-color-{{this}}")
  186. if isSelected
  187. i.fa.fa-check
  188. template(name="boardSubtaskSettingsPopup")
  189. form.board-subtask-settings
  190. h3 {{_ 'show-parent-in-minicard'}}
  191. a#prefix-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  192. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-full-path'}}is-checked{{/if}}")
  193. span {{_ 'prefix-with-full-path'}}
  194. a#prefix-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  195. .materialCheckBox(class="{{#if $eq presentParentTask 'prefix-with-parent'}}is-checked{{/if}}")
  196. span {{_ 'prefix-with-parent'}}
  197. a#subtext-with-full-path.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  198. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-full-path'}}is-checked{{/if}}")
  199. span {{_ 'subtext-with-full-path'}}
  200. a#subtext-with-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  201. .materialCheckBox(class="{{#if $eq presentParentTask 'subtext-with-parent'}}is-checked{{/if}}")
  202. span {{_ 'subtext-with-parent'}}
  203. a#no-parent.flex.js-field-show-parent-in-minicard(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  204. .materialCheckBox(class="{{#if $eq presentParentTask 'no-parent'}}is-checked{{/if}}")
  205. span {{_ 'no-parent'}}
  206. div
  207. hr
  208. div.check-div
  209. a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  210. .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}")
  211. span {{_ 'show-subtasks-field'}}
  212. label
  213. | {{_ 'deposit-subtasks-board'}}
  214. select.js-field-deposit-board(disabled="{{#unless allowsSubtasks}}disabled{{/unless}}")
  215. each boards
  216. if isBoardSelected
  217. option(value=_id selected="selected") {{title}}
  218. else
  219. option(value=_id) {{title}}
  220. if isNullBoardSelected
  221. option(value='null' selected="selected") {{_ 'custom-field-dropdown-none'}}
  222. else
  223. option(value='null') {{_ 'custom-field-dropdown-none'}}
  224. div
  225. hr
  226. label
  227. | {{_ 'deposit-subtasks-list'}}
  228. select.js-field-deposit-list(disabled="{{#unless hasLists}}disabled{{/unless}}")
  229. each lists
  230. if isListSelected
  231. option(value=_id selected="selected") {{title}}
  232. else
  233. option(value=_id) {{title}}
  234. template(name="createBoard")
  235. form
  236. label
  237. | {{_ 'title'}}
  238. input.js-new-board-title(type="text" placeholder="{{_ 'bucket-example'}}" autofocus required)
  239. if visibilityMenuIsOpen.get
  240. +boardVisibilityList
  241. else
  242. p.quiet
  243. if $eq visibility.get 'public'
  244. span.fa.fa-globe.colorful
  245. = " "
  246. | {{{_ 'board-public-info'}}}
  247. else
  248. span.fa.fa-lock.colorful
  249. = " "
  250. | {{{_ 'board-private-info'}}}
  251. a.js-change-visibility {{_ 'change'}}.
  252. input.primary.wide(type="submit" value="{{_ 'create'}}")
  253. span.quiet
  254. | {{_ 'or'}}
  255. a.js-import-board {{_ 'import'}}
  256. span.quiet
  257. | /
  258. a.js-board-template {{_ 'template'}}
  259. template(name="chooseBoardSource")
  260. ul.pop-over-list
  261. li
  262. a(href="{{pathFor '/import/trello'}}") {{_ 'from-trello'}}
  263. li
  264. a(href="{{pathFor '/import/wekan'}}") {{_ 'from-wekan'}}
  265. template(name="boardChangeTitlePopup")
  266. form
  267. label
  268. | {{_ 'title'}}
  269. input.js-board-name(type="text" value=title autofocus)
  270. label
  271. | {{_ 'description'}}
  272. textarea.js-board-desc= description
  273. input.primary.wide(type="submit" value="{{_ 'rename'}}")
  274. template(name="boardCreateRulePopup")
  275. p {{_ 'close-board-pop'}}
  276. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
  277. template(name="archiveBoardPopup")
  278. p {{_ 'close-board-pop'}}
  279. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
  280. template(name="outgoingWebhooksPopup")
  281. each integrations
  282. form.integration-form
  283. if title
  284. h4 {{title}}
  285. else
  286. h4 {{_ 'no-name'}}
  287. label
  288. | URL
  289. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  290. input(type="hidden" value=_id name="id")
  291. input.primary.wide(type="submit" value="{{_ 'save'}}")
  292. form.integration-form
  293. h4
  294. | {{_ 'new-outgoing-webhook'}}
  295. label
  296. | URL
  297. input.js-outgoing-webhooks-url(type="text" name="url" autofocus)
  298. input.primary.wide(type="submit" value="{{_ 'save'}}")