mirror of
https://github.com/wekan/wekan.git
synced 2026-02-26 09:54:08 +01:00
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).
This commit is contained in:
parent
7513520a9b
commit
081b09207f
1 changed files with 67 additions and 65 deletions
|
|
@ -7,80 +7,82 @@ template(name="boardHeaderBar")
|
||||||
.board-header-btns.left
|
.board-header-btns.left
|
||||||
unless isMiniScreen
|
unless isMiniScreen
|
||||||
unless isSandstorm
|
unless isSandstorm
|
||||||
if currentUser
|
if currentBoard
|
||||||
a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
|
if currentUser
|
||||||
title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
|
a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
|
||||||
i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
|
title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
|
||||||
if showStarCounter
|
i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
|
||||||
span
|
if showStarCounter
|
||||||
= currentBoard.stars
|
span
|
||||||
|
= currentBoard.stars
|
||||||
|
|
||||||
a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}")
|
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}}")
|
i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
|
||||||
span {{_ currentBoard.permission}}
|
span {{_ currentBoard.permission}}
|
||||||
|
|
||||||
if currentUser
|
if currentUser
|
||||||
a.board-header-btn.js-watch-board
|
a.board-header-btn.js-watch-board
|
||||||
if $eq watchLevel "watching"
|
if $eq watchLevel "watching"
|
||||||
i.fa.fa-eye
|
i.fa.fa-eye
|
||||||
span {{_ 'watching'}}
|
span {{_ 'watching'}}
|
||||||
if $eq watchLevel "tracking"
|
if $eq watchLevel "tracking"
|
||||||
i.fa.fa-bell
|
i.fa.fa-bell
|
||||||
span {{_ 'tracking'}}
|
span {{_ 'tracking'}}
|
||||||
if $eq watchLevel "muted"
|
if $eq watchLevel "muted"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
span {{_ 'muted'}}
|
span {{_ 'muted'}}
|
||||||
|
|
||||||
.board-header-btns.right
|
.board-header-btns.right
|
||||||
if isMiniScreen
|
if currentBoard
|
||||||
unless isSandstorm
|
if isMiniScreen
|
||||||
if currentUser
|
unless isSandstorm
|
||||||
a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
|
if currentUser
|
||||||
title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
|
a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
|
||||||
i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
|
title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")
|
||||||
if showStarCounter
|
i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}")
|
||||||
span
|
if showStarCounter
|
||||||
= currentBoard.stars
|
span
|
||||||
|
= currentBoard.stars
|
||||||
|
|
||||||
a.board-header-btn(
|
a.board-header-btn(
|
||||||
class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
|
class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
|
||||||
title="{{_ currentBoard.permission}}")
|
title="{{_ currentBoard.permission}}")
|
||||||
i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
|
i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
|
||||||
span {{_ currentBoard.permission}}
|
span {{_ currentBoard.permission}}
|
||||||
|
|
||||||
if currentUser
|
if currentUser
|
||||||
a.board-header-btn.js-watch-board(
|
a.board-header-btn.js-watch-board(
|
||||||
title="{{_ watchLevel }}")
|
title="{{_ watchLevel }}")
|
||||||
if $eq watchLevel "watching"
|
if $eq watchLevel "watching"
|
||||||
i.fa.fa-eye
|
i.fa.fa-eye
|
||||||
if $eq watchLevel "tracking"
|
if $eq watchLevel "tracking"
|
||||||
i.fa.fa-bell
|
i.fa.fa-bell
|
||||||
if $eq watchLevel "muted"
|
if $eq watchLevel "muted"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
span {{_ watchLevel}}
|
span {{_ watchLevel}}
|
||||||
|
|
||||||
a.board-header-btn.js-open-filter-view(
|
a.board-header-btn.js-open-filter-view(
|
||||||
title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
|
title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}"
|
||||||
class="{{#if Filter.isActive}}emphasis{{/if}}")
|
class="{{#if Filter.isActive}}emphasis{{/if}}")
|
||||||
i.fa.fa-filter
|
i.fa.fa-filter
|
||||||
span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
|
span {{#if Filter.isActive}}{{_ 'filter-on'}}{{else}}{{_ 'filter'}}{{/if}}
|
||||||
if Filter.isActive
|
if Filter.isActive
|
||||||
a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
|
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
|
i.fa.fa-times-thin
|
||||||
|
|
||||||
.separator
|
if currentUser.isBoardMember
|
||||||
a.board-header-btn.js-open-board-menu
|
a.board-header-btn.js-multiselection-activate(
|
||||||
i.board-header-btn-icon.fa.fa-navicon
|
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
|
||||||
|
|
||||||
template(name="boardMenuPopup")
|
template(name="boardMenuPopup")
|
||||||
ul.pop-over-list
|
ul.pop-over-list
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue