boardHeader.jade 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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 currentUser
  10. a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
  11. title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
  12. i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
  13. if showStarCounter
  14. span
  15. = currentBoard.stars
  16. a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}")
  17. i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
  18. span {{_ currentBoard.permission}}
  19. if currentUser
  20. a.board-header-btn.js-watch-board
  21. if $eq watchLevel "watching"
  22. i.fa.fa-eye
  23. span {{_ 'watching'}}
  24. if $eq watchLevel "tracking"
  25. i.fa.fa-bell
  26. span {{_ 'tracking'}}
  27. if $eq watchLevel "muted"
  28. i.fa.fa-bell-slash
  29. span {{_ 'muted'}}
  30. .board-header-btns.right
  31. if isMiniScreen
  32. unless isSandstorm
  33. if currentUser
  34. a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
  35. title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
  36. i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
  37. if showStarCounter
  38. span
  39. = currentBoard.stars
  40. a.board-header-btn(
  41. class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
  42. title="{{_ currentBoard.permission}}")
  43. i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
  44. span {{_ currentBoard.permission}}
  45. if currentUser
  46. a.board-header-btn.js-watch-board(
  47. title="{{_ watchLevel }}")
  48. if $eq watchLevel "watching"
  49. i.fa.fa-eye
  50. if $eq watchLevel "tracking"
  51. i.fa.fa-bell
  52. if $eq watchLevel "muted"
  53. i.fa.fa-bell-slash
  54. span {{_ watchLevel}}
  55. a.board-header-btn.js-open-filter-view(
  56. title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
  57. class="{{#if Filter.isActive}}emphasis{{/if}}")
  58. i.fa.fa-filter
  59. span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
  60. if Filter.isActive
  61. a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
  62. i.fa.fa-times-thin
  63. if currentUser.isBoardMember
  64. a.board-header-btn.js-multiselection-activate(
  65. title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
  66. class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
  67. i.fa.fa-check-square-o
  68. span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
  69. if MultiSelection.isActive
  70. a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
  71. i.fa.fa-times-thin
  72. .separator
  73. a.board-header-btn.js-open-board-menu
  74. i.board-header-btn-icon.fa.fa-navicon
  75. template(name="boardMenuPopup")
  76. ul.pop-over-list
  77. li: a.js-open-archives {{_ 'archived-items'}}
  78. if currentUser.isBoardAdmin
  79. li: a.js-change-board-color {{_ 'board-change-color'}}
  80. //-
  81. XXX Language should be handled by sandstorm, but for now display a
  82. language selection link in the board menu. This link is normally present
  83. in the header bar that is not displayed on sandstorm.
  84. if isSandstorm
  85. li: a.js-change-language {{_ 'language'}}
  86. unless isSandstorm
  87. if currentUser.isBoardAdmin
  88. hr
  89. ul.pop-over-list
  90. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  91. li: a.js-archive-board {{_ 'archive-board'}}
  92. template(name="boardVisibilityList")
  93. ul.pop-over-list
  94. li
  95. with "private"
  96. a.js-select-visibility
  97. i.fa.fa-lock.colorful
  98. | {{_ 'private'}}
  99. if visibilityCheck
  100. i.fa.fa-check
  101. span.sub-name {{_ 'private-desc'}}
  102. li
  103. with "public"
  104. a.js-select-visibility
  105. i.fa.fa-globe.colorful
  106. | {{_ 'public'}}
  107. if visibilityCheck
  108. i.fa.fa-check
  109. span.sub-name {{_ 'public-desc'}}
  110. template(name="boardChangeVisibilityPopup")
  111. +boardVisibilityList
  112. template(name="boardChangeWatchPopup")
  113. ul.pop-over-list
  114. li
  115. with "watching"
  116. a.js-select-watch
  117. i.fa.fa-eye.colorful
  118. | {{_ 'watching'}}
  119. if watchCheck
  120. i.fa.fa-check
  121. span.sub-name {{_ 'watching-info'}}
  122. li
  123. with "tracking"
  124. a.js-select-watch
  125. i.fa.fa-bell.colorful
  126. | {{_ 'tracking'}}
  127. if watchCheck
  128. i.fa.fa-check
  129. span.sub-name {{_ 'tracking-info'}}
  130. li
  131. with "muted"
  132. a.js-select-watch
  133. i.fa.fa-bell-slash.colorful
  134. | {{_ 'muted'}}
  135. if watchCheck
  136. i.fa.fa-check
  137. span.sub-name {{_ 'muted-info'}}
  138. template(name="boardChangeColorPopup")
  139. .board-backgrounds-list.clearfix
  140. each backgroundColors
  141. .board-background-select.js-select-background
  142. span.background-box(class="board-color-{{this}}")
  143. if isSelected
  144. i.fa.fa-check
  145. template(name="createBoardPopup")
  146. form
  147. label
  148. | {{_ 'title'}}
  149. input.js-new-board-title(type="text" placeholder="{{_ 'bucket-example'}}" autofocus required)
  150. if visibilityMenuIsOpen.get
  151. +boardVisibilityList
  152. else
  153. p.quiet
  154. if $eq visibility.get 'public'
  155. span.fa.fa-globe.colorful
  156. = " "
  157. | {{{_ 'board-public-info'}}}
  158. else
  159. span.fa.fa-lock.colorful
  160. = " "
  161. | {{{_ 'board-private-info'}}}
  162. a.js-change-visibility {{_ 'change'}}.
  163. input.primary.wide(type="submit" value="{{_ 'create'}}")
  164. span.quiet
  165. | {{_ 'or'}}
  166. a(href="{{pathFor 'import'}}") {{_ 'import-board'}}
  167. template(name="boardChangeTitlePopup")
  168. form
  169. label
  170. | {{_ 'title'}}
  171. input.js-board-name(type="text" value=title autofocus)
  172. label
  173. | {{_ 'description'}}
  174. textarea.js-board-desc= description
  175. input.primary.wide(type="submit" value="{{_ 'rename'}}")
  176. template(name="archiveBoardPopup")
  177. p {{_ 'close-board-pop'}}
  178. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}