summaryrefslogtreecommitdiff
path: root/app/views/call_forwards
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/call_forwards')
-rw-r--r--app/views/call_forwards/_form.html.haml2
-rw-r--r--app/views/call_forwards/_index_core.html.haml14
-rw-r--r--app/views/call_forwards/index.html.haml2
-rw-r--r--app/views/call_forwards/show.html.haml24
4 files changed, 20 insertions, 22 deletions
diff --git a/app/views/call_forwards/_form.html.haml b/app/views/call_forwards/_form.html.haml
index 58ffd78..1944fc4 100644
--- a/app/views/call_forwards/_form.html.haml
+++ b/app/views/call_forwards/_form.html.haml
@@ -1,4 +1,4 @@
-= simple_form_for([ @phone_number, @call_forward ]) do |f|
+= simple_form_for([ @parent, @call_forward ]) do |f|
= f.error_notification
= render "form_core", :f => f
diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml
index 878e0e2..48afa54 100644
--- a/app/views/call_forwards/_index_core.html.haml
+++ b/app/views/call_forwards/_index_core.html.haml
@@ -2,7 +2,7 @@
%thead
%tr
- if !@phone_number
- %th= t('call_forwards.index.phone_number_id')
+ %th= t('call_forwards.index.call_forwardable')
%th= t('call_forwards.index.call_forward_case_id')
%th= t('call_forwards.index.timeout')
%th= t('call_forwards.index.destination')
@@ -15,18 +15,18 @@
- for call_forward in call_forwards
%tr
- if !@phone_number
- %td= call_forward.phone_number
+ %td= call_forward.call_forwardable
%td= t("call_forward_cases.#{call_forward.call_forward_case.value}")
%td= call_forward.timeout
%td
= call_forward.destination
- - if call_forward.call_forwardable_type
+ - if call_forward.destinationable_type
%br
- = call_forward.call_forwardable_type
- - if call_forward.call_forwardable
- = ": #{call_forward.call_forwardable}"
+ = call_forward.destinationable_type
+ - if call_forward.destinationable_id
+ = ": #{call_forward.destinationable}"
%td= call_forward.source
- if GuiFunction.display?('depth_field_value_in_index_table', current_user)
%td= call_forward.depth
%td= call_forward.active
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.phone_number, :child => call_forward} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.call_forwardable, :child => call_forward} \ No newline at end of file
diff --git a/app/views/call_forwards/index.html.haml b/app/views/call_forwards/index.html.haml
index 91b923a..e206653 100644
--- a/app/views/call_forwards/index.html.haml
+++ b/app/views/call_forwards/index.html.haml
@@ -3,4 +3,4 @@
- if @call_forwards.count > 0
= render "index_core", :call_forwards => @call_forwards
-= render :partial => 'shared/create_link', :locals => {:parent => @phone_number, :child_class => CallForward} \ No newline at end of file
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => CallForward} \ No newline at end of file
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