aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/compliance_control_sets_controller.rb11
-rw-r--r--app/decorators/compliance_control_set_decorator.rb7
2 files changed, 16 insertions, 2 deletions
diff --git a/app/controllers/compliance_control_sets_controller.rb b/app/controllers/compliance_control_sets_controller.rb
index 9de90c21c..1f578f781 100644
--- a/app/controllers/compliance_control_sets_controller.rb
+++ b/app/controllers/compliance_control_sets_controller.rb
@@ -23,12 +23,19 @@ class ComplianceControlSetsController < BreadcrumbController
end
end
- protected
-
def begin_of_association_chain
current_organisation
end
+ def clone
+ ComplianceControlSetCloner.new.copy(params[:id], current_organisation)
+ flash[:notice] = I18n.t("compliance_control_sets.errors.operation_in_progress")
+ redirect_to(compliance_control_sets_path)
+ end
+
+ protected
+
+
private
def decorate_compliance_control_sets(compliance_control_sets)
diff --git a/app/decorators/compliance_control_set_decorator.rb b/app/decorators/compliance_control_set_decorator.rb
index f4aa607e1..7515316ce 100644
--- a/app/decorators/compliance_control_set_decorator.rb
+++ b/app/decorators/compliance_control_set_decorator.rb
@@ -4,6 +4,13 @@ class ComplianceControlSetDecorator < Draper::Decorator
def action_links
links = []
+ # if policy.clone?
+ links << Link.new(
+ content: h.t('actions.clone'),
+ href: h.clone_compliance_control_set_path(object.id)
+ )
+ # end
+
# if h.policy(object).destroy?
links << Link.new(
content: h.destroy_link_content,