summaryrefslogtreecommitdiff
path: root/app/views/config_snom
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/config_snom')
-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
2 files changed, 58 insertions, 2 deletions
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=>"!"}