summaryrefslogtreecommitdiff
path: root/app/views/automatic_call_distributors
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
commiteaad37485fe59d0306c37cc038dda6d210052910 (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/automatic_call_distributors
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
parentb80bd744ad873f6fc43018bc4bfb90677de167bd (diff)
Merge branch 'develop'
Diffstat (limited to 'app/views/automatic_call_distributors')
-rw-r--r--app/views/automatic_call_distributors/_form.html.haml8
-rw-r--r--app/views/automatic_call_distributors/_form_core.html.haml16
-rw-r--r--app/views/automatic_call_distributors/_index_core.html.haml39
-rw-r--r--app/views/automatic_call_distributors/edit.html.haml3
-rw-r--r--app/views/automatic_call_distributors/index.html.haml6
-rw-r--r--app/views/automatic_call_distributors/new.html.haml3
-rw-r--r--app/views/automatic_call_distributors/show.html.haml59
7 files changed, 134 insertions, 0 deletions
diff --git a/app/views/automatic_call_distributors/_form.html.haml b/app/views/automatic_call_distributors/_form.html.haml
new file mode 100644
index 0000000..fcf133c
--- /dev/null
+++ b/app/views/automatic_call_distributors/_form.html.haml
@@ -0,0 +1,8 @@
+= simple_form_for([@parent, @automatic_call_distributor]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f, :join_on => @join_on, :leave_on => @leave_on, :strategies => @strategies
+
+
+ .actions
+ = f.button :submit, conditional_t('automatic_call_distributors.form.submit') \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/_form_core.html.haml b/app/views/automatic_call_distributors/_form_core.html.haml
new file mode 100644
index 0000000..77a38a6
--- /dev/null
+++ b/app/views/automatic_call_distributors/_form_core.html.haml
@@ -0,0 +1,16 @@
+.inputs
+ = f.input :name, :label => t('automatic_call_distributors.form.name.label'), :hint => conditional_hint('automatic_call_distributors.form.name.hint')
+ = f.input :strategy, :label => t('automatic_call_distributors.form.strategy.label'), :hint => conditional_hint('automatic_call_distributors.form.strategy.hint'), :include_blank => false, :as => :select, :collection => strategies
+ = f.input :max_callers, :label => t('automatic_call_distributors.form.max_callers.label'), :hint => conditional_hint('automatic_call_distributors.form.max_callers.hint')
+ = f.input :agent_timeout, :label => t('automatic_call_distributors.form.agent_timeout.label'), :hint => conditional_hint('automatic_call_distributors.form.agent_timeout.hint')
+ = f.input :retry_timeout, :label => t('automatic_call_distributors.form.retry_timeout.label'), :hint => conditional_hint('automatic_call_distributors.form.retry_timeout.hint')
+ = f.input :join, :label => t('automatic_call_distributors.form.join.label'), :hint => conditional_hint('automatic_call_distributors.form.join.hint'), :include_blank => false, :as => :select, :collection => join_on
+ = f.input :leave, :label => t('automatic_call_distributors.form.leave.label'), :hint => conditional_hint('automatic_call_distributors.form.leave.hint'), :include_blank => false, :as => :select, :collection => leave_on
+
+ = f.input :announce_position, :label => t('automatic_call_distributors.form.announce_position.label'), :hint => conditional_hint('automatic_call_distributors.announce_position.hint'), :collection => [[t('automatic_call_distributors.announce_position.on_change_only'), 0],[t('automatic_call_distributors.announce_position.never'), nil],[t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 30), 30],[t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 60), 60], [t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 120), 120], [t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 300), 300], [t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 600), 600]], :include_blank => false
+
+ = f.input :announce_call_agents, :label => t('automatic_call_distributors.form.announce_call_agents.label'), :hint => conditional_hint('automatic_call_distributors.form.announce_call_agents.hint')
+ = f.input :greeting, :label => t('automatic_call_distributors.form.greeting.label'), :hint => conditional_hint('automatic_call_distributors.form.greeting.hint')
+ = f.input :goodbye, :label => t('automatic_call_distributors.form.goodbye.label'), :hint => conditional_hint('automatic_call_distributors.form.goodbye.hint')
+ = f.input :music, :label => t('automatic_call_distributors.form.music.label'), :hint => conditional_hint('automatic_call_distributors.form.music.hint')
+ \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml
new file mode 100644
index 0000000..c31a648
--- /dev/null
+++ b/app/views/automatic_call_distributors/_index_core.html.haml
@@ -0,0 +1,39 @@
+%table
+ %tr
+ %th= t('automatic_call_distributors.index.name')
+ %th= t('automatic_call_distributors.index.strategy')
+ %th= t('automatic_call_distributors.index.max_callers')
+ %th= t('automatic_call_distributors.index.agent_timeout')
+ %th= t('automatic_call_distributors.index.retry_timeout')
+ %th= t('automatic_call_distributors.index.join')
+ %th= t('automatic_call_distributors.index.leave')
+ %th= t('automatic_call_distributors.index.phone_numbers')
+ %th= t('automatic_call_distributors.index.acd_agents')
+
+ - reset_cycle
+ - for automatic_call_distributor in automatic_call_distributors
+ %tr{:class => cycle('odd', 'even')}
+ %td= automatic_call_distributor.name
+ %td= t("automatic_call_distributors.strategies.#{automatic_call_distributor.strategy}")
+ %td= automatic_call_distributor.max_callers
+ %td= automatic_call_distributor.agent_timeout
+ %td= automatic_call_distributor.retry_timeout
+ %td= t("automatic_call_distributors.join_on.#{automatic_call_distributor.join}")
+ %td= t("automatic_call_distributors.leave_on.#{automatic_call_distributor.leave}")
+
+ %td
+ - if automatic_call_distributor.phone_numbers.count > 0
+ = render 'phone_numbers/listing', :phone_numbers => automatic_call_distributor.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => automatic_call_distributor, :child_class => PhoneNumber, :short_link => true}
+
+ %td
+ - if automatic_call_distributor.acd_agents.count > 3
+ = link_to automatic_call_distributor.acd_agents.count, automatic_call_distributor_acd_agents_path(automatic_call_distributor)
+ %br
+ - elsif automatic_call_distributor.acd_agents.count > 0
+ = render 'acd_agents/listing', :acd_agents => automatic_call_distributor.acd_agents
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => automatic_call_distributor, :child_class => AcdAgent, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => automatic_call_distributor.automatic_call_distributorable, :child => automatic_call_distributor} \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/edit.html.haml b/app/views/automatic_call_distributors/edit.html.haml
new file mode 100644
index 0000000..28cba74
--- /dev/null
+++ b/app/views/automatic_call_distributors/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("automatic_call_distributors.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/index.html.haml b/app/views/automatic_call_distributors/index.html.haml
new file mode 100644
index 0000000..f3f8b2b
--- /dev/null
+++ b/app/views/automatic_call_distributors/index.html.haml
@@ -0,0 +1,6 @@
+- title t("automatic_call_distributors.index.page_title")
+
+- if @automatic_call_distributors && @automatic_call_distributors.count > 0
+ = render "index_core", :automatic_call_distributors => @automatic_call_distributors
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => AutomaticCallDistributor}
diff --git a/app/views/automatic_call_distributors/new.html.haml b/app/views/automatic_call_distributors/new.html.haml
new file mode 100644
index 0000000..96a2d93
--- /dev/null
+++ b/app/views/automatic_call_distributors/new.html.haml
@@ -0,0 +1,3 @@
+- title t("automatic_call_distributors.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/show.html.haml b/app/views/automatic_call_distributors/show.html.haml
new file mode 100644
index 0000000..e5bf785
--- /dev/null
+++ b/app/views/automatic_call_distributors/show.html.haml
@@ -0,0 +1,59 @@
+- title t("automatic_call_distributors.show.page_title")
+
+%table
+ %tr
+ %th= t('automatic_call_distributors.show.uuid') + ":"
+ %td= @automatic_call_distributor.uuid
+ %tr
+ %th= t('automatic_call_distributors.show.name') + ":"
+ %td= @automatic_call_distributor.name
+ %tr
+ %th= t('automatic_call_distributors.show.strategy') + ":"
+ %td= t("automatic_call_distributors.strategies.#{@automatic_call_distributor.strategy}")
+ %tr
+ %th= t('automatic_call_distributors.show.max_callers') + ":"
+ %td= @automatic_call_distributor.max_callers
+ %tr
+ %th= t('automatic_call_distributors.show.agent_timeout') + ":"
+ %td= @automatic_call_distributor.agent_timeout
+ %tr
+ %th= t('automatic_call_distributors.show.retry_timeout') + ":"
+ %td= @automatic_call_distributor.retry_timeout
+ %tr
+ %th= t('automatic_call_distributors.show.join') + ":"
+ %td= t("automatic_call_distributors.join_on.#{@automatic_call_distributor.join}")
+ %tr
+ %th= t('automatic_call_distributors.show.leave') + ":"
+ %td= t("automatic_call_distributors.leave_on.#{@automatic_call_distributor.leave}")
+
+ %tr
+ %th= t('automatic_call_distributors.show.announce_position') + ":"
+ %td= @automatic_call_distributor.announce_position
+
+ %tr
+ %th= t('automatic_call_distributors.show.announce_call_agents') + ":"
+ %td= @automatic_call_distributor.announce_call_agents
+
+ %tr
+ %th= t('automatic_call_distributors.show.greeting') + ":"
+ %td= @automatic_call_distributor.greeting
+
+ %tr
+ %th= t('automatic_call_distributors.show.goodbye') + ":"
+ %td= @automatic_call_distributor.goodbye
+
+ %tr
+ %th= t('automatic_call_distributors.show.music') + ":"
+ %td= @automatic_call_distributor.music
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @automatic_call_distributor.automatic_call_distributorable, :child => @automatic_call_distributor }
+
+- if can?( :index, @automatic_call_distributor.phone_numbers )
+ %h3= t('automatic_call_distributors.index.phone_numbers')
+ = render 'phone_numbers/index_core', :phone_numbers => @automatic_call_distributor.phone_numbers
+ = render :partial => 'shared/create_link', :locals => {:parent => @automatic_call_distributor, :child_class => PhoneNumber, :short_link => true}
+
+- if can?( :index, @automatic_call_distributor.acd_agents )
+ %h3= t('automatic_call_distributors.index.acd_agents')
+ = render 'acd_agents/index_core', :acd_agents => @automatic_call_distributor.acd_agents
+ = render :partial => 'shared/create_link', :locals => {:parent => @automatic_call_distributor, :child_class => AcdAgent, :short_link => true}