summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardsList.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards/boardsList.js')
-rw-r--r--client/components/boards/boardsList.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index 3918af82..0ff1c4fb 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -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'] },
);
},