summaryrefslogtreecommitdiffstats
path: root/client/components/boards
diff options
context:
space:
mode:
authorNico <paetni1@gmail.com>2020-04-12 00:56:35 +0200
committerNico <paetni1@gmail.com>2020-04-12 00:56:35 +0200
commitedf52bc4382823ed8768251954371094a849213e (patch)
treecf84fa1216ac5001df2204790d299ad5b8f0d1f4 /client/components/boards
parent8f28a409c7dd90319f785e3fc4c1b26803f67f31 (diff)
downloadwekan-edf52bc4382823ed8768251954371094a849213e.tar.gz
wekan-edf52bc4382823ed8768251954371094a849213e.tar.bz2
wekan-edf52bc4382823ed8768251954371094a849213e.zip
Public boards overview
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'] },
);
},