From f7c74269723c8920044def1617516f53a5393eb1 Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Thu, 11 Sep 2014 13:32:55 +0200 Subject: insert breadcrumb --- app/controllers/journey_patterns_controller.rb | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'app/controllers/journey_patterns_controller.rb') diff --git a/app/controllers/journey_patterns_controller.rb b/app/controllers/journey_patterns_controller.rb index 0274b9b71..084f34b03 100644 --- a/app/controllers/journey_patterns_controller.rb +++ b/app/controllers/journey_patterns_controller.rb @@ -27,7 +27,28 @@ class JourneyPatternsController < ChouetteController def show @map = JourneyPatternMap.new(journey_pattern).with_helpers(self) @stop_points = journey_pattern.stop_points.paginate(:page => params[:page]) - show! + show! do + add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential) + add_breadcrumb @line.name, referential_line_path(@referential, @line) + add_breadcrumb @route.name, referential_line_route_path(@referential, @line, @route) + end + end + + def new + new! do + add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential) + add_breadcrumb @line.name, referential_line_path(@referential, @line) + add_breadcrumb @route.name, referential_line_route_path(@referential, @line, @route) + end + end + + def edit + edit! do + add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential) + add_breadcrumb @line.name, referential_line_path(@referential, @line) + add_breadcrumb @route.name, referential_line_route_path(@referential, @line, @route) + add_breadcrumb @journey_pattern.name, referential_line_route_journey_pattern_path(@referential, @line, @route, @journey_pattern) + end end def new_vehicle_journey -- cgit v1.2.3