boardHeader.jade 6.6 KB

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