Merge branch 'sorted-archives' of https://github.com/bronger/wekan into bronger-sorted-archives

This commit is contained in:
Lauri Ojansivu 2021-02-02 20:56:09 +02:00
commit 41e1f8fbc3
8 changed files with 57 additions and 5 deletions

View file

@ -11,7 +11,7 @@ BlazeComponent.extendComponent({
return Boards.find(
{ archived: true },
{
sort: { sort: 1 /* boards default sorting */ },
sort: { archivedAt: -1, modifiedAt: -1 },
},
);
},

View file

@ -14,6 +14,11 @@ template(name="archivesSidebar")
if currentUser.isBoardMember
unless isWorker
p.quiet
if this.archivedAt
| {{_ 'archived-at' }}
|
| {{ moment this.archivedAt 'LLL' }}
br
a.js-restore-card {{_ 'restore'}}
if currentUser.isBoardAdmin
| -
@ -37,6 +42,11 @@ template(name="archivesSidebar")
if currentUser.isBoardMember
unless isWorker
p.quiet
if this.archivedAt
| {{_ 'archived-at' }}
|
| {{ moment this.archivedAt 'LLL' }}
br
a.js-restore-list {{_ 'restore'}}
if currentUser.isBoardAdmin
| -
@ -58,6 +68,11 @@ template(name="archivesSidebar")
if currentUser.isBoardMember
unless isWorker
p.quiet
if this.archivedAt
| {{_ 'archived-at' }}
|
| {{ moment this.archivedAt 'LLL' }}
br
a.js-restore-swimlane {{_ 'restore'}}
if currentUser.isBoardAdmin
| -

View file

@ -34,6 +34,8 @@ BlazeComponent.extendComponent({
return Cards.find({
archived: true,
boardId: Session.get('currentBoard'),
}, {
sort: { archivedAt: -1, modifiedAt: -1 },
});
},
@ -41,6 +43,8 @@ BlazeComponent.extendComponent({
return Lists.find({
archived: true,
boardId: Session.get('currentBoard'),
}, {
sort: { archivedAt: -1, modifiedAt: -1 },
});
},
@ -48,6 +52,8 @@ BlazeComponent.extendComponent({
return Swimlanes.find({
archived: true,
boardId: Session.get('currentBoard'),
}, {
sort: { archivedAt: -1, modifiedAt: -1 },
});
},