aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMichel Etienne2014-02-20 11:10:49 +0100
committerMichel Etienne2014-02-20 11:10:49 +0100
commit67aabcbbb2ecc8d47f0b650acf2399d9a6fe700a (patch)
tree0e3686e3232c7b6e8c70160ec688281dacf36c0f /app
parentaf01ef8c87f149748a20b107c64abedee64efb63 (diff)
downloadchouette-core-67aabcbbb2ecc8d47f0b650acf2399d9a6fe700a.tar.bz2
add link to validation specification pages
Diffstat (limited to 'app')
-rw-r--r--app/helpers/compliance_check_results_helper.rb4
-rw-r--r--app/views/compliance_check_results/index.html.erb2
2 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/compliance_check_results_helper.rb b/app/helpers/compliance_check_results_helper.rb
index a24cbaa23..c2099562a 100644
--- a/app/helpers/compliance_check_results_helper.rb
+++ b/app/helpers/compliance_check_results_helper.rb
@@ -10,4 +10,8 @@ module ComplianceCheckResultsHelper
end
end
+ def test_definition (compliance_check_result_code)
+ Rails.application.config.validation_spec + I18n.locale.to_s + "/" + compliance_check_result_code +".html"
+ end
+
end
diff --git a/app/views/compliance_check_results/index.html.erb b/app/views/compliance_check_results/index.html.erb
index 532e32be0..3a73f2146 100644
--- a/app/views/compliance_check_results/index.html.erb
+++ b/app/views/compliance_check_results/index.html.erb
@@ -18,7 +18,7 @@
<td><%= t compliance_check_result.severity, :scope => "compliance_check_result.severities" %></td>
<td>
<%= image_tag "icons/notice.png", :"data-content" => ComplianceCheckResult.human_attribute_name(compliance_check_result.rule_code), :"data-title" => t("activerecord.attributes.compliance_check_result.detail"), :class =>"notice" %>
- <%= link_to compliance_check_result.rule_code, "#", :title => ComplianceCheckResult.human_attribute_name(compliance_check_result.rule_code) %></td>
+ <%= link_to compliance_check_result.rule_code, test_definition(compliance_check_result.rule_code), :title => ComplianceCheckResult.human_attribute_name(compliance_check_result.rule_code), :target => "validation" %></td>
<% if @compliance_check_results && @compliance_check_results.first.status == "nok" %>
<td class="td_error">
<% if compliance_check_result.detail.present? %>