summaryrefslogtreecommitdiff
path: root/app/views/call_forwards
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/call_forwards
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'app/views/call_forwards')
-rw-r--r--app/views/call_forwards/_form.html.haml7
-rw-r--r--app/views/call_forwards/_form_core.html.haml15
-rw-r--r--app/views/call_forwards/_index_core.html.haml31
-rw-r--r--app/views/call_forwards/edit.html.haml3
-rw-r--r--app/views/call_forwards/index.html.haml6
-rw-r--r--app/views/call_forwards/new.html.haml3
-rw-r--r--app/views/call_forwards/show.html.haml33
7 files changed, 98 insertions, 0 deletions
diff --git a/app/views/call_forwards/_form.html.haml b/app/views/call_forwards/_form.html.haml
new file mode 100644
index 0000000..7310af3
--- /dev/null
+++ b/app/views/call_forwards/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @phone_number, @call_forward ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('call_forwards.form.submit') \ No newline at end of file
diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml
new file mode 100644
index 0000000..3dadb68
--- /dev/null
+++ b/app/views/call_forwards/_form_core.html.haml
@@ -0,0 +1,15 @@
+.inputs
+ = f.input :call_forward_case_id, :as => :select, :collection => @available_call_forward_cases.map {|x| [I18n.t("call_forward_cases.#{x.value}"), x.id] }, :label => t('call_forwards.form.call_forward_case_id.label'), :hint => conditional_hint('call_forwards.form.call_forward_case_id.hint'), :include_blank => false
+ = f.input :timeout, :label => t('call_forwards.form.timeout.label'), :hint => conditional_hint('call_forwards.form.timeout.hint')
+
+ = f.input :call_forwarding_destination , :as => :select, :collection => @call_forwarding_destinations, :label => t('call_forwards.form.call_forwarding_destination.label'), :hint => conditional_hint('call_forwards.form.call_forwarding_destination.hint'), :include_blank => false
+
+ = f.input :destination, :label => t('call_forwards.form.destination.label'), :hint => conditional_hint('call_forwards.form.destination.hint')
+
+
+ = f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint')
+ - if GuiFunction.display?('depth_field_in_call_forward_form', current_user)
+ = f.input :depth, :collection => 1..MAX_CALL_FORWARD_DEPTH, :label => t('call_forwards.form.depth.label'), :hint => conditional_hint('call_forwards.form.depth.hint')
+ - else
+ = f.hidden_field :depth
+ = f.input :active, :label => t('call_forwards.form.active.label'), :hint => conditional_hint('call_forwards.form.active.hint')
diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml
new file mode 100644
index 0000000..7733855
--- /dev/null
+++ b/app/views/call_forwards/_index_core.html.haml
@@ -0,0 +1,31 @@
+%table
+ %tr
+ - if !@phone_number
+ %th= t('call_forwards.index.phone_number_id')
+ %th= t('call_forwards.index.call_forward_case_id')
+ %th= t('call_forwards.index.timeout')
+ %th= t('call_forwards.index.destination')
+ %th= t('call_forwards.index.source')
+ - if GuiFunction.display?('depth_field_value_in_index_table', current_user)
+ %th= t('call_forwards.index.depth')
+ %th= t('call_forwards.index.active')
+
+ - reset_cycle
+ - for call_forward in call_forwards
+ %tr{:class => cycle('odd', 'even')}
+ - if !@phone_number
+ %td= call_forward.phone_number
+ %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
+ %br
+ = call_forward.call_forwardable_type
+ - if call_forward.call_forwardable
+ = ": #{call_forward.call_forwardable}"
+ %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
diff --git a/app/views/call_forwards/edit.html.haml b/app/views/call_forwards/edit.html.haml
new file mode 100644
index 0000000..5fa9dcd
--- /dev/null
+++ b/app/views/call_forwards/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("call_forwards.edit.page_title", :resource => " for phone number #{@phone_number}" )
+
+= render "form" \ No newline at end of file
diff --git a/app/views/call_forwards/index.html.haml b/app/views/call_forwards/index.html.haml
new file mode 100644
index 0000000..93d64f2
--- /dev/null
+++ b/app/views/call_forwards/index.html.haml
@@ -0,0 +1,6 @@
+- title t("call_forwards.index.page_title")
+
+- 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
diff --git a/app/views/call_forwards/new.html.haml b/app/views/call_forwards/new.html.haml
new file mode 100644
index 0000000..960a9e6
--- /dev/null
+++ b/app/views/call_forwards/new.html.haml
@@ -0,0 +1,3 @@
+- title t("call_forwards.new.page_title")
+
+= render "form"
diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml
new file mode 100644
index 0000000..6d1a0c6
--- /dev/null
+++ b/app/views/call_forwards/show.html.haml
@@ -0,0 +1,33 @@
+- title t("call_forwards.show.page_title")
+
+%p
+ %strong= t('call_forwards.show.phone_number_id') + ":"
+ = @call_forward.phone_number
+%p
+ %strong= t('call_forwards.show.call_forward_case_id') + ":"
+ = 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'
+%p
+ %strong= t('call_forwards.show.source') + ":"
+ = @call_forward.source
+%p
+ %strong= t('call_forwards.show.depth') + ":"
+ = @call_forward.depth
+%p
+ %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