summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-08-15 23:44:07 +0300
committerLauri Ojansivu <x@xet7.org>2018-08-15 23:44:07 +0300
commitc694505885ef3ff622af92d3f03d696071013066 (patch)
treec96ab42212defccedd0ecb5814fbf30df034810f
parent807c6ce09e4b5d49049d343d73bbca24fa84d527 (diff)
parent9fc3de8502919f9aeb18c9f8ea3b0678b66ce176 (diff)
downloadwekan-c694505885ef3ff622af92d3f03d696071013066.tar.gz
wekan-c694505885ef3ff622af92d3f03d696071013066.tar.bz2
wekan-c694505885ef3ff622af92d3f03d696071013066.zip
Merge branch 'devel' of github.com:wekan/wekan into devel
-rw-r--r--client/components/activities/activities.js16
-rw-r--r--client/components/cards/cardDetails.jade7
-rw-r--r--server/publications/boards.js2
3 files changed, 18 insertions, 7 deletions
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js
index 95699961..25e151fd 100644
--- a/client/components/activities/activities.js
+++ b/client/components/activities/activities.js
@@ -8,16 +8,24 @@ BlazeComponent.extendComponent({
const sidebar = this.parentComponent(); // XXX for some reason not working
sidebar.callFirstWith(null, 'resetNextPeak');
this.autorun(() => {
- const mode = this.data().mode;
+ let mode = this.data().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 user = Meteor.user();
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
- if (id === null)
+ if (searchId === null)
return;
- this.subscribe('activities', mode, id, limit, hideSystem, () => {
+ this.subscribe('activities', mode, searchId, limit, hideSystem, () => {
this.loadNextPageLocked = false;
// If the sibear peak hasn't increased, that mean that there are no more
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade
index ac7218d4..ad2044e8 100644
--- a/client/components/cards/cardDetails.jade
+++ b/client/components/cards/cardDetails.jade
@@ -182,7 +182,12 @@ template(name="cardDetails")
if currentUser.isBoardMember
+commentForm
if isLoaded.get
- +activities(card=this mode="card")
+ if isLinkedCard
+ +activities(card=this mode="linkedcard")
+ else if isLinkedBoard
+ +activities(card=this mode="linkedboard")
+ else
+ +activities(card=this mode="card")
template(name="editCardTitleForm")
textarea.js-edit-card-title(rows='1' autofocus)
diff --git a/server/publications/boards.js b/server/publications/boards.js
index b68f7360..fb4c8c84 100644
--- a/server/publications/boards.js
+++ b/server/publications/boards.js
@@ -103,14 +103,12 @@ Meteor.publishRelations('board', function(boardId) {
const impCardId = card.linkedId;
this.cursor(Cards.find({ _id: impCardId }));
this.cursor(CardComments.find({ cardId: impCardId }));
- this.cursor(Activities.find({ cardId: impCardId }));
this.cursor(Attachments.find({ cardId: impCardId }));
this.cursor(Checklists.find({ cardId: impCardId }));
this.cursor(ChecklistItems.find({ cardId: impCardId }));
} else if (card.type === 'cardType-linkedBoard') {
this.cursor(Boards.find({ _id: card.linkedId}));
}
- this.cursor(Activities.find({ cardId }));
this.cursor(CardComments.find({ cardId }));
this.cursor(Attachments.find({ cardId }));
this.cursor(Checklists.find({ cardId }));