aboutsummaryrefslogtreecommitdiffstats
path: root/app/decorators
diff options
context:
space:
mode:
Diffstat (limited to 'app/decorators')
-rw-r--r--app/decorators/compliance_control_set_decorator.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/decorators/compliance_control_set_decorator.rb b/app/decorators/compliance_control_set_decorator.rb
new file mode 100644
index 000000000..876a54d09
--- /dev/null
+++ b/app/decorators/compliance_control_set_decorator.rb
@@ -0,0 +1,26 @@
+class ComplianceControlSetDecorator < Draper::Decorator
+ delegate_all
+
+ def action_links
+ links = []
+
+ # if h.policy(object).destroy?
+ links << Link.new(
+ content: h.destroy_link_content,
+ href: h.compliance_control_set_path(object.id),
+ method: :delete,
+ data: { confirm: h.t('compliance_control_sets.actions.destroy_confirm') }
+ )
+ # end
+
+ # if h.policy(object).edit?
+ links << Link.new(
+ content: h.t('compliance_control_sets.actions.edit'),
+ href: h.edit_compliance_control_set_path(object.id)
+ )
+ # end
+ links
+ end
+
+end
+