summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-08-16 07:40:25 +0200
committerPeter Kozak <spag@golwen.net>2013-08-16 07:40:25 +0200
commit2277451c220ffb45aefae2a1bbd3a37821fa5dd8 (patch)
tree0aacdf302eba315e50fef5733e049d6faffa43f0
parentcfa3f3eb5e3c7429e94ea6546f8d07232ccaa296 (diff)
caching added
-rw-r--r--app/views/config_snom/_snom_phone_directory.xml.haml37
1 files changed, 20 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]