summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-04-13 16:39:13 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-04-21 20:37:10 +0200
commit081b09207f2247d7e38fc28e0f0f9748eecbbcbe (patch)
treeaf89efe4c8850b4c765388a7274b82689f48a2ee /client
parent7513520a9be9d4a40d6a5e9f82a0db5143ed03e9 (diff)
downloadwekan-081b09207f2247d7e38fc28e0f0f9748eecbbcbe.tar.gz
wekan-081b09207f2247d7e38fc28e0f0f9748eecbbcbe.tar.bz2
wekan-081b09207f2247d7e38fc28e0f0f9748eecbbcbe.zip
UI: Only display the options, if there is a board
The board options does not have valid use case (or even valid values) if the board is not found (either because the user is not logged in or the board really does not exists).
Diffstat (limited to 'client')
-rw-r--r--client/components/boards/boardHeader.jade142
1 files changed, 72 insertions, 70 deletions
diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade
index d44e318c..48d8b21d 100644
--- a/client/components/boards/boardHeader.jade
+++ b/client/components/boards/boardHeader.jade
@@ -7,80 +7,82 @@ template(name="boardHeaderBar")
.board-header-btns.left
unless isMiniScreen
unless isSandstorm
- if currentUser
- a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
- title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
- i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
- if showStarCounter
- span
- = currentBoard.stars
-
- a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}")
- i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
- span {{_ currentBoard.permission}}
-
- if currentUser
- a.board-header-btn.js-watch-board
- if $eq watchLevel "watching"
- i.fa.fa-eye
- span {{_ 'watching'}}
- if $eq watchLevel "tracking"
- i.fa.fa-bell
- span {{_ 'tracking'}}
- if $eq watchLevel "muted"
- i.fa.fa-bell-slash
- span {{_ 'muted'}}
+ if currentBoard
+ if currentUser
+ a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
+ title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
+ i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
+ if showStarCounter
+ span
+ = currentBoard.stars
+
+ a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}")
+ i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
+ span {{_ currentBoard.permission}}
+
+ if currentUser
+ a.board-header-btn.js-watch-board
+ if $eq watchLevel "watching"
+ i.fa.fa-eye
+ span {{_ 'watching'}}
+ if $eq watchLevel "tracking"
+ i.fa.fa-bell
+ span {{_ 'tracking'}}
+ if $eq watchLevel "muted"
+ i.fa.fa-bell-slash
+ span {{_ 'muted'}}
.board-header-btns.right
- if isMiniScreen
- unless isSandstorm
- if currentUser
- a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
- title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
- i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
- if showStarCounter
- span
- = currentBoard.stars
-
- a.board-header-btn(
- class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
- title="{{_ currentBoard.permission}}")
- i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
- span {{_ currentBoard.permission}}
-
- if currentUser
- a.board-header-btn.js-watch-board(
- title="{{_ watchLevel }}")
- if $eq watchLevel "watching"
- i.fa.fa-eye
- if $eq watchLevel "tracking"
- i.fa.fa-bell
- if $eq watchLevel "muted"
- i.fa.fa-bell-slash
- span {{_ watchLevel}}
-
- a.board-header-btn.js-open-filter-view(
- title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
- class="{{#if Filter.isActive}}emphasis{{/if}}")
- i.fa.fa-filter
- span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
- if Filter.isActive
- a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
- i.fa.fa-times-thin
-
- if currentUser.isBoardMember
- a.board-header-btn.js-multiselection-activate(
- title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
- class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
- i.fa.fa-check-square-o
- span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
- if MultiSelection.isActive
- a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
+ if currentBoard
+ if isMiniScreen
+ unless isSandstorm
+ if currentUser
+ a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
+ title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
+ i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
+ if showStarCounter
+ span
+ = currentBoard.stars
+
+ a.board-header-btn(
+ class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
+ title="{{_ currentBoard.permission}}")
+ i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
+ span {{_ currentBoard.permission}}
+
+ if currentUser
+ a.board-header-btn.js-watch-board(
+ title="{{_ watchLevel }}")
+ if $eq watchLevel "watching"
+ i.fa.fa-eye
+ if $eq watchLevel "tracking"
+ i.fa.fa-bell
+ if $eq watchLevel "muted"
+ i.fa.fa-bell-slash
+ span {{_ watchLevel}}
+
+ a.board-header-btn.js-open-filter-view(
+ title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
+ class="{{#if Filter.isActive}}emphasis{{/if}}")
+ i.fa.fa-filter
+ span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
+ if Filter.isActive
+ a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
+ i.fa.fa-times-thin
+
+ if currentUser.isBoardMember
+ a.board-header-btn.js-multiselection-activate(
+ title="{{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}"
+ class="{{#if MultiSelection.isActive}}emphasis{{/if}}")
+ i.fa.fa-check-square-o
+ span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
+ if MultiSelection.isActive
+ a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
i.fa.fa-times-thin
- .separator
- a.board-header-btn.js-open-board-menu
- i.board-header-btn-icon.fa.fa-navicon
+ .separator
+ a.board-header-btn.js-open-board-menu
+ i.board-header-btn-icon.fa.fa-navicon
template(name="boardMenuPopup")
ul.pop-over-list