From 7dffc568049e95665293711e0dde43b0fb2d8e15 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Thu, 17 May 2018 14:28:34 +0100 Subject: [PATCH] Clone project action button --- services/web/app/views/project/list/item.pug | 1 + .../web/public/coffee/main/project-list/project-list.coffee | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/services/web/app/views/project/list/item.pug b/services/web/app/views/project/list/item.pug index 2f008101f9..a5362ebfd7 100644 --- a/services/web/app/views/project/list/item.pug +++ b/services/web/app/views/project/list/item.pug @@ -53,6 +53,7 @@ if settings.overleaf tooltip=translate('copy'), tooltip-placement="top", tooltip-append-to-body="true", + ng-click="clone($event)" ) i.icon.fa.fa-files-o button.btn.btn-link.action-btn( diff --git a/services/web/public/coffee/main/project-list/project-list.coffee b/services/web/public/coffee/main/project-list/project-list.coffee index f458ebd15c..72074a19b9 100644 --- a/services/web/public/coffee/main/project-list/project-list.coffee +++ b/services/web/public/coffee/main/project-list/project-list.coffee @@ -493,6 +493,10 @@ define [ if value? $scope.updateSelectedProjects() + $scope.clone = (e) -> + e.stopPropagation() + $scope.cloneProject($scope.project, "#{$scope.project.name} (Copy)") + $scope.download = (e) -> e.stopPropagation() $scope.downloadProjectsById([$scope.project.id])