boardHeader.jade 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. .board-header-btns.right
  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-open-filter-view(
  20. title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{/if}}"
  21. class="{{#if Filter.isActive}}emphasis{{/if}}")
  22. i.fa.fa-filter
  23. span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
  24. if Filter.isActive
  25. a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
  26. i.fa.fa-times-thin
  27. if currentUser.isBoardMember
  28. a.board-header-btn.js-multiselection-activate(
  29. title="{{#if MultiSelection.isActive}}{{_ 'filter-on-desc'}}{{/if}}"
  30. class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
  31. i.fa.fa-check-square-o
  32. span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
  33. if MultiSelection.isActive
  34. a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
  35. i.fa.fa-times-thin
  36. .separator
  37. a.board-header-btn.js-open-board-menu
  38. i.board-header-btn-icon.fa.fa-navicon
  39. template(name="boardMenuPopup")
  40. ul.pop-over-list
  41. li: a.js-open-archives {{_ 'archived-items'}}
  42. if currentUser.isBoardAdmin
  43. li: a.js-change-board-color {{_ 'board-change-color'}}
  44. //-
  45. XXX Language should be handled by sandstorm, but for now display a
  46. language selection link in the board menu. This link is normally present
  47. in the header bar that is not displayed on sandstorm.
  48. if isSandstorm
  49. li: a.js-change-language {{_ 'language'}}
  50. unless isSandstorm
  51. if currentUser.isBoardAdmin
  52. hr
  53. ul.pop-over-list
  54. li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}}
  55. li: a.js-archive-board {{_ 'archive-board'}}
  56. template(name="boardVisibilityList")
  57. ul.pop-over-list
  58. li
  59. with "private"
  60. a.js-select-visibility
  61. i.fa.fa-lock.colorful
  62. | {{_ 'private'}}
  63. if visibilityCheck
  64. i.fa.fa-check
  65. span.sub-name {{_ 'private-desc'}}
  66. li
  67. with "public"
  68. a.js-select-visibility
  69. i.fa.fa-globe.colorful
  70. | {{_ 'public'}}
  71. if visibilityCheck
  72. i.fa.fa-check
  73. span.sub-name {{_ 'public-desc'}}
  74. template(name="boardChangeVisibilityPopup")
  75. +boardVisibilityList
  76. template(name="boardChangeColorPopup")
  77. .board-backgrounds-list.clearfix
  78. each backgroundColors
  79. .board-background-select.js-select-background
  80. span.background-box(class="board-color-{{this}}")
  81. if isSelected
  82. i.fa.fa-check
  83. template(name="createBoardPopup")
  84. form
  85. label
  86. | {{_ 'title'}}
  87. input.js-new-board-title(type="text" placeholder="{{_ 'bucket-example'}}" autofocus required)
  88. if visibilityMenuIsOpen.get
  89. +boardVisibilityList
  90. else
  91. p.quiet
  92. if $eq visibility.get 'public'
  93. span.fa.fa-globe.colorful
  94. = " "
  95. | {{{_ 'board-public-info'}}}
  96. else
  97. span.fa.fa-lock.colorful
  98. = " "
  99. | {{{_ 'board-private-info'}}}
  100. a.js-change-visibility {{_ 'change'}}.
  101. input.primary.wide(type="submit" value="{{_ 'create'}}")
  102. span.quiet
  103. | {{_ 'or'}}
  104. a.js-import {{_ 'import-board'}}
  105. template(name="boardChangeTitlePopup")
  106. form
  107. label
  108. | {{_ 'title'}}
  109. input.js-board-name(type="text" value=title autofocus)
  110. label
  111. | {{_ 'description'}}
  112. textarea.js-board-desc= description
  113. input.primary.wide(type="submit" value="{{_ 'rename'}}")
  114. template(name="archiveBoardPopup")
  115. p {{_ 'close-board-pop'}}
  116. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}