summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/config_snom/_snom_phone_directory.xml.haml37
-rw-r--r--app/views/config_yealink/_phone_directory.xml.haml14
-rw-r--r--app/views/config_yealink/_phone_menu.xml.haml6
-rw-r--r--app/views/config_yealink/show.text.haml41
-rw-r--r--app/views/gateways/show.xml.haml4
5 files changed, 85 insertions, 17 deletions
diff --git a/app/views/config_snom/_snom_phone_directory.xml.haml b/app/views/config_snom/_snom_phone_directory.xml.haml
index 698f2e5..776e504 100644
--- a/app/views/config_snom/_snom_phone_directory.xml.haml
+++ b/app/views/config_snom/_snom_phone_directory.xml.haml
@@ -1,19 +1,22 @@
!!! XML
-%SnomIPPhoneDirectory{:speedselect => 'off'}
- %Title= @phone_xml_object[:title]
- %Prompt= @phone_xml_object[:prompt]
- - @phone_xml_object[:entries].each do |entry|
- %DirectoryEntry{:sel => entry[:selected].to_s}
- %Name= entry[:text]
- %Telephone= entry[:number]
+- cache(['snom_phone_directory', @sip_account.id, @phone_xml_object]) do
+ %SnomIPPhoneDirectory{:speedselect => 'off'}
+ %Title= @phone_xml_object[:title]
+ %Prompt= @phone_xml_object[:prompt]
+ - cache(['snom_phone_directory_table', @sip_account.id, @phone_xml_object[:entries]]) do
+ - @phone_xml_object[:entries].each do |entry|
+ - cache(['yealink_phone_directory_table_tr', @sip_account.id, entry]) do
+ %DirectoryEntry{:sel => entry[:selected].to_s}
+ %Name= entry[:text]
+ %Telephone= entry[:number]
- - if @phone_xml_object[:softkeys]
- - @phone_xml_object[:softkeys].each do |softkey|
- %SoftKeyItem
- %Name= softkey[:name]
- - if ! softkey[:label].blank?
- %Label= softkey[:label]
- - if ! softkey[:url].blank?
- %URL= softkey[:url]
- - if ! softkey[:softkey].blank?
- %URL= softkey[:softkey]
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ - if ! softkey[:label].blank?
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
diff --git a/app/views/config_yealink/_phone_directory.xml.haml b/app/views/config_yealink/_phone_directory.xml.haml
new file mode 100644
index 0000000..50d6561
--- /dev/null
+++ b/app/views/config_yealink/_phone_directory.xml.haml
@@ -0,0 +1,14 @@
+%YealinkIPPhoneDirectory
+ - cache(['yealink_phone_directory_table', @phone_book.id, @phone_book.phone_book_entries]) do
+ - @phone_book.phone_book_entries.each do |phone_book_entry|
+ - cache(['yealink_phone_directory_table_tr', @phone_book.id, phone_book_entry]) do
+ - phone_numbers = phone_book_entry.phone_numbers
+ - if !phone_book_entry.to_s.blank? && phone_numbers.any?
+ - mobile_phone = phone_numbers.where(:name => 'mobile').first
+ - phone = (phone_numbers - [mobile_phone]).first
+ %DirectoryEntry
+ %Name= phone_book_entry.to_s
+ - if phone
+ %Telephone= phone.number
+ - if mobile_phone
+ %Telephone= mobile_phone.number
diff --git a/app/views/config_yealink/_phone_menu.xml.haml b/app/views/config_yealink/_phone_menu.xml.haml
new file mode 100644
index 0000000..4ed41ec
--- /dev/null
+++ b/app/views/config_yealink/_phone_menu.xml.haml
@@ -0,0 +1,6 @@
+%YealinkIPPhoneMenu
+ %Title Gemeinschaft
+ - @phone_books.each do |phone_book|
+ %MenuItem
+ %Name= phone_book[:name]
+ %URL= phone_book[:url]
diff --git a/app/views/config_yealink/show.text.haml b/app/views/config_yealink/show.text.haml
new file mode 100644
index 0000000..a654e19
--- /dev/null
+++ b/app/views/config_yealink/show.text.haml
@@ -0,0 +1,41 @@
+= '#!version:1.0.0.1'
+
+= 'lang.wui = English'
+= 'call_waiting.enable = 1'
+= 'voice.tone.country = Germany'
+= 'auto_provision.pnp_enable = 1'
+= 'auto_provision.mode = 1'
+= 'auto_provision.repeat.enable = 0'
+= 'auto_provision.repeat.minutes = 3600'
+= 'auto_provision.weekly.enalbe = 0'
+= 'auto_provision.weekly.mask = 0123456'
+= 'auto_provision.weekly.begin_time = 00:00'
+= 'auto_provision.weekly.end_time = 00:00'
+= 'auto_provision.server.url = ' + @provisioning_url
+= 'auto_provision.server.username = '
+= 'auto_provision.server.password = '
+= 'local_time.time_zone = +1'
+= 'local_time.time_zone_name = Germany(Berlin)'
+= 'local_time.summer_time = 2'
+= 'local_time.dst_time_type = 1'
+= 'local_time.start_time = '
+= 'local_time.end_time = '
+= 'local_time.offset_time = 60'
+
+= 'local_time.ntp_server1 = '
+= 'local_time.ntp_server2 = '
+= 'security.user_password = admin:' + (@phone.http_password.blank? ? '0000' : @phone.http_password.to_s)
+
+
+- @sip_accounts.each_with_index do |sip_account, index|
+ - i = index + 1
+ - sip_account.each_pair do |key, value|
+ = "account.#{i}.#{key} = #{value}"
+
+- @handsets.each_with_index do |handset, index|
+ - i = index + 1
+ - handset.each_pair do |key, value|
+ = "handset.#{i}.#{key} = #{value}"
+
+= "remote_phonebook.data.1.url = #{@phonebook_url}"
+= 'remote_phonebook.data.1.name = Gemeinschaft'
diff --git a/app/views/gateways/show.xml.haml b/app/views/gateways/show.xml.haml
index e0ff21a..1642ccc 100644
--- a/app/views/gateways/show.xml.haml
+++ b/app/views/gateways/show.xml.haml
@@ -5,6 +5,10 @@
- @gateway.gateway_settings.each do |setting|
%setting{ :name => setting.name, :value => setting.value, :class_type => setting.class_type, :description => setting.description }
+ %gateway_headers{ :count => @gateway.gateway_headers.count }
+ - @gateway.gateway_headers.each do |header|
+ %header{ :header_type => header.header_type, :constraint => header.constraint_value, :name => header.name, :value => header.value, :description => header.description }
+
%gateway_parameters{ :count => @gateway.gateway_parameters.count }
- @gateway.gateway_parameters.each do |parameter|
%parameter{ :name => parameter.name, :value => parameter.value, :class_type => parameter.class_type, :description => parameter.description }