boardHeader.jade 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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-search-view(title="{{_ 'search'}}")
  81. i.fa.fa-search
  82. span {{_ 'search'}}
  83. a.board-header-btn.js-toggle-board-view(
  84. title="{{_ 'board-view'}}")
  85. i.fa.fa-th-large
  86. span {{_ currentUser.profile.boardView}}
  87. if canModifyBoard
  88. a.board-header-btn.js-multiselection-activate(
  89. title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
  90. class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
  91. i.fa.fa-check-square-o
  92. span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
  93. if MultiSelection.isActive
  94. a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
  95. i.fa.fa-times-thin
  96. .separator
  97. a.board-header-btn.js-open-board-menu(title="{{_ 'boardMenuPopup-title'}}")
  98. i.board-header-btn-icon.fa.fa-navicon
  99. template(name="boardMenuPopup")
  100. ul.pop-over-list
  101. li: a.js-custom-fields {{_ 'custom-fields'}}
  102. li: a.js-open-archives {{_ 'archived-items'}}
  103. if currentUser.isBoardAdmin
  104. li: a.js-change-board-color {{_ 'board-change-color'}}
  105. //-
  106. XXX Language should be handled by sandstorm, but for now display a
  107. language selection link in the board menu. This link is normally present
  108. in the header bar that is not displayed on sandstorm.
  109. if isSandstorm
  110. li: a.js-change-language {{_ 'language'}}
  111. unless isSandstorm
  112. if currentUser.isBoardAdmin
  113. hr
  114. ul.pop-over-list
  115. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  116. li: a.js-archive-board {{_ 'archive-board'}}
  117. li: a.js-delete-board {{_ 'delete-board'}}
  118. li: a.js-outgoing-webhooks {{_ 'outgoing-webhooks'}}
  119. if isSandstorm
  120. hr
  121. ul.pop-over-list
  122. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  123. li: a.js-import-board {{_ 'import-board-c'}}
  124. template(name="boardVisibilityList")
  125. ul.pop-over-list
  126. li
  127. with "private"
  128. a.js-select-visibility
  129. i.fa.fa-lock.colorful
  130. | {{_ 'private'}}
  131. if visibilityCheck
  132. i.fa.fa-check
  133. span.sub-name {{_ 'private-desc'}}
  134. li
  135. with "public"
  136. a.js-select-visibility
  137. i.fa.fa-globe.colorful
  138. | {{_ 'public'}}
  139. if visibilityCheck
  140. i.fa.fa-check
  141. span.sub-name {{_ 'public-desc'}}
  142. template(name="boardChangeVisibilityPopup")
  143. +boardVisibilityList
  144. template(name="boardChangeWatchPopup")
  145. ul.pop-over-list
  146. li
  147. with "watching"
  148. a.js-select-watch
  149. i.fa.fa-eye.colorful
  150. | {{_ 'watching'}}
  151. if watchCheck
  152. i.fa.fa-check
  153. span.sub-name {{_ 'watching-info'}}
  154. li
  155. with "tracking"
  156. a.js-select-watch
  157. i.fa.fa-bell.colorful
  158. | {{_ 'tracking'}}
  159. if watchCheck
  160. i.fa.fa-check
  161. span.sub-name {{_ 'tracking-info'}}
  162. li
  163. with "muted"
  164. a.js-select-watch
  165. i.fa.fa-bell-slash.colorful
  166. | {{_ 'muted'}}
  167. if watchCheck
  168. i.fa.fa-check
  169. span.sub-name {{_ 'muted-info'}}
  170. template(name="boardChangeColorPopup")
  171. .board-backgrounds-list.clearfix
  172. each backgroundColors
  173. .board-background-select.js-select-background
  174. span.background-box(class="board-color-{{this}}")
  175. if isSelected
  176. i.fa.fa-check
  177. template(name="createBoard")
  178. form
  179. label
  180. | {{_ 'title'}}
  181. input.js-new-board-title(type="text" placeholder="{{_ 'bucket-example'}}" autofocus required)
  182. if visibilityMenuIsOpen.get
  183. +boardVisibilityList
  184. else
  185. p.quiet
  186. if $eq visibility.get 'public'
  187. span.fa.fa-globe.colorful
  188. = " "
  189. | {{{_ 'board-public-info'}}}
  190. else
  191. span.fa.fa-lock.colorful
  192. = " "
  193. | {{{_ 'board-private-info'}}}
  194. a.js-change-visibility {{_ 'change'}}.
  195. input.primary.wide(type="submit" value="{{_ 'create'}}")
  196. span.quiet
  197. | {{_ 'or'}}
  198. a.js-import-board {{_ 'import-board'}}
  199. template(name="chooseBoardSource")
  200. ul.pop-over-list
  201. li
  202. a(href="{{pathFor '/import/trello'}}") {{_ 'from-trello'}}
  203. li
  204. a(href="{{pathFor '/import/wekan'}}") {{_ 'from-wekan'}}
  205. template(name="boardChangeTitlePopup")
  206. form
  207. label
  208. | {{_ 'title'}}
  209. input.js-board-name(type="text" value=title autofocus)
  210. label
  211. | {{_ 'description'}}
  212. textarea.js-board-desc= description
  213. input.primary.wide(type="submit" value="{{_ 'rename'}}")
  214. template(name="archiveBoardPopup")
  215. p {{_ 'close-board-pop'}}
  216. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
  217. template(name="deleteBoardPopup")
  218. p {{_ 'delete-board-pop'}}
  219. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  220. template(name="outgoingWebhooksPopup")
  221. each integrations
  222. form.integration-form
  223. if title
  224. h4 {{title}}
  225. else
  226. h4 {{_ 'no-name'}}
  227. label
  228. | URL
  229. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  230. input(type="hidden" value=_id name="id")
  231. input.primary.wide(type="submit" value="{{_ 'save'}}")
  232. form.integration-form
  233. h4
  234. | {{_ 'new-outgoing-webhook'}}
  235. label
  236. | URL
  237. input.js-outgoing-webhooks-url(type="text" name="url" autofocus)
  238. input.primary.wide(type="submit" value="{{_ 'save'}}")