aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/breadcrumb_helper.rb
diff options
context:
space:
mode:
authorMichel Etienne2014-09-26 11:08:43 +0200
committerMichel Etienne2014-09-26 11:08:43 +0200
commit71004ad29369bab5edb1306b1d4498d1959cc37f (patch)
tree71b5b277ab0c4f25fba6836593500ec853fb1bbb /app/helpers/breadcrumb_helper.rb
parent9437dd6a58f14f3628e7632afc3ae31af592e6d8 (diff)
downloadchouette-core-71004ad29369bab5edb1306b1d4498d1959cc37f.tar.bz2
organisation and users breadcrumbs
Diffstat (limited to 'app/helpers/breadcrumb_helper.rb')
-rw-r--r--app/helpers/breadcrumb_helper.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index 5999b6005..580847331 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -40,13 +40,17 @@ module BreadcrumbHelper
rule_parameter_breadcrumb action
when "User"
user_breadcrumb action
+ when "Referential"
+ referential_breadcrumb action
when "Organisation"
organisation_breadcrumb action
+ when "Api::V1::ApiKey"
+ referential_breadcrumb
else
Rails.logger.info "---------"
Rails.logger.info ">>>>>>> "+resource_class.to_s+" unmapped"
Rails.logger.info "---------"
- referential_breadcrumb action
+ organisation_breadcrumb :index
end
end
@@ -153,17 +157,18 @@ module BreadcrumbHelper
def referential_breadcrumb (action = :edit)
organisation_breadcrumb
- add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action == :edit
+ add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action == :edit || action == :show || action == :update
end
- def organisation_breadcrumb (action = :edit)
+ def organisation_breadcrumb (action = :index)
add_breadcrumb I18n.t("breadcrumbs.referentials"), referentials_path
+ add_breadcrumb breadcrumb_label(@organisation), organisation_path,:title => breadcrumb_tooltip(@organisation) unless action == :index
end
def user_breadcrumb (action)
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
+ add_breadcrumb breadcrumb_label(@user), organisation_user_path(@user),:title => breadcrumb_tooltip(@user) if action == :edit
end
def breadcrumb_label(obj)