boardHeader.jade 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. template(name="boardHeaderBar")
  2. h1.header-board-menu
  3. with currentBoard
  4. if $eq title 'Templates'
  5. | {{_ 'templates'}}
  6. else
  7. +viewer
  8. = title
  9. .board-header-btns.left
  10. unless isMiniScreen
  11. if currentBoard
  12. if currentUser
  13. with currentBoard
  14. if currentUser.isBoardAdmin
  15. a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-edit-board-title{{else}}is-disabled{{/if}}" title="{{_ 'edit'}}" value=title)
  16. | ✏️
  17. a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
  18. title="{{#if isStarred}}{{_ 'star-board-short-unstar'}}{{else}}{{_ 'star-board-short-star'}}{{/if}}" aria-label="{{#if isStarred}}{{_ 'star-board-short-unstar'}}{{else}}{{_ 'star-board-short-star'}}{{/if}}")
  19. | {{#if isStarred}}⭐{{else}}☆{{/if}}
  20. if showStarCounter
  21. span
  22. = currentBoard.stars
  23. a.board-header-btn(
  24. class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
  25. title="{{_ currentBoard.permission}}")
  26. | {{#if currentBoard.isPublic}}🌐{{else}}🔒{{/if}}
  27. span {{_ currentBoard.permission}}
  28. a.board-header-btn.js-watch-board(
  29. title="{{_ watchLevel }}")
  30. if $eq watchLevel "watching"
  31. | 👁️
  32. if $eq watchLevel "tracking"
  33. | 🔔
  34. if $eq watchLevel "muted"
  35. | 🔕
  36. span {{_ watchLevel}}
  37. a.board-header-btn(title="{{_ 'sort-cards'}}" class="{{#if isSortActive }}emphasis{{else}} js-sort-cards {{/if}}")
  38. | {{sortCardsIcon}}
  39. span {{#if isSortActive }}{{_ 'sort-is-on'}}{{else}}{{_ 'sort-cards'}}{{/if}}
  40. if isSortActive
  41. a.board-header-btn-close.js-sort-reset(title="{{_ 'remove-sort'}}")
  42. | ❌
  43. else
  44. a.board-header-btn.js-log-in(
  45. title="{{_ 'log-in'}}")
  46. | 🚪
  47. span {{_ 'log-in'}}
  48. .board-header-btns.center
  49. .board-header-btns.right
  50. if currentBoard
  51. if isMiniScreen
  52. if currentUser
  53. with currentBoard
  54. a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-edit-board-title{{else}}is-disabled{{/if}}" title="{{_ 'edit'}}" value=title)
  55. | ✏️
  56. a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
  57. title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
  58. | {{#if isStarred}}⭐{{else}}☆{{/if}}
  59. a.board-header-btn(
  60. class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
  61. title="{{_ currentBoard.permission}}")
  62. | {{#if currentBoard.isPublic}}🌐{{else}}🔒{{/if}}
  63. a.board-header-btn.js-watch-board(
  64. title="{{_ watchLevel }}")
  65. if $eq watchLevel "watching"
  66. | 👁️
  67. if $eq watchLevel "tracking"
  68. | 🔔
  69. if $eq watchLevel "muted"
  70. | 🔕
  71. a.board-header-btn(title="{{_ 'sort-cards'}}" class="{{#if isSortActive }}emphasis{{else}} js-sort-cards {{/if}}")
  72. | {{sortCardsIcon}}
  73. if isSortActive
  74. a.board-header-btn-close.js-sort-reset(title="{{_ 'remove-sort'}}")
  75. | ❌
  76. else
  77. a.board-header-btn.js-log-in(
  78. title="{{_ 'log-in'}}")
  79. | 🚪
  80. if isSandstorm
  81. if currentUser
  82. a.board-header-btn.js-open-archived-board
  83. | 📦
  84. //if showSort
  85. // a.board-header-btn.js-open-sort-view(title="{{_ 'sort-desc'}}")
  86. // i.fa(class="{{directionClass}}")
  87. // span {{_ 'sort'}}{{_ listSortShortDesc}}
  88. a.board-header-btn.js-open-filter-view(
  89. title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
  90. class="{{#if Filter.isActive}}emphasis{{/if}}")
  91. | 🔽
  92. if Filter.isActive
  93. a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
  94. | ❌
  95. a.board-header-btn.js-open-search-view(title="{{_ 'search'}}")
  96. | 🔍
  97. unless currentBoard.isTemplatesBoard
  98. a.board-header-btn.js-toggle-board-view(
  99. title="{{_ 'board-view'}}")
  100. | ▼
  101. if $eq boardView 'board-view-swimlanes'
  102. | 🏊
  103. if $eq boardView 'board-view-lists'
  104. | 📋
  105. if $eq boardView 'board-view-cal'
  106. | 📅
  107. if canModifyBoard
  108. a.board-header-btn.js-multiselection-activate(
  109. title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
  110. class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
  111. | ☑️
  112. if MultiSelection.isActive
  113. a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
  114. | ❌
  115. if currentUser.isBoardAdmin
  116. a.board-header-btn.js-restore-legacy-lists(title="{{_ 'restore-legacy-lists'}}")
  117. | 🔄
  118. | {{_ 'legacy-lists'}}
  119. .separator
  120. a.board-header-btn.js-toggle-sidebar(title="{{_ 'sidebar-open'}} {{_ 'or'}} {{_ 'sidebar-close'}}")
  121. | ☰
  122. template(name="boardVisibilityList")
  123. ul.pop-over-list
  124. li
  125. with "private"
  126. a.js-select-visibility
  127. | 🔒
  128. | {{_ 'private'}}
  129. if visibilityCheck
  130. | ✅
  131. span.sub-name {{_ 'private-desc'}}
  132. if notAllowPrivateVisibilityOnly
  133. li
  134. with "public"
  135. a.js-select-visibility
  136. | 🌐
  137. | {{_ 'public'}}
  138. if visibilityCheck
  139. | ✅
  140. span.sub-name {{_ 'public-desc'}}
  141. template(name="boardChangeVisibilityPopup")
  142. +boardVisibilityList
  143. template(name="boardChangeWatchPopup")
  144. ul.pop-over-list
  145. li
  146. with "watching"
  147. a.js-select-watch
  148. | 👁️
  149. | {{_ 'watching'}}
  150. if watchCheck
  151. | ✅
  152. span.sub-name {{_ 'watching-info'}}
  153. li
  154. with "tracking"
  155. a.js-select-watch
  156. | 🔔
  157. | {{_ 'tracking'}}
  158. if watchCheck
  159. | ✅
  160. span.sub-name {{_ 'tracking-info'}}
  161. li
  162. with "muted"
  163. a.js-select-watch
  164. | 🔕
  165. | {{_ 'muted'}}
  166. if watchCheck
  167. | ✅
  168. span.sub-name {{_ 'muted-info'}}
  169. template(name="boardChangeViewPopup")
  170. ul.pop-over-list
  171. li
  172. with "board-view-swimlanes"
  173. a.js-open-swimlanes-view
  174. | 🏊
  175. | {{_ 'board-view-swimlanes'}}
  176. if $eq Utils.boardView "board-view-swimlanes"
  177. | ✅
  178. li
  179. with "board-view-lists"
  180. a.js-open-lists-view
  181. | 📋
  182. | {{_ 'board-view-lists'}}
  183. if $eq Utils.boardView "board-view-lists"
  184. | ✅
  185. li
  186. with "board-view-cal"
  187. a.js-open-cal-view
  188. | 📅
  189. | {{_ 'board-view-cal'}}
  190. if $eq Utils.boardView "board-view-cal"
  191. | ✅
  192. template(name="createBoard")
  193. form
  194. label
  195. | {{_ 'title'}}
  196. input.js-new-board-title(type="text" placeholder="{{_ 'bucket-example'}}" autofocus required)
  197. if visibilityMenuIsOpen.get
  198. +boardVisibilityList
  199. else
  200. p.quiet
  201. if $eq visibility.get 'public'
  202. span 🌐
  203. = " "
  204. | {{{_ 'board-public-info'}}}
  205. else
  206. span 🔒
  207. = " "
  208. | {{{_ 'board-private-info'}}}
  209. a.js-change-visibility {{_ 'change'}}.
  210. a.flex.js-toggle-add-template-container
  211. .materialCheckBox#add-template-container
  212. span {{_ 'add-template-container'}}
  213. input.primary.wide(type="submit" value="{{_ 'create'}}")
  214. span.quiet
  215. | {{_ 'or'}}
  216. a.js-import-board {{_ 'import'}}
  217. span.quiet
  218. | /
  219. a.js-board-template {{_ 'template'}}
  220. //template(name="listsortPopup")
  221. // h2
  222. // | {{_ 'list-sort-by'}}
  223. // hr
  224. // ul.pop-over-list
  225. // each value in allowedSortValues
  226. // li
  227. // a.js-sort-by(name="{{value.name}}")
  228. // if $eq sortby value.name
  229. // | {{#if $eq Direction "fa-arrow-up"}}⬆️{{else}}⬇️{{/if}}
  230. // | {{_ value.label }}{{_ value.shortLabel}}
  231. // if $eq sortby value.name
  232. // | ✅
  233. template(name="boardChangeTitlePopup")
  234. form
  235. label
  236. | {{_ 'title'}}
  237. input.js-board-name(type="text" value=title autofocus dir="auto")
  238. label
  239. | {{_ 'description'}}
  240. textarea.js-board-desc(dir="auto")= description
  241. input.primary.wide(type="submit" value="{{_ 'rename'}}")
  242. template(name="boardCreateRulePopup")
  243. p {{_ 'close-board-pop'}}
  244. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
  245. template(name="cardsSortPopup")
  246. ul.pop-over-list
  247. li
  248. a.js-sort-due
  249. | 📅
  250. | {{_ 'due-date'}}
  251. hr
  252. li
  253. a.js-sort-title
  254. | 🔤
  255. | {{_ 'title-alphabetically'}}
  256. hr
  257. li
  258. a.js-sort-created-desc
  259. | ⬇️
  260. | {{_ 'created-at-newest-first'}}
  261. hr
  262. li
  263. a.js-sort-created-asc
  264. | ⬆️
  265. | {{_ 'created-at-oldest-first'}}