diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2016-04-18 20:26:10 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2016-04-21 20:38:09 +0200 |
commit | fad5150ada7981455bedccc479637e2cdc9a4935 (patch) | |
tree | 1fb4e1baac6361c27e1cc9e13a6a4c9cbd5e7d8c /client/components/boards | |
parent | 081b09207f2247d7e38fc28e0f0f9748eecbbcbe (diff) | |
download | wekan-fad5150ada7981455bedccc479637e2cdc9a4935.tar.gz wekan-fad5150ada7981455bedccc479637e2cdc9a4935.tar.bz2 wekan-fad5150ada7981455bedccc479637e2cdc9a4935.zip |
UI: Add log-in button to public boards
Even if a board is public and a user can view it, the user might want to
log in to be able to edit the board.
The button replaces the "public" permission indicator, because it is
obvious (if the user is not logged in and can view the board, it has to
be public).
Diffstat (limited to 'client/components/boards')
-rw-r--r-- | client/components/boards/boardHeader.jade | 30 | ||||
-rw-r--r-- | client/components/boards/boardHeader.js | 3 |
2 files changed, 23 insertions, 10 deletions
diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index 48d8b21d..18613a65 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -16,11 +16,10 @@ template(name="boardHeaderBar") 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}} + 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 @@ -32,6 +31,12 @@ template(name="boardHeaderBar") i.fa.fa-bell-slash span {{_ 'muted'}} + else + a.board-header-btn.js-log-in( + title="{{_ 'log-in'}}") + i.fa.fa-sign-in + span {{_ 'log-in'}} + .board-header-btns.right if currentBoard if isMiniScreen @@ -44,13 +49,12 @@ template(name="boardHeaderBar") 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}} + 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" @@ -60,6 +64,12 @@ template(name="boardHeaderBar") if $eq watchLevel "muted" i.fa.fa-bell-slash span {{_ watchLevel}} + + else + a.board-header-btn.js-log-in( + title="{{_ 'log-in'}}") + i.fa.fa-sign-in + span {{_ 'log-in'}} a.board-header-btn.js-open-filter-view( title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{else}}{{_ 'filter'}}{{/if}}" diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index 9ed27406..b72bb162 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -90,6 +90,9 @@ BlazeComponent.extendComponent({ evt.stopPropagation(); MultiSelection.disable(); }, + 'click .js-log-in'() { + FlowRouter.go('atSignIn'); + }, }]; }, }).register('boardHeaderBar'); |