mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Public boards overview
This commit is contained in:
parent
8f28a409c7
commit
edf52bc438
6 changed files with 42 additions and 8 deletions
|
|
@ -7,6 +7,9 @@ Template.boardListHeaderBar.events({
|
|||
});
|
||||
|
||||
Template.boardListHeaderBar.helpers({
|
||||
title(){
|
||||
return FlowRouter.getRouteName() == 'home' ? 'my-boards' :'public';
|
||||
},
|
||||
templatesBoardId() {
|
||||
return Meteor.user() && Meteor.user().getTemplatesBoardId();
|
||||
},
|
||||
|
|
@ -21,12 +24,17 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
boards() {
|
||||
let query = {
|
||||
archived: false,
|
||||
type: 'board',
|
||||
}
|
||||
if (FlowRouter.getRouteName() == 'home')
|
||||
query['members.userId'] = Meteor.userId()
|
||||
else
|
||||
query.permission = 'public'
|
||||
|
||||
return Boards.find(
|
||||
{
|
||||
archived: false,
|
||||
'members.userId': Meteor.userId(),
|
||||
type: 'board',
|
||||
},
|
||||
query,
|
||||
{ sort: ['title'] },
|
||||
);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue