mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix hiddenSystemMessages
This commit is contained in:
parent
e55d7e4f72
commit
be00465e67
3 changed files with 18 additions and 7 deletions
|
|
@ -8,16 +8,24 @@ BlazeComponent.extendComponent({
|
||||||
const sidebar = this.parentComponent(); // XXX for some reason not working
|
const sidebar = this.parentComponent(); // XXX for some reason not working
|
||||||
sidebar.callFirstWith(null, 'resetNextPeak');
|
sidebar.callFirstWith(null, 'resetNextPeak');
|
||||||
this.autorun(() => {
|
this.autorun(() => {
|
||||||
const mode = this.data().mode;
|
let mode = this.data().mode;
|
||||||
const capitalizedMode = Utils.capitalize(mode);
|
const capitalizedMode = Utils.capitalize(mode);
|
||||||
const id = Session.get(`current${capitalizedMode}`);
|
let thisId, searchId;
|
||||||
|
if (mode === 'linkedcard' || mode === 'linkedboard') {
|
||||||
|
thisId = Session.get('currentCard');
|
||||||
|
searchId = Cards.findOne({_id: thisId}).linkedId;
|
||||||
|
mode = mode.replace('linked', '');
|
||||||
|
} else {
|
||||||
|
thisId = Session.get(`current${capitalizedMode}`);
|
||||||
|
searchId = thisId;
|
||||||
|
}
|
||||||
const limit = this.page.get() * activitiesPerPage;
|
const limit = this.page.get() * activitiesPerPage;
|
||||||
const user = Meteor.user();
|
const user = Meteor.user();
|
||||||
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
|
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
|
||||||
if (id === null)
|
if (searchId === null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.subscribe('activities', mode, id, limit, hideSystem, () => {
|
this.subscribe('activities', mode, searchId, limit, hideSystem, () => {
|
||||||
this.loadNextPageLocked = false;
|
this.loadNextPageLocked = false;
|
||||||
|
|
||||||
// If the sibear peak hasn't increased, that mean that there are no more
|
// If the sibear peak hasn't increased, that mean that there are no more
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,11 @@ template(name="cardDetails")
|
||||||
if currentUser.isBoardMember
|
if currentUser.isBoardMember
|
||||||
+commentForm
|
+commentForm
|
||||||
if isLoaded.get
|
if isLoaded.get
|
||||||
|
if isLinkedCard
|
||||||
|
+activities(card=this mode="linkedcard")
|
||||||
|
else if isLinkedBoard
|
||||||
|
+activities(card=this mode="linkedboard")
|
||||||
|
else
|
||||||
+activities(card=this mode="card")
|
+activities(card=this mode="card")
|
||||||
|
|
||||||
template(name="editCardTitleForm")
|
template(name="editCardTitleForm")
|
||||||
|
|
|
||||||
|
|
@ -103,14 +103,12 @@ Meteor.publishRelations('board', function(boardId) {
|
||||||
const impCardId = card.linkedId;
|
const impCardId = card.linkedId;
|
||||||
this.cursor(Cards.find({ _id: impCardId }));
|
this.cursor(Cards.find({ _id: impCardId }));
|
||||||
this.cursor(CardComments.find({ cardId: impCardId }));
|
this.cursor(CardComments.find({ cardId: impCardId }));
|
||||||
this.cursor(Activities.find({ cardId: impCardId }));
|
|
||||||
this.cursor(Attachments.find({ cardId: impCardId }));
|
this.cursor(Attachments.find({ cardId: impCardId }));
|
||||||
this.cursor(Checklists.find({ cardId: impCardId }));
|
this.cursor(Checklists.find({ cardId: impCardId }));
|
||||||
this.cursor(ChecklistItems.find({ cardId: impCardId }));
|
this.cursor(ChecklistItems.find({ cardId: impCardId }));
|
||||||
} else if (card.type === 'cardType-linkedBoard') {
|
} else if (card.type === 'cardType-linkedBoard') {
|
||||||
this.cursor(Boards.find({ _id: card.linkedId}));
|
this.cursor(Boards.find({ _id: card.linkedId}));
|
||||||
}
|
}
|
||||||
this.cursor(Activities.find({ cardId }));
|
|
||||||
this.cursor(CardComments.find({ cardId }));
|
this.cursor(CardComments.find({ cardId }));
|
||||||
this.cursor(Attachments.find({ cardId }));
|
this.cursor(Attachments.find({ cardId }));
|
||||||
this.cursor(Checklists.find({ cardId }));
|
this.cursor(Checklists.find({ cardId }));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue