aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/breadcrumb_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/breadcrumb_helper.rb')
-rw-r--r--app/helpers/breadcrumb_helper.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index 52da8b887..69494321b 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -1,6 +1,7 @@
module BreadcrumbHelper
- def build_breadcrumb(action)
+ def build_breadcrumb(action)
+ action = action.to_sym
case resource_class.to_s
when "Chouette::Network"
network_breadcrumb action
@@ -30,6 +31,8 @@ module BreadcrumbHelper
connection_link_breadcrumb action
when "Chouette::TimeTable"
time_table_breadcrumb action
+ when "Chouette::RouteSection"
+ route_section_breadcrumb action
when "Chouette::Timeband"
timeband_breadcrumb action
when "StopAreaCopy"
@@ -106,6 +109,12 @@ module BreadcrumbHelper
add_breadcrumb breadcrumb_label(@time_table), referential_time_table_path(@referential, @time_table),:title => breadcrumb_tooltip(@time_table) if action == :edit
end
+ def route_section_breadcrumb(action)
+ referential_breadcrumb
+ add_breadcrumb Chouette::RouteSection.model_name.human.pluralize, referential_route_sections_path(@referential)
+ add_breadcrumb breadcrumb_label(resource), referential_route_section_path(@referential, resource),:title => breadcrumb_tooltip(resource) if action.in?([:show, :edit])
+ end
+
def timeband_breadcrumb(action)
referential_breadcrumb
add_breadcrumb Chouette::Timeband.model_name.human(:count => 2), referential_timebands_path(@referential) unless action == :index