aboutsummaryrefslogtreecommitdiffstats
path: root/app/decorators
diff options
context:
space:
mode:
authorGuillaume2017-09-14 16:28:54 +0200
committerGuillaume2017-09-14 16:28:54 +0200
commit1e58dfdbfbecccda78e2fe3854b2ba04a72bd511 (patch)
tree6d91be7604e776b2a59dc0f936543e2049bc4400 /app/decorators
parent50313a0b49c0e61ac64e0592b7c5dd3c0b6cd12e (diff)
downloadchouette-core-1e58dfdbfbecccda78e2fe3854b2ba04a72bd511.tar.bz2
create base structure for compliance_control_sets
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
+