summaryrefslogtreecommitdiffstats
path: root/client/components/boards
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards')
-rw-r--r--client/components/boards/boardsList.jade2
-rw-r--r--client/components/boards/boardsList.js18
2 files changed, 14 insertions, 6 deletions
diff --git a/client/components/boards/boardsList.jade b/client/components/boards/boardsList.jade
index 79bae502..f1118aa8 100644
--- a/client/components/boards/boardsList.jade
+++ b/client/components/boards/boardsList.jade
@@ -55,7 +55,7 @@ template(name="boardList")
title="{{_ 'archive-board'}}")
template(name="boardListHeaderBar")
- h1 {{_ 'my-boards'}}
+ h1 {{_ title }}
.board-header-btns.right
a.board-header-btn.js-open-archived-board
i.fa.fa-archive
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'] },
);
},