mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 09:20:12 +01:00
fix board headeer issue
This commit is contained in:
parent
ce88495d47
commit
d2ac3dc63d
5 changed files with 34 additions and 15 deletions
|
|
@ -5,20 +5,34 @@ template(name="boardHeaderBar")
|
||||||
= title
|
= title
|
||||||
|
|
||||||
.board-header-btns.left
|
.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}}
|
||||||
|
|
||||||
.board-header-btns.right
|
.board-header-btns.right
|
||||||
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(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}}
|
||||||
|
|
||||||
a.board-header-btn.js-open-filter-view(
|
a.board-header-btn.js-open-filter-view(
|
||||||
title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{/if}}"
|
title="{{#if Filter.isActive}}{{_ 'filter-on-desc'}}{{/if}}"
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,10 @@ BlazeComponent.extendComponent({
|
||||||
return user && user.hasStarred(boardId);
|
return user && user.hasStarred(boardId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isMiniScreen() {
|
||||||
|
return Utils.isMiniScreen();
|
||||||
|
},
|
||||||
|
|
||||||
// Only show the star counter if the number of star is greater than 2
|
// Only show the star counter if the number of star is greater than 2
|
||||||
showStarCounter() {
|
showStarCounter() {
|
||||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ template(name="header")
|
||||||
#header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
|
#header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
|
||||||
+Template.dynamic(template=headerBar)
|
+Template.dynamic(template=headerBar)
|
||||||
|
|
||||||
if wrappedHeader
|
unless hideLogo
|
||||||
//-
|
//-
|
||||||
On sandstorm, the logo shouldn't be clickable, because we only have one
|
On sandstorm, the logo shouldn't be clickable, because we only have one
|
||||||
page/document on it, and we don't want to see the home page containing
|
page/document on it, and we don't want to see the home page containing
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@ Template.header.helpers({
|
||||||
wrappedHeader() {
|
wrappedHeader() {
|
||||||
return !Session.get('currentBoard');
|
return !Session.get('currentBoard');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideLogo() {
|
||||||
|
return Utils.isMiniScreen() && Session.get('currentBoard');
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.header.events({
|
Template.header.events({
|
||||||
|
|
|
||||||
|
|
@ -165,9 +165,6 @@
|
||||||
#header-main-bar
|
#header-main-bar
|
||||||
height: 40px
|
height: 40px
|
||||||
|
|
||||||
h1
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.board-header-btns
|
.board-header-btns
|
||||||
margin-top: 0px
|
margin-top: 0px
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue