aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/breadcrumb_helper.rb7
-rw-r--r--app/helpers/newfront_helper.rb16
2 files changed, 16 insertions, 7 deletions
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index dc68bd897..d764ad60f 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -38,6 +38,8 @@ module BreadcrumbHelper
timeband_breadcrumb action
when 'Chouette::RoutingConstraintZone'
routing_constraint_zone_breadcrumb action
+ when 'Calendar'
+ calendar_breadcrumb action
when "StopAreaCopy"
stop_area_copy_breadcrumb action
when "Import"
@@ -70,6 +72,11 @@ module BreadcrumbHelper
end
end
+ def calendar_breadcrumb(action)
+ add_breadcrumb Calendar.model_name.human.pluralize
+ add_breadcrumb @calendar.name if %i(show edit).include? action
+ end
+
def workbench_breadcrumb(action)
add_breadcrumb I18n.t("breadcrumbs.referentials"), referentials_path
add_breadcrumb breadcrumb_label(@workbench), workbench_path(@workbench), :title => breadcrumb_tooltip(@workbench)
diff --git a/app/helpers/newfront_helper.rb b/app/helpers/newfront_helper.rb
index 2abfd589d..7bedbeea9 100644
--- a/app/helpers/newfront_helper.rb
+++ b/app/helpers/newfront_helper.rb
@@ -55,13 +55,15 @@ module NewfrontHelper
polymorph_url << action
end
- if current_referential
- polymorph_url << current_referential
- polymorph_url << item.line if item.respond_to? :line
- elsif item.respond_to? :referential
- polymorph_url << item.referential
- elsif item.respond_to? :line_referential
- polymorph_url << item.line_referential
+ unless item.class.to_s == 'Calendar'
+ if current_referential
+ polymorph_url << current_referential
+ polymorph_url << item.line if item.respond_to? :line
+ elsif item.respond_to? :referential
+ polymorph_url << item.referential
+ elsif item.respond_to? :line_referential
+ polymorph_url << item.line_referential
+ end
end
polymorph_url << item