aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorGuillaume2017-09-14 16:28:54 +0200
committerGuillaume2017-09-14 16:28:54 +0200
commit1e58dfdbfbecccda78e2fe3854b2ba04a72bd511 (patch)
tree6d91be7604e776b2a59dc0f936543e2049bc4400 /app/helpers
parent50313a0b49c0e61ac64e0592b7c5dd3c0b6cd12e (diff)
downloadchouette-core-1e58dfdbfbecccda78e2fe3854b2ba04a72bd511.tar.bz2
create base structure for compliance_control_sets
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/breadcrumb_helper.rb7
-rw-r--r--app/helpers/compliance_control_sets_helper.rb2
-rw-r--r--app/helpers/table_builder_helper.rb1
-rw-r--r--app/helpers/table_builder_helper/url.rb2
4 files changed, 10 insertions, 2 deletions
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index 55031d4f3..a3ee9de72 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -50,6 +50,8 @@ module BreadcrumbHelper
compliance_check_breadcrumb action
when "ComplianceCheckTask"
compliance_check_task_breadcrumb action
+ when "ComplianceControlSets"
+ compliance_control_sets_breadcrumb action
when "RuleParameterSet"
rule_parameter_breadcrumb action
when "User"
@@ -239,6 +241,11 @@ module BreadcrumbHelper
add_breadcrumb breadcrumb_label(@compliance_check_task), referential_compliance_check_task_path(@referential, @compliance_check_task),:title => breadcrumb_tooltip(@compliance_check_task) if action == :edit
end
+ def compliance_control_sets_breadcrumb (action)
+ add_breadcrumb I18n.t("breadcrumbs.referentials"), workbenches_path
+ #add_breadcrumb breadcrumb_label(@workbench), workbench_path(@workbench), :title => breadcrumb_tooltip(@workbench)
+ end
+
def rule_parameter_breadcrumb (action)
organisation_breadcrumb
add_breadcrumb Referential.human_attribute_name("rule_parameter_sets"), organisation_path unless action == :index
diff --git a/app/helpers/compliance_control_sets_helper.rb b/app/helpers/compliance_control_sets_helper.rb
new file mode 100644
index 000000000..3e02e0ef7
--- /dev/null
+++ b/app/helpers/compliance_control_sets_helper.rb
@@ -0,0 +1,2 @@
+module ComplianceControlSetsHelper
+end
diff --git a/app/helpers/table_builder_helper.rb b/app/helpers/table_builder_helper.rb
index ec4d487c1..95f53a90d 100644
--- a/app/helpers/table_builder_helper.rb
+++ b/app/helpers/table_builder_helper.rb
@@ -344,7 +344,6 @@ module TableBuilderHelper
)
end
end
-
def gear_menu_link(link)
content_tag(
:li,
diff --git a/app/helpers/table_builder_helper/url.rb b/app/helpers/table_builder_helper/url.rb
index f7ba703ae..a53ac5620 100644
--- a/app/helpers/table_builder_helper/url.rb
+++ b/app/helpers/table_builder_helper/url.rb
@@ -3,7 +3,7 @@ module TableBuilderHelper
def self.polymorphic_url_parts(item, referential)
polymorph_url = []
- unless item.is_a?(Calendar) || item.is_a?(Referential)
+ unless item.is_a?(Calendar) || item.is_a?(Referential) || item.is_a?(ComplianceControlSet)
if referential
polymorph_url << referential
polymorph_url << item.line if item.respond_to? :line