mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
commit
62d472fa54
3 changed files with 50 additions and 23 deletions
|
@ -13,26 +13,29 @@ template(name="board")
|
||||||
+spinner
|
+spinner
|
||||||
|
|
||||||
template(name="boardBody")
|
template(name="boardBody")
|
||||||
.board-wrapper(class=currentBoard.colorClass)
|
if notDisplayThisBoard
|
||||||
+sidebar
|
{{_ 'tableVisibilityMode-allowPrivateOnly'}}
|
||||||
.board-canvas.js-swimlanes(
|
else
|
||||||
class="{{#if Sidebar.isOpen}}is-sibling-sidebar-open{{/if}}"
|
.board-wrapper(class=currentBoard.colorClass)
|
||||||
class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
|
+sidebar
|
||||||
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
|
.board-canvas.js-swimlanes(
|
||||||
if showOverlay.get
|
class="{{#if Sidebar.isOpen}}is-sibling-sidebar-open{{/if}}"
|
||||||
.board-overlay
|
class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
|
||||||
if currentBoard.isTemplatesBoard
|
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
|
||||||
each currentBoard.swimlanes
|
if showOverlay.get
|
||||||
+swimlane(this)
|
.board-overlay
|
||||||
else if isViewSwimlanes
|
if currentBoard.isTemplatesBoard
|
||||||
each currentBoard.swimlanes
|
each currentBoard.swimlanes
|
||||||
+swimlane(this)
|
+swimlane(this)
|
||||||
else if isViewLists
|
else if isViewSwimlanes
|
||||||
+listsGroup(currentBoard)
|
each currentBoard.swimlanes
|
||||||
else if isViewCalendar
|
+swimlane(this)
|
||||||
+calendarView
|
else if isViewLists
|
||||||
else
|
+listsGroup(currentBoard)
|
||||||
+listsGroup(currentBoard)
|
else if isViewCalendar
|
||||||
|
+calendarView
|
||||||
|
else
|
||||||
|
+listsGroup(currentBoard)
|
||||||
|
|
||||||
template(name="calendarView")
|
template(name="calendarView")
|
||||||
if isViewCalendar
|
if isViewCalendar
|
||||||
|
|
|
@ -33,6 +33,7 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
onCreated() {
|
onCreated() {
|
||||||
|
Meteor.subscribe('tableVisibilityModeSettings');
|
||||||
this.showOverlay = new ReactiveVar(false);
|
this.showOverlay = new ReactiveVar(false);
|
||||||
this.draggingActive = new ReactiveVar(false);
|
this.draggingActive = new ReactiveVar(false);
|
||||||
this._isDragging = false;
|
this._isDragging = false;
|
||||||
|
@ -235,6 +236,16 @@ BlazeComponent.extendComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
notDisplayThisBoard(){
|
||||||
|
let allowPrivateVisibilityOnly = TableVisibilityModeSettings.findOne('tableVisibilityMode-allowPrivateOnly');
|
||||||
|
let currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||||
|
if(allowPrivateVisibilityOnly !== undefined && allowPrivateVisibilityOnly.booleanValue && currentBoard.permission == 'public'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
isViewSwimlanes() {
|
isViewSwimlanes() {
|
||||||
currentUser = Meteor.user();
|
currentUser = Meteor.user();
|
||||||
if (currentUser) {
|
if (currentUser) {
|
||||||
|
|
|
@ -22,6 +22,7 @@ Template.boardListHeaderBar.helpers({
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
onCreated() {
|
onCreated() {
|
||||||
Meteor.subscribe('setting');
|
Meteor.subscribe('setting');
|
||||||
|
Meteor.subscribe('tableVisibilityModeSettings');
|
||||||
let currUser = Meteor.user();
|
let currUser = Meteor.user();
|
||||||
let userLanguage;
|
let userLanguage;
|
||||||
if(currUser && currUser.profile){
|
if(currUser && currUser.profile){
|
||||||
|
@ -140,7 +141,7 @@ BlazeComponent.extendComponent({
|
||||||
return (boolUserHasOrgs || boolUserHasTeams);
|
return (boolUserHasOrgs || boolUserHasTeams);
|
||||||
},
|
},
|
||||||
boards() {
|
boards() {
|
||||||
const query = {
|
let query = {
|
||||||
//archived: false,
|
//archived: false,
|
||||||
////type: { $in: ['board','template-container'] },
|
////type: { $in: ['board','template-container'] },
|
||||||
//type: 'board',
|
//type: 'board',
|
||||||
|
@ -150,9 +151,14 @@ BlazeComponent.extendComponent({
|
||||||
{ $or:[] }
|
{ $or:[] }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let allowPrivateVisibilityOnly = TableVisibilityModeSettings.findOne('tableVisibilityMode-allowPrivateOnly');
|
||||||
|
|
||||||
if (FlowRouter.getRouteName() === 'home'){
|
if (FlowRouter.getRouteName() === 'home'){
|
||||||
query.$and[2].$or.push({'members.userId': Meteor.userId()});
|
query.$and[2].$or.push({'members.userId': Meteor.userId()});
|
||||||
|
if(allowPrivateVisibilityOnly !== undefined && allowPrivateVisibilityOnly.booleanValue){
|
||||||
|
query.$and.push({'permission': 'private'});
|
||||||
|
}
|
||||||
const currUser = Users.findOne(Meteor.userId());
|
const currUser = Users.findOne(Meteor.userId());
|
||||||
|
|
||||||
// const currUser = Users.findOne(Meteor.userId(), {
|
// const currUser = Users.findOne(Meteor.userId(), {
|
||||||
|
@ -183,7 +189,14 @@ BlazeComponent.extendComponent({
|
||||||
query.$and[2].$or.push({'teams.teamId': {$in : teamsIds}});
|
query.$and[2].$or.push({'teams.teamId': {$in : teamsIds}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else query.permission = 'public';
|
else if(allowPrivateVisibilityOnly !== undefined && !allowPrivateVisibilityOnly.booleanValue){
|
||||||
|
query = {
|
||||||
|
archived: false,
|
||||||
|
//type: { $in: ['board','template-container'] },
|
||||||
|
type: 'board',
|
||||||
|
permission: 'public',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return Boards.find(query, {
|
return Boards.find(query, {
|
||||||
sort: { sort: 1 /* boards default sorting */ },
|
sort: { sort: 1 /* boards default sorting */ },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue