boardHeader.jade 12 KB

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