diff options
author | Peter Kozak <spag@golwen.net> | 2013-04-30 15:11:26 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-04-30 15:11:26 +0200 |
commit | 9a3fb878930698d5f799c92c6900060844cff6ce (patch) | |
tree | 2f1be3a17d94f4310cac25bdf1c52a63660e86ba /app | |
parent | 55763dfa7b4072cf057b72c15e68c4d6c6bc1d14 (diff) |
breadcrumbs
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/voicemail_accounts_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/voicemail_accounts_controller.rb b/app/controllers/voicemail_accounts_controller.rb index 2e96cb7..6e840fb 100644 --- a/app/controllers/voicemail_accounts_controller.rb +++ b/app/controllers/voicemail_accounts_controller.rb @@ -80,6 +80,14 @@ class VoicemailAccountsController < ApplicationController if @parent.class == User add_breadcrumb t("users.index.page_title"), tenant_users_path(@parent.current_tenant) add_breadcrumb @parent, tenant_user_path(@parent.current_tenant, @parent) + elsif @parent.class == SipAccount + if @parent.sip_accountable.class == User + add_breadcrumb t("users.index.page_title"), tenant_users_path(@parent.sip_accountable.current_tenant) + add_breadcrumb @parent.sip_accountable, tenant_user_path(@parent.sip_accountable.current_tenant, @parent.sip_accountable) + end + + add_breadcrumb t("sip_accounts.index.page_title"), method( :"#{@parent.sip_accountable.class.name.underscore}_sip_accounts_url" ).(@parent.sip_accountable) + add_breadcrumb @parent, method( :"#{@parent.sip_accountable.class.name.underscore}_sip_account_path" ).(@parent.sip_accountable, @parent) end add_breadcrumb t("voicemail_accounts.index.page_title"), method( :"#{@parent.class.name.underscore}_voicemail_accounts_url" ).(@parent) |