diff options
| -rw-r--r-- | app/controllers/referential_companies_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/stop_areas_controller.rb | 14 | ||||
| -rw-r--r-- | app/views/referential_companies/index.html.slim | 1 | ||||
| -rw-r--r-- | app/views/referential_companies/new.html.slim | 3 | ||||
| -rw-r--r-- | app/views/referential_companies/show.html.slim | 1 | ||||
| -rw-r--r-- | app/views/stop_areas/edit.html.slim | 3 | ||||
| -rw-r--r-- | app/views/stop_areas/index.html.slim | 1 | ||||
| -rw-r--r-- | app/views/stop_areas/new.html.slim | 3 | ||||
| -rw-r--r-- | app/views/stop_areas/show.html.slim | 1 | ||||
| -rw-r--r-- | config/breadcrumbs.rb | 20 | 
10 files changed, 31 insertions, 18 deletions
| diff --git a/app/controllers/referential_companies_controller.rb b/app/controllers/referential_companies_controller.rb index 482f74ea0..fdbd83dc9 100644 --- a/app/controllers/referential_companies_controller.rb +++ b/app/controllers/referential_companies_controller.rb @@ -20,8 +20,6 @@ class ReferentialCompaniesController < ChouetteController        format.js {          @companies = decorate_companies(@companies)        } - -      build_breadcrumb :index      end    end diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb index cdb7c59ab..18ea33936 100644 --- a/app/controllers/stop_areas_controller.rb +++ b/app/controllers/stop_areas_controller.rb @@ -22,32 +22,27 @@ class StopAreasController < BreadcrumbController    def select_parent      @stop_area = stop_area      @parent = stop_area.parent -    build_breadcrumb :edit    end    def add_children      authorize stop_area      @stop_area = stop_area      @children = stop_area.children -    build_breadcrumb :edit    end    def add_routing_lines      @stop_area = stop_area      @lines = stop_area.routing_lines -    build_breadcrumb :edit    end    def add_routing_stops      @stop_area = stop_area -    build_breadcrumb :edit    end    def access_links      @stop_area = stop_area      @generic_access_links = stop_area.generic_access_link_matrix      @detail_access_links = stop_area.detail_access_link_matrix -    build_breadcrumb :edit    end    def index @@ -64,8 +59,6 @@ class StopAreasController < BreadcrumbController            @stop_areas,            with: StopAreaDecorator          ) - -        build_breadcrumb :index        }      end    end @@ -74,9 +67,7 @@ class StopAreasController < BreadcrumbController      authorize resource_class      @map = StopAreaMap.new( Chouette::StopArea.new).with_helpers(self)      @map.editable = true -    new! do -      build_breadcrumb :show -    end +    new!    end    def create @@ -99,8 +90,6 @@ class StopAreasController < BreadcrumbController        end        @stop_area = @stop_area.decorate - -      build_breadcrumb :show      end    end @@ -109,7 +98,6 @@ class StopAreasController < BreadcrumbController      edit! do        stop_area.position ||= stop_area.default_position        map.editable = true -      build_breadcrumb :edit     end    end diff --git a/app/views/referential_companies/index.html.slim b/app/views/referential_companies/index.html.slim index e5b7ce24a..9f5cd5d62 100644 --- a/app/views/referential_companies/index.html.slim +++ b/app/views/referential_companies/index.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :referential_companies, @referential  / PageHeader  = pageheader 'transporteur',               t('companies.index.title'), diff --git a/app/views/referential_companies/new.html.slim b/app/views/referential_companies/new.html.slim index 1acb1786f..1c7fc7297 100644 --- a/app/views/referential_companies/new.html.slim +++ b/app/views/referential_companies/new.html.slim @@ -1,2 +1,3 @@ +- breadcrumb :referential_companies, @referential  = title_tag t('companies.new.title') -= render 'form'
\ No newline at end of file += render 'form' diff --git a/app/views/referential_companies/show.html.slim b/app/views/referential_companies/show.html.slim index 1d71c778a..0dbc3cdd0 100644 --- a/app/views/referential_companies/show.html.slim +++ b/app/views/referential_companies/show.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :referential_company, @referential, @company  / PageHeader  = pageheader 'transporteur',               @company.name, diff --git a/app/views/stop_areas/edit.html.slim b/app/views/stop_areas/edit.html.slim index 170b6bd20..8005f5a08 100644 --- a/app/views/stop_areas/edit.html.slim +++ b/app/views/stop_areas/edit.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :stop_area, @stop_area_referential, @stop_area  = title_tag t('stop_areas.edit.title', stop_area: @stop_area.name ) -== render 'form'
\ No newline at end of file +== render 'form' diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim index 95b9b1b0e..4e880f7a3 100644 --- a/app/views/stop_areas/index.html.slim +++ b/app/views/stop_areas/index.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :stop_areas, @stop_area_referential  / PageHeader  = pageheader 'arret',               t('stop_areas.index.title'), diff --git a/app/views/stop_areas/new.html.slim b/app/views/stop_areas/new.html.slim index bdbd97571..e0c5b7a61 100644 --- a/app/views/stop_areas/new.html.slim +++ b/app/views/stop_areas/new.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :stop_areas, @stop_area_referential  = title_tag t('stop_areas.new.title') -== render 'form'
\ No newline at end of file +== render 'form' diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim index dce5bdbad..bc9cc2ac0 100644 --- a/app/views/stop_areas/show.html.slim +++ b/app/views/stop_areas/show.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :stop_area, @stop_area_referential, @stop_area  / PageHeader  = pageheader 'arret',               @stop_area.name, diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb index a0566e4be..66bead428 100644 --- a/config/breadcrumbs.rb +++ b/config/breadcrumbs.rb @@ -11,6 +11,16 @@ crumb :referential do |referential|    parent :workbench, referential.workbench  end +crumb :referential_companies do |referential| +  link I18n.t('companies.index.title'), referential_companies_path(referential) +  parent :referential, referential +end + +crumb :referential_company do |referential, company| +  link company.name, referential_company_path(referential, company) +  parent :referential_companies, referential +end +  crumb :time_tables do |referential|    link I18n.t('time_tables.index.title'), referential_time_tables_path(referential)    parent :referential, referential @@ -63,6 +73,16 @@ crumb :stop_area_referential do |stop_area_referential|    link I18n.t('stop_area_referentials.show.title'), stop_area_referential_path(stop_area_referential)  end +crumb :stop_areas do |stop_area_referential| +  link I18n.t('stop_areas.index.title'), stop_area_referential_stop_areas_path(stop_area_referential) +  parent :stop_area_referential, stop_area_referential +end + +crumb :stop_area do |stop_area_referential, stop_area| +  link stop_area.name, stop_area_referential_stop_area_path(stop_area_referential, stop_area) +  parent :stop_areas, stop_area_referential +end +  crumb :line_referential do |line_referential|    link I18n.t('line_referentials.show.title'), line_referential_path(line_referential)  end | 
