summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/call_forwards/_form_core.html.haml4
-rw-r--r--app/views/call_histories/_index_core.html.haml5
-rw-r--r--app/views/cdrs/_index_core.html.haml33
-rw-r--r--app/views/cdrs/index.html.haml4
-rw-r--r--app/views/config_snom/snom_phone.xml.haml (renamed from app/views/config_snom/show.xml.haml)8
-rw-r--r--app/views/config_snom/snom_vision.xml.haml52
-rw-r--r--app/views/extension_modules/_form.html.haml7
-rw-r--r--app/views/extension_modules/_form_core.html.haml6
-rw-r--r--app/views/extension_modules/_index_core.html.haml13
-rw-r--r--app/views/extension_modules/edit.html.haml3
-rw-r--r--app/views/extension_modules/index.html.haml6
-rw-r--r--app/views/extension_modules/new.html.haml3
-rw-r--r--app/views/extension_modules/show.html.haml22
-rw-r--r--app/views/gateway_headers/_form.html.haml7
-rw-r--r--app/views/gateway_headers/_form_core.html.haml7
-rw-r--r--app/views/gateway_headers/_index_core.html.haml17
-rw-r--r--app/views/gateway_headers/edit.html.haml3
-rw-r--r--app/views/gateway_headers/index.html.haml6
-rw-r--r--app/views/gateway_headers/new.html.haml3
-rw-r--r--app/views/gateway_headers/show.html.haml19
-rw-r--r--app/views/gateways/show.html.haml6
-rw-r--r--app/views/group_memberships/_form_core.html.haml3
-rw-r--r--app/views/notifications/new_voicemail.text.erb2
-rw-r--r--app/views/phones/show.html.haml9
-rw-r--r--app/views/sip_accounts/_index_core.html.haml6
-rw-r--r--app/views/sip_accounts/show.html.haml5
-rw-r--r--app/views/switchboard_entries/_form_core.html.haml1
-rw-r--r--app/views/switchboard_entries/show.html.haml5
-rw-r--r--app/views/switchboards/_form_core.html.haml6
-rw-r--r--app/views/switchboards/show.html.erb119
-rw-r--r--app/views/voicemail_settings/_edit_form_core.html.haml2
31 files changed, 355 insertions, 37 deletions
diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml
index b730941..1c9ec30 100644
--- a/app/views/call_forwards/_form_core.html.haml
+++ b/app/views/call_forwards/_form_core.html.haml
@@ -7,11 +7,11 @@
= 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
%div{:id => 'destination_phone_number_div'}
- = f.input :destination, :label => t('call_forwards.form.destination_phone_number.label'), :hint => conditional_hint('call_forwards.form.destination_phone_number.hint'), :input_html => { :id => 'destination_phone_number', :value => @destination_phone_number }
+ = f.input :destination_phone_number, :label => t('call_forwards.form.destination_phone_number.label'), :hint => conditional_hint('call_forwards.form.destination_phone_number.hint'), :input_html => { :id => 'destination_phone_number' }
- if @available_greetings.any?
%div{:id => 'destination_greeting_div'}
- = f.input :destination, :as => :select, :collection => @available_greetings, :label => t('call_forwards.form.destination_greeting.label'), :hint => conditional_hint('call_forwards.form.destination_greeting.hint'), :input_html => { :id => 'destination_greeting' }
+ = f.input :destination_greeting, :as => :select, :collection => @available_greetings, :label => t('call_forwards.form.destination_greeting.label'), :hint => conditional_hint('call_forwards.form.destination_greeting.hint'), :input_html => { :id => 'destination_greeting' }
= f.input :active, :label => t('call_forwards.form.active.label'), :hint => conditional_hint('call_forwards.form.active.hint')
diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml
index 9c2cf39..2915f35 100644
--- a/app/views/call_histories/_index_core.html.haml
+++ b/app/views/call_histories/_index_core.html.haml
@@ -65,7 +65,10 @@
- else
= call_history.destination_number
- elsif call_history.entry_type == 'dialed'
- = call_history.caller_id_number
+ - if call_history.clir
+ %del= call_history.caller_id_number
+ - else
+ = call_history.caller_id_number
- else
= call_history.destination_number
diff --git a/app/views/cdrs/_index_core.html.haml b/app/views/cdrs/_index_core.html.haml
new file mode 100644
index 0000000..39e9e7f
--- /dev/null
+++ b/app/views/cdrs/_index_core.html.haml
@@ -0,0 +1,33 @@
+
+- if defined?(cdrs.total_pages)
+ = will_paginate cdrs, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')
+
+%table.table.table-striped
+ %thead
+ %tr
+ %th= sortable :start_stamp, t('cdrs.index.start_stamp')
+ %th= sortable :caller_id_number, t('cdrs.index.caller_id_number')
+ %th= sortable :caller_id_name, t('cdrs.index.caller_id_name')
+ %th= sortable :dialed_number, t('cdrs.index.dialed_number')
+ %th= sortable :destination_number, t('cdrs.index.destination_number')
+ %th= sortable :callee_id_number, t('cdrs.index.callee_id_number')
+ %th= sortable :callee_id_name, t('cdrs.index.callee_id_name')
+ %th= sortable :billsec, t('cdrs.index.billsec')
+ %th= sortable :hangup_cause, t('cdrs.index.hangup_cause')
+ %th= sortable :dialstatus, t('cdrs.index.dialstatus')
+
+ %tbody
+ - for cdr in cdrs
+ %tr{:class => (cdr.dialstatus == 'SUCCESS' ? '' : 'warning')}
+ %td= l cdr.start_stamp, :format => :short
+ %td= cdr.caller_id_number
+ %td= cdr.caller_id_name
+ %td= cdr.dialed_number
+ %td= cdr.destination_number
+ %td= cdr.callee_id_number
+ %td= cdr.callee_id_name
+ %td= Cdr.seconds_to_minutes_seconds(cdr.billsec)
+ %td= cdr.hangup_cause
+ %td= cdr.dialstatus
+
+ /=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => cdr}
diff --git a/app/views/cdrs/index.html.haml b/app/views/cdrs/index.html.haml
new file mode 100644
index 0000000..b260b38
--- /dev/null
+++ b/app/views/cdrs/index.html.haml
@@ -0,0 +1,4 @@
+- content_for :title, t("cdrs.index.page_title")
+
+- if @cdrs.count > 0
+ = render "index_core", :cdrs => @cdrs
diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/snom_phone.xml.haml
index 22df8bc..39b5958 100644
--- a/app/views/config_snom/show.xml.haml
+++ b/app/views/config_snom/snom_phone.xml.haml
@@ -37,6 +37,7 @@
%display_method{:perm => 'RW'}= 'display_name_number'
%callpickup_dialoginfo{:perm => 'RW'}= 'on'
%pickup_indication{:perm => 'RW'}= 'off'
+ %auto_connect_indication{:perm => 'RW'}= 'off'
%show_local_line{:perm => 'RW'}= 'off'
%mwi_notification{:perm => 'RW'}= 'silent'
%mwi_dialtone{:perm => 'RW'}= 'normal'
@@ -55,6 +56,9 @@
%guess_start_length{:perm => 'RW'}= '3'
%ieee8021x_eap_md5_username{:perm => 'RW'}= GsParameter.get('PROVISIONING_IEEE8021X_EAP_USERNAME')
%ieee8021x_eap_md5_password{:perm => 'RW'}= GsParameter.get('PROVISIONING_IEEE8021X_EAP_PASSWORD')
+ %vision_connected_mac{:perm => 'RW'}= @phone_settings[:vision_mac_address]
+ %vision_provisioning_url{:perm => 'RW'}= @phone_settings[:vision_provisioning_url]
+ %vision_reconnect_timeout{:perm => 'RW'}= '15'
- 0.upto(9) do |ringer_idx|
%internal_ringer_text{:idx => ringer_idx, :perm => 'RW'}= "Ringer#{(ringer_idx+1)}"
@@ -170,8 +174,8 @@
%functionKeys
- @softkeys.each_with_index do |softkey, index|
- - if softkey[:data]
- %fkey{:idx => index, :context => (softkey[:context] ? softkey[:context].to_s : 'active'), :label => softkey[:label], :perm => 'RW'}= softkey[:data]
+ - if softkey[:type]
+ %fkey{:idx => index, :context => (softkey[:context] ? softkey[:context].to_s : 'active'), :label => softkey[:label], :perm => 'RW'}= "#{softkey[:type]} #{softkey[:value]}"
- elsif softkey[:general_type]
%fkey{:idx => index, :context => (softkey[:context] ? softkey[:context].to_s : 'active'), :label => softkey[:label], :perm => 'RW'}
%general{:type => softkey[:general_type]}
diff --git a/app/views/config_snom/snom_vision.xml.haml b/app/views/config_snom/snom_vision.xml.haml
new file mode 100644
index 0000000..053feb9
--- /dev/null
+++ b/app/views/config_snom/snom_vision.xml.haml
@@ -0,0 +1,52 @@
+!!! XML
+%settings
+ %webserver
+ %auth_type{:perm => '$'}= @settings[:auth_type]
+ %user{:perm => '!'}= @settings[:user]
+ %passwd{:perm => '!'}= @settings[:passwd]
+
+ %global
+ %periodic_provisioning{:perm => '$'}
+ %periodic_provisioning_interval{:perm => '$'}
+ %provisioning_server{:perm => '!'}= @settings[:provisioning_server]
+
+ %gui
+ %phone_ip{:perm => '!'}= @settings[:phone_ip]
+ %phone_scheme{:perm => '$'}https
+ %phone_user{:perm => '!'}= @settings[:user]
+ %phone_passwd{:perm => '!'}= @settings[:passwd]
+
+ != "\<!-- active buttons: #{@buttons.count} --\>"
+ - index_left = 0
+ - index_right = 0
+ - for page in 1..3 do
+ != "\<!-- page: #{page} --\>"
+ - for key in 1..8 do
+ - index_left = index_left + 1
+ - button = @buttons.shift
+ - if !button
+ - button = {}
+
+ %left_button_imageurl{:idx=> index_left, :perm=>"!"}= button[:imageurl]
+ %left_button_name{:idx=> index_left, :perm=>"!"}= button[:label]
+ - if button[:general_type].blank?
+ %left_button_type{:idx=> index_left, :perm=>"!"}= button[:type]
+ %left_button_value{:idx=> index_left, :perm=>"!"}= button[:value]
+ - else
+ %left_button_type{:idx=> index_left, :perm=>"!"} xml
+ %left_button_value{:idx=> index_left, :perm=>"!"}
+
+ - for key in 1..8 do
+ - index_right = index_right + 1
+ - button = @buttons.shift
+ - if !button
+ - button = {}
+
+ %right_button_imageurl{:idx=> index_right, :perm=>"!"}= button[:imageurl]
+ %right_button_name{:idx=> index_right, :perm=>"!"}= button[:label]
+ - if button[:general_type].blank?
+ %right_button_type{:idx=> index_right, :perm=>"!"}= button[:type]
+ %right_button_value{:idx=> index_right, :perm=>"!"}= button[:value]
+ - else
+ %right_button_type{:idx=> index_right, :perm=>"!"} xml
+ %right_button_value{:idx=> index_right, :perm=>"!"}
diff --git a/app/views/extension_modules/_form.html.haml b/app/views/extension_modules/_form.html.haml
new file mode 100644
index 0000000..496e695
--- /dev/null
+++ b/app/views/extension_modules/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@phone, @extension_module]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('extension_modules.form.submit')
diff --git a/app/views/extension_modules/_form_core.html.haml b/app/views/extension_modules/_form_core.html.haml
new file mode 100644
index 0000000..bea4a77
--- /dev/null
+++ b/app/views/extension_modules/_form_core.html.haml
@@ -0,0 +1,6 @@
+.inputs
+ = f.input :model, :collection => ExtensionModule::MODELS, :label => t('extension_modules.form.model.label'), :hint => conditional_hint('extension_modules.form.model.hint'), :include_blank => false
+ = f.input :mac_address, :label => t('extension_modules.form.mac_address.label'), :hint => conditional_hint('extension_modules.form.mac_address.hint')
+ = f.input :position, :label => t('extension_modules.form.position.label'), :hint => conditional_hint('extension_modules.form.position.hint')
+ = f.input :active, :label => t('extension_modules.form.active.label'), :hint => conditional_hint('extension_modules.form.active.hint')
+ = f.input :provisioning_key_active, :label => t('extension_modules.form.provisioning_key_active.label'), :hint => conditional_hint('extension_modules.form.provisioning_key_active.hint')
diff --git a/app/views/extension_modules/_index_core.html.haml b/app/views/extension_modules/_index_core.html.haml
new file mode 100644
index 0000000..d5aef48
--- /dev/null
+++ b/app/views/extension_modules/_index_core.html.haml
@@ -0,0 +1,13 @@
+%table.table.table-striped
+ %tr
+ %th= t('extension_modules.index.model')
+ %th= t('extension_modules.index.mac_address')
+ %th= t('extension_modules.index.active')
+
+
+ - for extension_module in extension_modules
+ %tr
+ %td= extension_module.model
+ %td= extension_module.mac_address
+ %td= extension_module.active
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @phone, :child => extension_module} \ No newline at end of file
diff --git a/app/views/extension_modules/edit.html.haml b/app/views/extension_modules/edit.html.haml
new file mode 100644
index 0000000..4fcb09b
--- /dev/null
+++ b/app/views/extension_modules/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("extension_modules.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/extension_modules/index.html.haml b/app/views/extension_modules/index.html.haml
new file mode 100644
index 0000000..7a57eb5
--- /dev/null
+++ b/app/views/extension_modules/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("extension_modules.index.page_title")
+
+- if @extension_modules && @extension_modules.count > 0
+ = render "index_core", :extension_modules => @extension_modules
+
+= render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => ExtensionModule} \ No newline at end of file
diff --git a/app/views/extension_modules/new.html.haml b/app/views/extension_modules/new.html.haml
new file mode 100644
index 0000000..2b4ae9a
--- /dev/null
+++ b/app/views/extension_modules/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("extension_modules.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/extension_modules/show.html.haml b/app/views/extension_modules/show.html.haml
new file mode 100644
index 0000000..ac9d099
--- /dev/null
+++ b/app/views/extension_modules/show.html.haml
@@ -0,0 +1,22 @@
+- content_for :title, t("extension_modules.show.page_title")
+
+%p
+ %strong= t('extension_modules.show.model') + ":"
+ = @extension_module.model
+%p
+ %strong= t('extension_modules.show.mac_address') + ":"
+ = @extension_module.mac_address
+%p
+ %strong= t('extension_modules.show.position') + ":"
+ = @extension_module.position
+%p
+ %strong= t('extension_modules.show.active') + ":"
+ = @extension_module.active
+%p
+ %strong= t('extension_modules.show.provisioning_key_active') + ":"
+ = @extension_module.provisioning_key_active
+
+%p
+ = link_to raw("<i class = 'icon-repeat'></i> ") + t('extension_modules.show.actions.restart'), restart_phone_extension_module_path(@phone, @extension_module), :method => :put, :class => 'btn btn-mini'
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone, :child => @extension_module }
diff --git a/app/views/gateway_headers/_form.html.haml b/app/views/gateway_headers/_form.html.haml
new file mode 100644
index 0000000..0bd8f31
--- /dev/null
+++ b/app/views/gateway_headers/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@gateway, @gateway_header]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('gateway_headers.form.submit')
diff --git a/app/views/gateway_headers/_form_core.html.haml b/app/views/gateway_headers/_form_core.html.haml
new file mode 100644
index 0000000..9a917d4
--- /dev/null
+++ b/app/views/gateway_headers/_form_core.html.haml
@@ -0,0 +1,7 @@
+.inputs
+ = f.input :header_type, :collection => GatewayHeader::HEADER_TYPES, :label => t('gateway_headers.form.header_type.label'), :hint => conditional_hint('gateway_headers.form.header_type.hint'), :include_blank => false
+ = f.input :constraint_value, :label => t('gateway_headers.form.constraint_value.label'), :hint => conditional_hint('gateway_headers.form.constraint_value.hint')
+ = f.input :name, :label => t('gateway_headers.form.name.label'), :hint => conditional_hint('gateway_headers.form.name.hint'), :autofocus => true
+ = f.input :value, :label => t('gateway_headers.form.value.label'), :hint => conditional_hint('gateway_headers.form.value.hint')
+
+ = f.input :description, :label => t('gateway_headers.form.description.label'), :hint => conditional_hint('gateway_headers.form.description.hint')
diff --git a/app/views/gateway_headers/_index_core.html.haml b/app/views/gateway_headers/_index_core.html.haml
new file mode 100644
index 0000000..69b1cf2
--- /dev/null
+++ b/app/views/gateway_headers/_index_core.html.haml
@@ -0,0 +1,17 @@
+%table.table.table-striped
+ %thead
+ %tr
+ %th= t('gateway_headers.index.header_type')
+ %th= t('gateway_headers.index.constraint')
+ %th= t('gateway_headers.index.name')
+ %th= t('gateway_headers.index.value')
+
+ %tbody
+ - for gateway_header in gateway_headers
+ %tr
+ %td= gateway_header.header_type
+ %td
+ = gateway_header.constraint_value
+ %td= gateway_header.name
+ %td= gateway_header.value
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_header.gateway, :child => gateway_header}
diff --git a/app/views/gateway_headers/edit.html.haml b/app/views/gateway_headers/edit.html.haml
new file mode 100644
index 0000000..461ee17
--- /dev/null
+++ b/app/views/gateway_headers/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("gateway_headers.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gateway_headers/index.html.haml b/app/views/gateway_headers/index.html.haml
new file mode 100644
index 0000000..8760b5e
--- /dev/null
+++ b/app/views/gateway_headers/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("gateway_headers.index.page_title")
+
+- if @gateway_headers && @gateway_headers.count > 0
+ = render "index_core", :gateway_headers => @gateway_headers
+
+= render :partial => 'shared/create_link', :locals => {:parent => @gateway, :child_class => GatewayHeader} \ No newline at end of file
diff --git a/app/views/gateway_headers/new.html.haml b/app/views/gateway_headers/new.html.haml
new file mode 100644
index 0000000..3f6ea8e
--- /dev/null
+++ b/app/views/gateway_headers/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("gateway_headers.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gateway_headers/show.html.haml b/app/views/gateway_headers/show.html.haml
new file mode 100644
index 0000000..4f1af49
--- /dev/null
+++ b/app/views/gateway_headers/show.html.haml
@@ -0,0 +1,19 @@
+- content_for :title, t("gateway_headers.show.page_title")
+
+%p
+ %strong= t('gateway_headers.show.gateway') + ":"
+ = @gateway_header.gateway
+%p
+ %strong= t('gateway_headers.show.name') + ":"
+ = @gateway_header.name
+%p
+ %strong= t('gateway_headers.show.value') + ":"
+ = @gateway_header.value
+%p
+ %strong= t('gateway_headers.show.class_type') + ":"
+ = @gateway_header.class_type
+%p
+ %strong= t('gateway_headers.show.description') + ":"
+ = @gateway_header.description
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @gateway, :child => @gateway_header } \ No newline at end of file
diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml
index 19b1304..397b9cf 100644
--- a/app/views/gateways/show.html.haml
+++ b/app/views/gateways/show.html.haml
@@ -118,6 +118,12 @@
%br
= render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewaySetting }
+%h3= t('gateway_headers.index.page_title')
+- if @gateway.gateway_headers.any?
+ = render "gateway_headers/index_core", :gateway_headers => @gateway.gateway_headers
+ %br
+= render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewayHeader }
+
%h3= t('gateway_parameters.index.page_title')
- if @gateway.gateway_parameters.any?
= render "gateway_parameters/index_core", :gateway_parameters => @gateway.gateway_parameters
diff --git a/app/views/group_memberships/_form_core.html.haml b/app/views/group_memberships/_form_core.html.haml
index 4a28a06..cadd33a 100644
--- a/app/views/group_memberships/_form_core.html.haml
+++ b/app/views/group_memberships/_form_core.html.haml
@@ -1,4 +1,3 @@
.inputs
- - if @group.group_memberships.count < 1
- = f.input :item_type, :label => t('group_memberships.form.item_type.label'), :hint => conditional_hint('group_memberships.form.item_type.hint')
+ = f.input :item_type, :label => t('group_memberships.form.item_type.label'), :hint => conditional_hint('group_memberships.form.item_type.hint')
= f.input :item_id, :label => t('group_memberships.form.item_id.label'), :hint => conditional_hint('group_memberships.form.item_id.hint')
diff --git a/app/views/notifications/new_voicemail.text.erb b/app/views/notifications/new_voicemail.text.erb
index 926610b..09edc0c 100644
--- a/app/views/notifications/new_voicemail.text.erb
+++ b/app/views/notifications/new_voicemail.text.erb
@@ -6,4 +6,6 @@ You've just received a voicemail on your Gemeinschaft account <%= @voicemail[:de
To: <%= @voicemail[:to] %>
Receiving Time: <%= @voicemail[:date] %>
Message length: <%= @voicemail[:duration] %>
+<% if !@voicemail[:file_name].blank? %>
File: <%= @voicemail[:file_name] %>
+<% end %>
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
index 1996d48..1e9c7ed 100644
--- a/app/views/phones/show.html.haml
+++ b/app/views/phones/show.html.haml
@@ -96,3 +96,12 @@
= render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts
= render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount}
+
+.row
+ .span12
+ %h2= t("extension_modules.index.page_title")
+ - if @phone.extension_modules.any?
+ = render "extension_modules/index_core", :extension_modules => @phone.extension_modules
+
+ = render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => ExtensionModule}
+
diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml
index be1f4cb..57641ce 100644
--- a/app/views/sip_accounts/_index_core.html.haml
+++ b/app/views/sip_accounts/_index_core.html.haml
@@ -1,6 +1,6 @@
-- if defined?(users.total_pages)
- = will_paginate users, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')
+- if defined?(sip_accounts.total_pages)
+ = will_paginate sip_accounts, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')
%table.table.table-striped
%thead
@@ -26,7 +26,7 @@
%td
= sip_account.sip_accountable
%td
- - if sip_account.registration
+ - if sip_account.registration && (sip_account.registration.expires - Time.now.to_i) > 0
%i.icon-ok
- else
%i.icon-ban-circle
diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml
index a7cd3ce..0974ee5 100644
--- a/app/views/sip_accounts/show.html.haml
+++ b/app/views/sip_accounts/show.html.haml
@@ -42,6 +42,11 @@
%strong= t('sip_accounts.show.voicemail_account') + ":"
%td
= @sip_account.voicemail_account
+ %tr
+ %td
+ %strong= t('sip_accounts.show.language_code') + ":"
+ %td
+ = @sip_account.language_code
- if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port)
%tr
diff --git a/app/views/switchboard_entries/_form_core.html.haml b/app/views/switchboard_entries/_form_core.html.haml
index 6f340c2..2caaba5 100644
--- a/app/views/switchboard_entries/_form_core.html.haml
+++ b/app/views/switchboard_entries/_form_core.html.haml
@@ -1,3 +1,4 @@
.inputs
= f.association :sip_account, :collection => @sip_accounts, :label => t('switchboard_entries.form.sip_account_id.label'), :hint => conditional_hint('switchboard_entries.form.sip_account_id.hint'), :autofocus => true, :include_blank => false
= f.input :name, :label => t('switchboard_entries.form.name.label'), :hint => conditional_hint('switchboard_entries.form.name.hint')
+ = f.input :switchable, :as => :boolean, :label => t('switchboard_entries.form.switchable.label'), :hint => conditional_hint('switchboard_entries.form.switchable.hint') \ No newline at end of file
diff --git a/app/views/switchboard_entries/show.html.haml b/app/views/switchboard_entries/show.html.haml
index b519781..85b8166 100644
--- a/app/views/switchboard_entries/show.html.haml
+++ b/app/views/switchboard_entries/show.html.haml
@@ -18,5 +18,10 @@
%strong= t('switchboard_entries.show.position') + ":"
%td
= @switchboard_entry.position
+ %tr
+ %td
+ %strong= t('switchboard_entries.show.switchable') + ":"
+ %td
+ = @switchboard_entry.switchable
= render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @switchboard, :child => @switchboard_entry } \ No newline at end of file
diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml
index 2258640..db843ad 100644
--- a/app/views/switchboards/_form_core.html.haml
+++ b/app/views/switchboards/_form_core.html.haml
@@ -3,4 +3,8 @@
= f.input :reload_interval, :label => t('switchboards.form.reload_interval.label'), :hint => conditional_hint('switchboards.form.reload_interval.hint')
= f.input :show_avatars, :label => t('switchboards.form.show_avatars.label'), :hint => conditional_hint('switchboards.form.show_avatars.hint')
= f.input :entry_width, :label => t('switchboards.form.entry_width.label'), :hint => conditional_hint('switchboards.form.entry_width.hint')
- = f.input :amount_of_displayed_phone_numbers, :label => t('switchboards.form.amount_of_displayed_phone_numbers.label'), :hint => conditional_hint('switchboards.form.amount_of_displayed_phone_numbers.hint') \ No newline at end of file
+ = f.input :amount_of_displayed_phone_numbers, :label => t('switchboards.form.amount_of_displayed_phone_numbers.label'), :hint => conditional_hint('switchboards.form.amount_of_displayed_phone_numbers.hint')
+ = f.input :blind_transfer_activated, :label => t('switchboards.form.blind_transfer_activated.label'), :hint => conditional_hint('switchboards.form.blind_transfer_activated.hint')
+ = f.input :attended_transfer_activated, :label => t('switchboards.form.attended_transfer_activated.label'), :hint => conditional_hint('switchboards.form.attended_transfer_activated.hint')
+ = f.input :search_activated, :label => t('switchboards.form.search_activated.label'), :hint => conditional_hint('switchboards.form.search_activated.hint')
+ = f.input :reverse_lookup_activated, :label => t('switchboards.form.reverse_lookup_activated.label'), :hint => conditional_hint('switchboards.form.reverse_lookup_activated.hint') \ No newline at end of file
diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb
index 2a2765f..b2cdbd4 100644
--- a/app/views/switchboards/show.html.erb
+++ b/app/views/switchboards/show.html.erb
@@ -16,53 +16,120 @@
</script>
<script type="text/x-handlebars" data-template-name="switchboard">
- <h2>{{name}}</h2>
+ {{#if activeCalls.length}}
+ {{#each activeCall in activeCalls}}
+ <div {{bindAttr class=":alert activeCall.isActive:alert-success"}}>
+ {{#if activeCall.isRinging}}<i class="icon-bell"></i> Neuer {{/if}}
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
+ Anruf von {{activeCall.b_caller_id_number}} an {{activeCall.destination}} ({{from_now activeCall.start_stamp}}).
+ </div>
+ {{/each}}
+ {{/if}}
+
+ {{#if search_activated}}
+ <div class="well span3 pull-right">
+ <p>
+ {{input type="text" value=searchText size="10" placeholder="Suchen..."}}
+ </p>
+ <ul>
+ {{#each phoneBookEntry in searchResults}}
+ <li>
+ {{phoneBookEntry.search_result_display}}<br />
+
+ {{#each phoneNumber in phoneBookEntry.phoneNumbers}}
+ <span class="label">
+ {{phoneNumber.number}}
+ </span>
+
+ {{#each dispatchableIncomingCall in dispatchableIncomingCalls}}
+ {{#if blind_transfer_activated}}
+ <button {{action transfer_blind dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Transfer</button>
+ {{/if}}
+ {{#if attended_transfer_activated}}
+ <button {{action transfer_attended dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Attended Transfer</button>
+ {{/if}}
+ {{/each}}
+ {{/each}}
+ </li>
+ {{/each}}
+ </ul>
+ </div>
+ {{/if}}
{{#if switchboardEntrys.length}}
<ul class="thumbnails">
{{#each switchboardEntry in switchboardEntrys}}
<li class="span2">
<div class="thumbnail">
- {{avatar_img switchboardEntry.avatar_src}}
- <small>
- <p>
+ {{#if switchboardEntry.switchboard.show_avatars}}
+ {{avatar_img switchboardEntry.avatar_src}}
+ {{/if}}
+ <small>
+ <p></p>
+ {{#if switchboardEntry.name}}
+ <p class="text-center">
<span class="label">{{switchboardEntry.name}}</span>
+ </p>
+ {{/if}}
+ {{#if switchboardEntry.sipAccount.is_registrated}}
+ {{#if switchboardEntry.switchable}}
+ <p>
{{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}}
<span class="label">
{{phoneNumber.number}}
</span>
{{/each}}
- </p>
-
- {{show_callstate switchboardEntry.callstate}}
- {{#if switchboardEntry.sipAccount.calls.length}}
+ </p>
+ {{else}}
<p>
- Anrufe:
- <br>
- {{#each call in switchboardEntry.sipAccount.calls}}
- <span {{bindAttr class=":label call.isActive:label-success"}}>
- {{call.b_caller_id_number}} -> {{call.destination}}
- {{#if call.isActive}}
- *
- {{/if}}
+ {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}}
+ <span class="label">
+ {{phoneNumber.number}}
</span>
+
+ {{#if dispatchableIncomingCalls.length}}
+ <p>
+ {{#each dispatchableIncomingCall in dispatchableIncomingCalls}}
+ {{#if switchboardEntry.switchboard.blind_transfer_activated}}
+ <button {{action transfer_blind dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Transfer</button>
+ {{/if}}
+ {{#if switchboardEntry.switchboard.attended_transfer_activated}}
+ <button {{action transfer_attended dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Attended Transfer</button>
+ {{/if}}
+ {{/each}}
+ </p>
+ {{/if}}
{{/each}}
</p>
{{/if}}
- {{#if activeCalls.length}}
+ {{#if switchboardEntry.sipAccount.calls.length}}
<p>
- Verbinden mit:
- <br>
- {{#each activeCall in activeCalls}}
- <button {{action blind_transfer}}>
- {{activeCall.b_caller_id_number}}
- </button>
- {{/each}}
+ {{#each call in switchboardEntry.sipAccount.calls}}
+ <span {{bindAttr class=":label call.isRinging:label-warning:label-success"}}>
+ {{#if call.isRinging}}<i class="icon-bell icon-white"></i>{{/if}}
+ von {{call.b_caller_id_number}} an {{call.destination}}
+ </span>
+ {{/each}}
</p>
{{/if}}
- </small>
+ {{else}}
+ <p>
+ {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}}
+ <span class="label">
+ {{phoneNumber.number}}
+ </span>
+ {{/each}}
+ </p>
+
+ <p>
+ <span class="label label-warning">
+ offline
+ </span>
+ </p>
+ {{/if}}
+ </small>
</div>
</li>
{{/each}}
@@ -73,6 +140,8 @@
</div>
</div>
+<script src="/js/libs/moment/moment.min.js"></script>
+<script src="/js/libs/moment/lang/de.js"></script>
<script src="/js/libs/handlebars.js"></script>
<script src="/js/libs/ember.js"></script>
<script src="/js/libs/ember-data.js"></script>
diff --git a/app/views/voicemail_settings/_edit_form_core.html.haml b/app/views/voicemail_settings/_edit_form_core.html.haml
index 4352f24..81ab2f8 100644
--- a/app/views/voicemail_settings/_edit_form_core.html.haml
+++ b/app/views/voicemail_settings/_edit_form_core.html.haml
@@ -1,2 +1,2 @@
.inputs
- = f.input :value, :label => t("voicemail_settings.settings.#{@voicemail_setting.name.to_s}"), :hint => @voicemail_setting.description, :as => @input_type, input_html: @input_html
+ = f.input :value, :label => t("voicemail_settings.settings.#{@voicemail_setting.name.to_s}"), :hint => @voicemail_setting.description, :as => @input_type, input_html: @input_html