boardHeader.jade 10 KB

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