summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorXavier Priour <xavier.priour@bubblyware.com>2015-10-19 00:59:50 +0200
committerXavier Priour <xavier.priour@bubblyware.com>2015-10-19 00:59:50 +0200
commit4540bd36c4b07080ea5d29f0fb31bb20e637c2d5 (patch)
tree7507c46e6ac2cdc7c7780bf81a370f9aecb4aff4 /client
parent469d47cd9f6e92518beb5f28cc7e755bf2ae1578 (diff)
downloadwekan-4540bd36c4b07080ea5d29f0fb31bb20e637c2d5.tar.gz
wekan-4540bd36c4b07080ea5d29f0fb31bb20e637c2d5.tar.bz2
wekan-4540bd36c4b07080ea5d29f0fb31bb20e637c2d5.zip
Import board: import comments and log activities
Diffstat (limited to 'client')
-rw-r--r--client/components/activities/activities.jade56
-rw-r--r--client/components/activities/activities.js17
-rw-r--r--client/components/import/import.js2
3 files changed, 46 insertions, 29 deletions
diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade
index c611ad75..28a9f9c9 100644
--- a/client/components/activities/activities.jade
+++ b/client/components/activities/activities.jade
@@ -14,41 +14,56 @@ template(name="boardActivities")
p.activity-desc
+memberName(user=user)
- if($eq activityType 'createBoard')
- | {{_ 'activity-created' boardLabel}}.
+ if($eq activityType 'addAttachment')
+ | {{{_ 'activity-attached' attachmentLink cardLink}}}.
- if($eq activityType 'createList')
- | {{_ 'activity-added' list.title boardLabel}}.
+ if($eq activityType 'addBoardMember')
+ | {{{_ 'activity-added' memberLink boardLabel}}}.
+
+ if($eq activityType 'addComment')
+ | {{{_ 'activity-on' cardLink}}}
+ a.activity-comment(href="{{ card.absoluteUrl }}")
+ +viewer
+ = comment.text
+
+ if($eq activityType 'archivedCard')
+ | {{{_ 'activity-archived' cardLink}}}.
if($eq activityType 'archivedList')
| {{_ 'activity-archived' list.title}}.
+ if($eq activityType 'createBoard')
+ | {{_ 'activity-created' boardLabel}}.
+
if($eq activityType 'createCard')
| {{{_ 'activity-added' cardLink boardLabel}}}.
+ if($eq activityType 'createList')
+ | {{_ 'activity-added' list.title boardLabel}}.
+
+ if($eq activityType 'importBoard')
+ | {{{_ 'activity-imported-board' boardLabel sourceLink}}}.
+
if($eq activityType 'importCard')
| {{{_ 'activity-imported' cardLink boardLabel sourceLink}}}.
- if($eq activityType 'archivedCard')
- | {{{_ 'activity-archived' cardLink}}}.
+ if($eq activityType 'importList')
+ | {{{_ 'activity-imported' listLabel boardLabel sourceLink}}}.
- if($eq activityType 'restoredCard')
- | {{{_ 'activity-sent' cardLink boardLabel}}}.
+ if($eq activityType 'joinMember')
+ if($eq currentUser._id member._id)
+ | {{{_ 'activity-joined' cardLink}}}.
+ else
+ | {{{_ 'activity-added' memberLink cardLink}}}.
if($eq activityType 'moveCard')
| {{{_ 'activity-moved' cardLink oldList.title list.title}}}.
- if($eq activityType 'addBoardMember')
- | {{{_ 'activity-added' memberLink boardLabel}}}.
-
if($eq activityType 'removeBoardMember')
| {{{_ 'activity-excluded' memberLink boardLabel}}}.
- if($eq activityType 'joinMember')
- if($eq currentUser._id member._id)
- | {{{_ 'activity-joined' cardLink}}}.
- else
- | {{{_ 'activity-added' memberLink cardLink}}}.
+ if($eq activityType 'restoredCard')
+ | {{{_ 'activity-sent' cardLink boardLabel}}}.
if($eq activityType 'unjoinMember')
if($eq currentUser._id member._id)
@@ -56,15 +71,6 @@ template(name="boardActivities")
else
| {{{_ 'activity-removed' memberLink cardLink}}}.
- if($eq activityType 'addComment')
- | {{{_ 'activity-on' cardLink}}}
- a.activity-comment(href="{{ card.absoluteUrl }}")
- +viewer
- = comment.text
-
- if($eq activityType 'addAttachment')
- | {{{_ 'activity-attached' attachmentLink cardLink}}}.
-
span.activity-meta {{ moment createdAt }}
template(name="cardActivities")
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js
index b80493f7..b25c0ca8 100644
--- a/client/components/activities/activities.js
+++ b/client/components/activities/activities.js
@@ -60,11 +60,22 @@ BlazeComponent.extendComponent({
}, card.title));
},
+ listLabel() {
+ return this.currentData().list().title;
+ },
+
sourceLink() {
const source = this.currentData().source;
- return source && Blaze.toHTML(HTML.A({
- href: source.url,
- }, source.system));
+ if(source) {
+ if(source.url) {
+ return Blaze.toHTML(HTML.A({
+ href: source.url,
+ }, source.system));
+ } else {
+ return source.system;
+ }
+ }
+ return null;
},
memberLink() {
diff --git a/client/components/import/import.js b/client/components/import/import.js
index a2972562..00918aac 100644
--- a/client/components/import/import.js
+++ b/client/components/import/import.js
@@ -46,7 +46,7 @@ const ImportPopup = BlazeComponent.extendComponent({
onFinish() {
Popup.close();
- }
+ },
});
ImportPopup.extendComponent({