diff options
| -rw-r--r-- | app/controllers/referential_stop_areas_controller.rb | 13 | ||||
| -rw-r--r-- | app/policies/route_policy.rb | 1 | ||||
| -rw-r--r-- | app/views/referential_stop_areas/edit.html.slim | 3 | ||||
| -rw-r--r-- | app/views/referential_stop_areas/index.html.slim | 1 | ||||
| -rw-r--r-- | app/views/referential_stop_areas/new.html.slim | 3 | ||||
| -rw-r--r-- | app/views/referential_stop_areas/show.html.slim | 1 | ||||
| -rw-r--r-- | config/breadcrumbs.rb | 10 | 
7 files changed, 17 insertions, 15 deletions
| diff --git a/app/controllers/referential_stop_areas_controller.rb b/app/controllers/referential_stop_areas_controller.rb index 7519418e7..78dcd6dd9 100644 --- a/app/controllers/referential_stop_areas_controller.rb +++ b/app/controllers/referential_stop_areas_controller.rb @@ -14,31 +14,26 @@ class ReferentialStopAreasController  < ChouetteController    def select_parent      @stop_area = stop_area      @parent = stop_area.parent -    build_breadcrumb :edit    end    def add_children      @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 @@ -49,7 +44,6 @@ class ReferentialStopAreasController  < ChouetteController          if collection.out_of_bounds?            redirect_to params.merge(:page => 1)          end -        build_breadcrumb :index        }      end    end @@ -57,9 +51,7 @@ class ReferentialStopAreasController  < ChouetteController    def new      @map = StopAreaMap.new( Chouette::StopArea.new).with_helpers(self)      @map.editable = true -    new! do -      build_breadcrumb :show -    end +    new!    end    def create @@ -81,8 +73,6 @@ class ReferentialStopAreasController  < ChouetteController        end        @stop_area = @stop_area.decorate - -      build_breadcrumb :show      end    end @@ -90,7 +80,6 @@ class ReferentialStopAreasController  < ChouetteController      edit! do        stop_area.position ||= stop_area.default_position        map.editable = true -      build_breadcrumb :edit     end    end diff --git a/app/policies/route_policy.rb b/app/policies/route_policy.rb index 4e4157c87..7e9fe251a 100644 --- a/app/policies/route_policy.rb +++ b/app/policies/route_policy.rb @@ -7,7 +7,6 @@ class RoutePolicy < ApplicationPolicy    def create?      !archived? && organisation_match? && user.has_permission?('routes.create') -    true    end    def destroy? diff --git a/app/views/referential_stop_areas/edit.html.slim b/app/views/referential_stop_areas/edit.html.slim index a999ab715..fc7220095 100644 --- a/app/views/referential_stop_areas/edit.html.slim +++ b/app/views/referential_stop_areas/edit.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :referential_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/referential_stop_areas/index.html.slim b/app/views/referential_stop_areas/index.html.slim index 7bf39eabd..718cbb472 100644 --- a/app/views/referential_stop_areas/index.html.slim +++ b/app/views/referential_stop_areas/index.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :referential_stop_areas, @referential  = title_tag t('stop_areas.index.title')  = search_form_for @q, :url => referential_stop_areas_path(@referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| diff --git a/app/views/referential_stop_areas/new.html.slim b/app/views/referential_stop_areas/new.html.slim index 54fd59422..87ba9b657 100644 --- a/app/views/referential_stop_areas/new.html.slim +++ b/app/views/referential_stop_areas/new.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :referential_stop_areas, @referential  = title_tag  t('stop_areas.new.title') -= render 'form'
\ No newline at end of file += render 'form' diff --git a/app/views/referential_stop_areas/show.html.slim b/app/views/referential_stop_areas/show.html.slim index fa383c82d..b9a1c9899 100644 --- a/app/views/referential_stop_areas/show.html.slim +++ b/app/views/referential_stop_areas/show.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :referential_stop_area, @referential, @stop_area  / PageHeader  = pageheader 'arret',               @stop_area.name, diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb index ed655bb31..61d1592b6 100644 --- a/config/breadcrumbs.rb +++ b/config/breadcrumbs.rb @@ -146,6 +146,16 @@ crumb :journey_patterns do |referential, route|    parent :route, referential, route  end +crumb :referential_stop_areas do |referential| +  link I18n.t('stop_areas.index.title'), referential_stop_areas_path(referential) +  parent :referential, referential +end + +crumb :referential_stop_area do |referential, stop_area| +  link stop_area.name, referential_stop_area_path(referential, stop_area) +  parent :referential_stop_areas, referential +end +  # crumb :compliance_controls do|compliance_control_sets|  #   link  #   parent :compliance_control_sets, compliance_control_sets | 
