diff options
| author | Michel Etienne | 2014-09-22 13:44:56 +0200 |
|---|---|---|
| committer | Michel Etienne | 2014-09-22 13:44:56 +0200 |
| commit | 50a9cf10902dd32a84e5074b5d392757f120102e (patch) | |
| tree | 10bb3666331a00a7dec4190af0ef4a8d4ca72ef8 /app/helpers | |
| parent | a724576b6551e1c00a2c82dd317a87128f137ddf (diff) | |
| download | chouette-core-50a9cf10902dd32a84e5074b5d392757f120102e.tar.bz2 | |
correct breadcrumbs
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/breadcrumb_helper.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb index 3b1bcca95..23cf6a6f2 100644 --- a/app/helpers/breadcrumb_helper.rb +++ b/app/helpers/breadcrumb_helper.rb @@ -28,6 +28,8 @@ module BreadcrumbHelper connection_link_breadcrumb action when "Chouette::TimeTable" time_table_breadcrumb action + when "StopAreaCopy" + stop_area_copy_breadcrumb action when "ImportTask" import_breadcrumb action when "Export" @@ -38,6 +40,8 @@ module BreadcrumbHelper rule_parameter_breadcrumb action when "User" user_breadcrumb action + when "Organisation" + organisation_breadcrumb action else Rails.logger.info "---------" Rails.logger.info ">>>>>>> "+resource_class.to_s+" unmapped" @@ -65,6 +69,10 @@ module BreadcrumbHelper add_breadcrumb breadcrumb_label(@stop_area), referential_stop_area_path(@referential, @stop_area),:title => breadcrumb_tooltip(@stop_area) if action == :edit end + def stop_area_copy_breadcrumb(action) + stop_area_breadcrumb :edit + end + def access_point_breadcrumb(action) stop_area_breadcrumb :edit add_breadcrumb breadcrumb_label(@access_point), referential_stop_area_access_point_path(@referential, @stop_area,@access_point),:title => breadcrumb_tooltip(@access_point) if action == :edit @@ -144,12 +152,16 @@ module BreadcrumbHelper end def referential_breadcrumb (action = :edit) - add_breadcrumb I18n.t("breadcrumbs.referentials"), referentials_path - add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action != :index && @referential.present? + organisation_breadcrumb + add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action == :edit end + def organisation_breadcrumb (action = :edit) + add_breadcrumb I18n.t("breadcrumbs.referentials"), referentials_path + end + def user_breadcrumb (action) - referential_breadcrumb + organisation_breadcrumb add_breadcrumb I18n.t("breadcrumbs.users"), organisation_path unless action == :index add_breadcrumb breadcrumb_label(@user), organisation_user_path(@user),:title => breadcrumb_tooltip(@user) unless action == :index end |
