diff options
| author | Marc Florisson | 2015-06-25 14:00:24 +0200 | 
|---|---|---|
| committer | Marc Florisson | 2015-06-25 14:00:52 +0200 | 
| commit | b6956559bd92344ae8e80def0902173c42b28348 (patch) | |
| tree | b079de0d79d96aa982e579b730c7a986e61e3864 | |
| parent | d516950ebf0212ccfb073bc065838fa8db34c139 (diff) | |
| download | chouette-core-b6956559bd92344ae8e80def0902173c42b28348.tar.bz2 | |
fix breadcrumps for imports. Mantis 37036
| -rw-r--r-- | app/controllers/imports_controller.rb | 4 | ||||
| -rw-r--r-- | app/helpers/breadcrumb_helper.rb | 10 | 
2 files changed, 10 insertions, 4 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index b3c04d51b..bc5aae465 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -23,7 +23,9 @@ class ImportsController < ChouetteController    def show      begin -      show! +      show! do +        build_breadcrumb :show +      end      rescue Ievkit::Error, Faraday::Error => error        logger.error("Iev failure : #{error.message}")        flash[:error] = t('iev.exception.default') diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb index 3594ac838..c98691b72 100644 --- a/app/helpers/breadcrumb_helper.rb +++ b/app/helpers/breadcrumb_helper.rb @@ -1,6 +1,6 @@  module BreadcrumbHelper -  def build_breadcrumb(action) +   def build_breadcrumb(action)      case resource_class.to_s      when "Chouette::Network"        network_breadcrumb action @@ -137,8 +137,12 @@ module BreadcrumbHelper    def import_breadcrumb (action)      referential_breadcrumb      add_breadcrumb Referential.human_attribute_name("imports"), referential_imports_path(@referential) unless action == :index -    add_breadcrumb @rule_parameter_set.import.name, compliance_check_referential_import_path(@referential, @rule_parameter_set.import.id) if action == :rule_parameter_set -    add_breadcrumb @compliance_check.name, referential_import_path(@referential, @compliance_check.id) if action == :compliance_check + +    add_breadcrumb @import.name, referential_import_path(@referential, @import.id) if @import + +    #add_breadcrumb @rule_parameter_set.import.name, compliance_check_referential_import_path(@referential, @rule_parameter_set.import.id) if action == :rule_parameter_set + +    #add_breadcrumb "Tests de conformité", compliance_check_referential_import_path(@referential, @compliance_check.id) if @compliance_check    end    def export_breadcrumb (action)  | 
