boardHeader.jade 7.7 KB

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