boardHeader.jade 6.8 KB

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