From 82e76a100851ce62748d411c982f74c1a6366830 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 21 May 2013 14:39:25 +0200 Subject: breadcrumbs --- app/controllers/call_forwards_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/call_forwards_controller.rb b/app/controllers/call_forwards_controller.rb index 917bee3..fe54b55 100644 --- a/app/controllers/call_forwards_controller.rb +++ b/app/controllers/call_forwards_controller.rb @@ -92,6 +92,14 @@ class CallForwardsController < ApplicationController if @parent if @parent.class == PhoneNumber && @parent.phone_numberable_type == 'SipAccount' @sip_account = @parent.phone_numberable + elsif @parent.class == PhoneNumber && @parent.phone_numberable_type == 'HuntGroup' + add_breadcrumb t("hunt_groups.index.page_title"), tenant_hunt_groups_path(@parent.phone_numberable.tenant) + add_breadcrumb @parent.phone_numberable, tenant_hunt_group_path(@parent.phone_numberable.tenant, @parent.phone_numberable) + add_breadcrumb t("phone_numbers.index.page_title"), hunt_group_phone_numbers_path(@parent.phone_numberable) + add_breadcrumb @parent, hunt_group_phone_number_path(@parent.phone_numberable, @parent) + elsif @parent.class == HuntGroup + add_breadcrumb t("hunt_groups.index.page_title"), tenant_hunt_groups_path(@parent.tenant) + add_breadcrumb @parent, tenant_hunt_group_path(@parent.tenant, @parent) end if @sip_account -- cgit v1.2.3