boardHeader.jade 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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.js-archive-board {{_ 'archive-board'}}
  55. template(name="boardVisibilityList")
  56. ul.pop-over-list
  57. li
  58. with "private"
  59. a.js-select-visibility
  60. i.fa.fa-lock.colorful
  61. | {{_ 'private'}}
  62. if visibilityCheck
  63. i.fa.fa-check
  64. span.sub-name {{_ 'private-desc'}}
  65. li
  66. with "public"
  67. a.js-select-visibility
  68. i.fa.fa-globe.colorful
  69. | {{_ 'public'}}
  70. if visibilityCheck
  71. i.fa.fa-check
  72. span.sub-name {{_ 'public-desc'}}
  73. template(name="boardChangeVisibilityPopup")
  74. +boardVisibilityList
  75. template(name="boardChangeColorPopup")
  76. .board-backgrounds-list.clearfix
  77. each backgroundColors
  78. .board-background-select.js-select-background
  79. span.background-box(class="board-color-{{this}}")
  80. if isSelected
  81. i.fa.fa-check
  82. template(name="createBoardPopup")
  83. form
  84. label
  85. | {{_ 'title'}}
  86. input.js-new-board-title(type="text" placeholder="{{_ 'bucket-example'}}" autofocus required)
  87. if visibilityMenuIsOpen.get
  88. +boardVisibilityList
  89. else
  90. p.quiet
  91. if $eq visibility.get 'public'
  92. span.fa.fa-globe.colorful
  93. = " "
  94. | {{{_ 'board-public-info'}}}
  95. else
  96. span.fa.fa-lock.colorful
  97. = " "
  98. | {{{_ 'board-private-info'}}}
  99. a.js-change-visibility {{_ 'change'}}.
  100. input.primary.wide(type="submit" value="{{_ 'create'}}")
  101. span.quiet
  102. | {{_ 'or'}}
  103. a.js-import {{_ 'import-board'}}
  104. template(name="boardChangeTitlePopup")
  105. form
  106. label
  107. | {{_ 'title'}}
  108. input.js-board-name(type="text" value=title autofocus)
  109. label
  110. | {{_ 'description'}}
  111. textarea.js-board-desc= description
  112. input.primary.wide(type="submit" value="{{_ 'rename'}}")
  113. template(name="archiveBoardPopup")
  114. p {{_ 'close-board-pop'}}
  115. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}