summaryrefslogtreecommitdiff
path: root/app/views/call_forwards/show.html.haml
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-02-25 09:29:40 -0500
committerPeter Kozak <spag@golwen.net>2013-02-25 09:29:40 -0500
commit0442cd19bc9383669b506185356227361a16e442 (patch)
treefd6c9f9220ace7a58bd723e9a7103834a695770c /app/views/call_forwards/show.html.haml
parent5dcdeb1c1f8c53fd80a0443d61a289e583091416 (diff)
call_forwards - polymorphism added
Diffstat (limited to 'app/views/call_forwards/show.html.haml')
-rw-r--r--app/views/call_forwards/show.html.haml24
1 files changed, 11 insertions, 13 deletions
diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml
index c2187b1..9f9d27a 100644
--- a/app/views/call_forwards/show.html.haml
+++ b/app/views/call_forwards/show.html.haml
@@ -1,25 +1,23 @@
- content_for :title, t("call_forwards.show.page_title")
%p
- %strong= t('call_forwards.show.phone_number_id') + ":"
- = @call_forward.phone_number
+ %strong= t('call_forwards.show.call_forwardable') + ":"
+ = "#{@call_forward.call_forwardable_type}: #{@call_forward.call_forwardable}"
%p
- %strong= t('call_forwards.show.call_forward_case_id') + ":"
+ %strong= t('call_forwards.show.call_forward_case') + ":"
= t("call_forward_cases.#{@call_forward.call_forward_case.value}")
%p
%strong= t('call_forwards.show.timeout') + ":"
= @call_forward.timeout
%p
%strong= t('call_forwards.show.destination') + ":"
- = @call_forward.destination
-- if @call_forward.call_forwardable_type == 'HuntGroup' && @call_forward.call_forwardable.class == HuntGroup
- %p
- %strong= t('call_forwards.show.hunt_group') + ":"
- = @call_forward.call_forwardable
-- if @call_forward.call_forwardable_type == 'Voicemail'
- %p
- %strong= t('call_forwards.show.to_voicemail') + ":"
- = 'active'
+ - if @call_forward.destinationable_id && @call_forward.destinationable
+ = "#{@call_forward.destinationable_type}: #{@call_forward.destinationable}"
+ - elsif !@call_forward.destinationable_type.blank?
+ = "#{@call_forward.destinationable_type}: #{@call_forward.destination}"
+ - else
+ = @call_forward.destination
+
%p
%strong= t('call_forwards.show.source') + ":"
= @call_forward.source
@@ -30,4 +28,4 @@
%strong= t('call_forwards.show.active') + ":"
= @call_forward.active
-= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number, :child => @call_forward } \ No newline at end of file
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @call_forward } \ No newline at end of file