summaryrefslogtreecommitdiffstats
path: root/client/components/boards
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards')
-rw-r--r--client/components/boards/boardsList.jade2
-rw-r--r--client/components/boards/boardsList.js15
2 files changed, 17 insertions, 0 deletions
diff --git a/client/components/boards/boardsList.jade b/client/components/boards/boardsList.jade
index 89852570..109c25ed 100644
--- a/client/components/boards/boardsList.jade
+++ b/client/components/boards/boardsList.jade
@@ -22,6 +22,8 @@ template(name="boardList")
i.fa.js-star-board(
class="fa-star{{#if isStarred}} is-star-active{{else}}-o{{/if}}"
title="{{_ 'star-board-title'}}")
+ i.fa.js-clone-board(
+ class="fa-clone")
if hasSpentTimeCards
i.fa.js-has-spenttime-cards(
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index 1ed88146..68f4a1dc 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -42,6 +42,21 @@ BlazeComponent.extendComponent({
Meteor.user().toggleBoardStar(boardId);
evt.preventDefault();
},
+ 'click .js-clone-board'(evt) {
+ Meteor.call('cloneBoard',
+ this.currentData()._id,
+ Session.get('fromBoard'),
+ (err, res) => {
+ if (err) {
+ this.setError(err.error);
+ } else {
+ Session.set('fromBoard', null);
+ Utils.goBoardId(res);
+ }
+ }
+ );
+ evt.preventDefault();
+ },
'click .js-accept-invite'() {
const boardId = this.currentData()._id;
Meteor.user().removeInvite(boardId);