boardHeader.jade 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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. = title
  6. .board-header-btns.left
  7. unless isMiniScreen
  8. unless isSandstorm
  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. unless isSandstorm
  40. if currentUser
  41. a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
  42. title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
  43. i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
  44. if showStarCounter
  45. span
  46. = currentBoard.stars
  47. a.board-header-btn(
  48. class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
  49. title="{{_ currentBoard.permission}}")
  50. i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
  51. span {{_ currentBoard.permission}}
  52. a.board-header-btn.js-watch-board(
  53. title="{{_ watchLevel }}")
  54. if $eq watchLevel "watching"
  55. i.fa.fa-eye
  56. if $eq watchLevel "tracking"
  57. i.fa.fa-bell
  58. if $eq watchLevel "muted"
  59. i.fa.fa-bell-slash
  60. span {{_ watchLevel}}
  61. else
  62. a.board-header-btn.js-log-in(
  63. title="{{_ 'log-in'}}")
  64. i.fa.fa-sign-in
  65. span {{_ 'log-in'}}
  66. if isSandstorm
  67. if currentUser
  68. a.board-header-btn.js-open-archived-board
  69. i.fa.fa-archive
  70. span {{_ 'archives'}}
  71. a.board-header-btn.js-open-filter-view(
  72. title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
  73. class="{{#if Filter.isActive}}emphasis{{/if}}")
  74. i.fa.fa-filter
  75. span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
  76. if Filter.isActive
  77. a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
  78. i.fa.fa-times-thin
  79. if canModifyBoard
  80. a.board-header-btn.js-multiselection-activate(
  81. title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
  82. class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
  83. i.fa.fa-check-square-o
  84. span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
  85. if MultiSelection.isActive
  86. a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
  87. i.fa.fa-times-thin
  88. .separator
  89. a.board-header-btn.js-open-board-menu(title="{{_ 'boardMenuPopup-title'}}")
  90. i.board-header-btn-icon.fa.fa-navicon
  91. template(name="boardMenuPopup")
  92. ul.pop-over-list
  93. li: a.js-custom-fields {{_ 'custom-fields'}}
  94. li: a.js-open-archives {{_ 'archived-items'}}
  95. if currentUser.isBoardAdmin
  96. li: a.js-change-board-color {{_ 'board-change-color'}}
  97. //-
  98. XXX Language should be handled by sandstorm, but for now display a
  99. language selection link in the board menu. This link is normally present
  100. in the header bar that is not displayed on sandstorm.
  101. if isSandstorm
  102. li: a.js-change-language {{_ 'language'}}
  103. unless isSandstorm
  104. if currentUser.isBoardAdmin
  105. hr
  106. ul.pop-over-list
  107. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  108. li: a.js-archive-board {{_ 'archive-board'}}
  109. li: a.js-outgoing-webhooks {{_ 'outgoing-webhooks'}}
  110. if isSandstorm
  111. hr
  112. ul.pop-over-list
  113. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  114. li: a.js-import-board {{_ 'import-board-c'}}
  115. template(name="boardVisibilityList")
  116. ul.pop-over-list
  117. li
  118. with "private"
  119. a.js-select-visibility
  120. i.fa.fa-lock.colorful
  121. | {{_ 'private'}}
  122. if visibilityCheck
  123. i.fa.fa-check
  124. span.sub-name {{_ 'private-desc'}}
  125. li
  126. with "public"
  127. a.js-select-visibility
  128. i.fa.fa-globe.colorful
  129. | {{_ 'public'}}
  130. if visibilityCheck
  131. i.fa.fa-check
  132. span.sub-name {{_ 'public-desc'}}
  133. template(name="boardChangeVisibilityPopup")
  134. +boardVisibilityList
  135. template(name="boardChangeWatchPopup")
  136. ul.pop-over-list
  137. li
  138. with "watching"
  139. a.js-select-watch
  140. i.fa.fa-eye.colorful
  141. | {{_ 'watching'}}
  142. if watchCheck
  143. i.fa.fa-check
  144. span.sub-name {{_ 'watching-info'}}
  145. li
  146. with "tracking"
  147. a.js-select-watch
  148. i.fa.fa-bell.colorful
  149. | {{_ 'tracking'}}
  150. if watchCheck
  151. i.fa.fa-check
  152. span.sub-name {{_ 'tracking-info'}}
  153. li
  154. with "muted"
  155. a.js-select-watch
  156. i.fa.fa-bell-slash.colorful
  157. | {{_ 'muted'}}
  158. if watchCheck
  159. i.fa.fa-check
  160. span.sub-name {{_ 'muted-info'}}
  161. template(name="boardChangeColorPopup")
  162. .board-backgrounds-list.clearfix
  163. each backgroundColors
  164. .board-background-select.js-select-background
  165. span.background-box(class="board-color-{{this}}")
  166. if isSelected
  167. i.fa.fa-check
  168. template(name="createBoard")
  169. form
  170. label
  171. | {{_ 'title'}}
  172. input.js-new-board-title(type="text" placeholder="{{_ 'bucket-example'}}" autofocus required)
  173. if visibilityMenuIsOpen.get
  174. +boardVisibilityList
  175. else
  176. p.quiet
  177. if $eq visibility.get 'public'
  178. span.fa.fa-globe.colorful
  179. = " "
  180. | {{{_ 'board-public-info'}}}
  181. else
  182. span.fa.fa-lock.colorful
  183. = " "
  184. | {{{_ 'board-private-info'}}}
  185. a.js-change-visibility {{_ 'change'}}.
  186. input.primary.wide(type="submit" value="{{_ 'create'}}")
  187. span.quiet
  188. | {{_ 'or'}}
  189. a.js-import-board {{_ 'import-board'}}
  190. template(name="chooseBoardSource")
  191. ul.pop-over-list
  192. li
  193. a(href="{{pathFor '/import/trello'}}") {{_ 'from-trello'}}
  194. li
  195. a(href="{{pathFor '/import/wekan'}}") {{_ 'from-wekan'}}
  196. template(name="boardChangeTitlePopup")
  197. form
  198. label
  199. | {{_ 'title'}}
  200. input.js-board-name(type="text" value=title autofocus)
  201. label
  202. | {{_ 'description'}}
  203. textarea.js-board-desc= description
  204. input.primary.wide(type="submit" value="{{_ 'rename'}}")
  205. template(name="archiveBoardPopup")
  206. p {{_ 'close-board-pop'}}
  207. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
  208. template(name="outgoingWebhooksPopup")
  209. each integrations
  210. form.integration-form
  211. if title
  212. h4 {{title}}
  213. else
  214. h4 {{_ 'no-name'}}
  215. label
  216. | URL
  217. input.js-outgoing-webhooks-url(type="text" name="url" value=url)
  218. input(type="hidden" value=_id name="id")
  219. input.primary.wide(type="submit" value="{{_ 'save'}}")
  220. form.integration-form
  221. h4
  222. | {{_ 'new-outgoing-webhook'}}
  223. label
  224. | URL
  225. input.js-outgoing-webhooks-url(type="text" name="url" autofocus)
  226. input.primary.wide(type="submit" value="{{_ 'save'}}")