diff options
| author | Michel Etienne | 2014-12-19 18:54:13 +0100 | 
|---|---|---|
| committer | Michel Etienne | 2014-12-19 18:54:13 +0100 | 
| commit | 3156f45338240b9e153028cfaf0e364a4d2d558a (patch) | |
| tree | 412161f8358f7d1134a8f466321c2fcaa5c9e44a /app/views | |
| parent | 29e1a1e015d9986bb01e95324c282749873f1921 (diff) | |
| parent | e632a4634b1762f4c73d11f1e5b127de9832a1ff (diff) | |
| download | chouette-core-3156f45338240b9e153028cfaf0e364a4d2d558a.tar.bz2 | |
Merge branch 'V2_5' of github.com:afimb/chouette2 into V2_5
Diffstat (limited to 'app/views')
3 files changed, 12 insertions, 5 deletions
diff --git a/app/views/compliance_check_tasks/detailed_errors_index.csv.erb b/app/views/compliance_check_tasks/detailed_errors_index.csv.erb index 527e35532..339210f92 100644 --- a/app/views/compliance_check_tasks/detailed_errors_index.csv.erb +++ b/app/views/compliance_check_tasks/detailed_errors_index.csv.erb @@ -1,2 +1,2 @@ -<%= ComplianceCheckResult.human_attribute_name(:severity) %>;<%= ComplianceCheckResult.human_attribute_name(:status) %>;<%= ComplianceCheckResult.human_attribute_name(:rule_code) %>;<%= ComplianceCheckResult.human_attribute_name(:detail) %>;<%= ComplianceCheckResult.human_attribute_name(:url) %>;<%= ComplianceCheckResult.human_attribute_name(:violation_count) %>;<%= ComplianceCheckResult.human_attribute_name(:first_violations) %> -<% @compliance_check_task.compliance_check_results.each do |r| %><% if r.detail.present? %><% r.detail["detail"].first(10).each do |error| %><% case  r.severity %><% when "warning" %><%= I18n.t "compliance_check_result.severities.warning" %><% when "error" %><%= I18n.t "compliance_check_result.severities.error" %><% end %>;<%= r.status %>;<%= r.rule_code %>;<%= ComplianceCheckResult.human_attribute_name(r.rule_code) %>;<%= Rails.application.config.validation_spec + I18n.locale.to_s + "/" + r.rule_code + ".html" %>;<%= r.violation_count %>;<% if error["messageArgs"] %><%= ComplianceCheckResult.human_attribute_name(r.rule_code) + I18n.t("compliance_check_result.details." + error["messageKey"], error["messageArgs"].symbolize_keys ) %><% else %><%= ComplianceCheckResult.human_attribute_name(r.rule_code) + I18n.t("compliance_check_result.details." + error["messageKey"] ) %><% end %><%= "\n" %><% end %><% end %><% end %>
\ No newline at end of file +<%= ComplianceCheckResult.human_attribute_name(:severity) %>;<%= ComplianceCheckResult.human_attribute_name(:rule_code) %>;<%= ComplianceCheckResult.human_attribute_name(:object) %>;<%= ComplianceCheckResult.human_attribute_name(:resource) %>;<%= ComplianceCheckResult.human_attribute_name(:detail) %>; +<% @compliance_check_task.compliance_check_results.each do |r| %><% if r.detail.present? %><% r.detail["detail"].first(10).each do |error| %><% case  r.severity %><% when "warning" %><%= I18n.t "compliance_check_result.severities.warning" %><% when "error" %><%= I18n.t "compliance_check_result.severities.error" %><% end %>;<%= r.rule_code %>;<% if error["messageArgs"] %><%= error["messageArgs"]["objectId"] %><% end %>;<% if error["location"]["url"].present? %><%= "http://#{request.host}:#{request.port}#{request.fullpath.sub(/(compliance_check_tasks.*)/, '')}" + error["location"]["url"] %><% elsif error["location"]["filename"].present? %><%= error["objectId"] + " - " %><%= File.basename(error["location"]["filename"]) +" - " %><%= I18n.t "compliance_check_results.index.column" %>: <%= error["location"]["columnNumber"] %>, <%= I18n.t "compliance_check_results.index.line" %>: <%= error["location"]["lineNumber"] %><% end %>;<% if error["messageArgs"] %><%= ComplianceCheckResult.human_attribute_name(r.rule_code) + " " + I18n.t("compliance_check_result.details." + error["messageKey"], error["messageArgs"].symbolize_keys ) %><% else %> <<%=  ComplianceCheckResult.human_attribute_name(r.rule_code) + " " + I18n.t("compliance_check_result.details." + error["messageKey"] ) %><% end %><%= "\n" %><% end %><% end %><% end %>
\ No newline at end of file diff --git a/app/views/compliance_check_tasks/show.html.erb b/app/views/compliance_check_tasks/show.html.erb index 2fa39ff6f..d41e0da1d 100644 --- a/app/views/compliance_check_tasks/show.html.erb +++ b/app/views/compliance_check_tasks/show.html.erb @@ -9,6 +9,14 @@       <% if @compliance_check_task.rule_parameter_set_archived %>         <%= link_to image_tag('icons/link_page.png') + t("compliance_check_tasks.rule_parameter_set"), rule_parameter_set_referential_compliance_check_task_path(@compliance_check_task.referential, @compliance_check_task) %>       <% end %> +     <div class="btn-group pull-right"> +       <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> +         <%= t(".export") %> <span class="caret"></span> +       </button> +       <ul class="dropdown-menu" role="menu"> +         <li><%= link_to t(".export_csv"), export_referential_compliance_check_task_path(@compliance_check_task.referential, @compliance_check_task)   %></li> +       </ul> +     </div>       </div>    <% if @compliance_check_task.status == 'completed'%>     <div class="resume"> @@ -31,7 +39,6 @@  </div>  <% content_for :sidebar do %>  <ul class="actions"> -  <li><%= link_to t('compliance_check_tasks.actions.download'), export_referential_compliance_check_task_path(@referential, @compliance_check_task) %></il>    <li><%= link_to  t('compliance_check_tasks.actions.destroy'), referential_compliance_check_task_path(@referential, @compliance_check_task), :method => :delete,  :data => {:confirm =>  t('compliance_check_tasks.actions.destroy_confirm')}, :class => "remove" %></li>  </ul> diff --git a/app/views/compliance_check_tasks/summary_errors_index.csv.erb b/app/views/compliance_check_tasks/summary_errors_index.csv.erb index 516cb1b93..e51ad28c2 100644 --- a/app/views/compliance_check_tasks/summary_errors_index.csv.erb +++ b/app/views/compliance_check_tasks/summary_errors_index.csv.erb @@ -1,3 +1,3 @@ -<%= ComplianceCheckResult.human_attribute_name(:severity) %>;<%= ComplianceCheckResult.human_attribute_name(:status) %>;<%= ComplianceCheckResult.human_attribute_name(:rule_code) %>;<%= ComplianceCheckResult.human_attribute_name(:detail) %>;<%= ComplianceCheckResult.human_attribute_name(:url) %>;<%= ComplianceCheckResult.human_attribute_name(:violation_count) %> -<% @compliance_check_task.compliance_check_results.each do |r| %><% case  r.severity %><% when "warning" %><%= I18n.t "compliance_check_result.severities.warning" %><% when "error" %><%= I18n.t "compliance_check_result.severities.error" %><% end %>;<%= r.status %>;<%= r.rule_code %>;<%= ComplianceCheckResult.human_attribute_name(r.rule_code) %>;<%= Rails.application.config.validation_spec + I18n.locale.to_s + "/" + r.rule_code + ".html" %>;<%= r.violation_count %> +<%= ComplianceCheckResult.human_attribute_name(:severity) %>;<%= ComplianceCheckResult.human_attribute_name(:status) %>;<%= ComplianceCheckResult.human_attribute_name(:rule_code) %>;<%= ComplianceCheckResult.human_attribute_name(:detail) %>;<%= ComplianceCheckResult.human_attribute_name(:url) %>;<%= ComplianceCheckResult.human_attribute_name(:violation_count) %>;<%= ComplianceCheckResult.human_attribute_name(:objects) %> +<% @compliance_check_task.compliance_check_results.each do |r| %><% case  r.severity %><% when "warning" %><%= I18n.t "compliance_check_result.severities.warning" %><% when "error" %><%= I18n.t "compliance_check_result.severities.error" %><% end %>;<%= r.status %>;<%= r.rule_code %>;<%= ComplianceCheckResult.human_attribute_name(r.rule_code) %>;<%= Rails.application.config.validation_spec + I18n.locale.to_s + "/" + r.rule_code + ".html" %>;<%= r.violation_count %><% if r.violation_count > 0 %><% if r.detail.present? %>;<% r.detail["detail"].first(10).each do |error| %><% if error["messageArgs"] %><%= error["messageArgs"]["objectId"] + " " %><% else %><%= " " %><% end %><% end %><% end %><% end %>  <% end %>
\ No newline at end of file  | 
