mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Add sortDefault helper for sorting boards
This commit is contained in:
parent
9f396e9038
commit
10fcc19b7f
10 changed files with 50 additions and 31 deletions
|
|
@ -7,7 +7,7 @@ BlazeComponent.extendComponent({
|
|||
return Boards.find(
|
||||
{ archived: true },
|
||||
{
|
||||
sort: ['title'],
|
||||
sort: { sort: 1 /* boards default sorting */ }
|
||||
},
|
||||
);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ Template.boardListHeaderBar.events({
|
|||
});
|
||||
|
||||
Template.boardListHeaderBar.helpers({
|
||||
title(){
|
||||
return FlowRouter.getRouteName() == 'home' ? 'my-boards' :'public';
|
||||
title() {
|
||||
return FlowRouter.getRouteName() == 'home' ? 'my-boards' : 'public';
|
||||
},
|
||||
templatesBoardId() {
|
||||
return Meteor.user() && Meteor.user().getTemplatesBoardId();
|
||||
|
|
@ -27,16 +27,12 @@ BlazeComponent.extendComponent({
|
|||
let query = {
|
||||
archived: false,
|
||||
type: 'board',
|
||||
}
|
||||
};
|
||||
if (FlowRouter.getRouteName() == 'home')
|
||||
query['members.userId'] = Meteor.userId()
|
||||
else
|
||||
query.permission = 'public'
|
||||
query['members.userId'] = Meteor.userId();
|
||||
else query.permission = 'public';
|
||||
|
||||
return Boards.find(
|
||||
query,
|
||||
{ sort: ['title'] },
|
||||
);
|
||||
return Boards.find(query, { sort: { sort: 1 /* boards default sorting */ } });
|
||||
},
|
||||
isStarred() {
|
||||
const user = Meteor.user();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue