diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:05:14 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:05:14 +0100 |
commit | eaad37485fe59d0306c37cc038dda6d210052910 (patch) | |
tree | 072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/config_siemens | |
parent | 3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff) | |
parent | b80bd744ad873f6fc43018bc4bfb90677de167bd (diff) |
Merge branch 'develop'
Diffstat (limited to 'app/views/config_siemens')
-rw-r--r-- | app/views/config_siemens/_menu_list.xml.haml | 33 | ||||
-rw-r--r-- | app/views/config_siemens/clean-up.xml.erb | 5 | ||||
-rw-r--r-- | app/views/config_siemens/index.xml.erb | 5 | ||||
-rw-r--r-- | app/views/config_siemens/write.xml.erb | 10 |
4 files changed, 53 insertions, 0 deletions
diff --git a/app/views/config_siemens/_menu_list.xml.haml b/app/views/config_siemens/_menu_list.xml.haml new file mode 100644 index 0000000..70bfc43 --- /dev/null +++ b/app/views/config_siemens/_menu_list.xml.haml @@ -0,0 +1,33 @@ +!!! XML +%IppPhone + %IppDisplay + %IppScreen{:ID => '1', :HiddenCount => (@phone_xml_object[:hidden] ? @phone_xml_object[:hidden].length : '0'), :CommandCount => (@phone_xml_object[:commands] ? @phone_xml_object[:commands].length : '0')} + - if @phone_xml_object[:make_call] + %IppAction{:Type => 'MAKECALL'} + %Number= @phone_xml_object[:make_call] + - if @phone_xml_object[:led] != nil + %IppAction{:Type => (@phone_xml_object[:led] ? 'TURNLEDON' : 'TURNLEDOFF')} + %IppKey{:Keypad => 'YES', :SendKeys => 'YES', :BufferKeys => 'NO', :BufferLength => '0', :TermKey => '', :UrlKey => 'key'} + - if @phone_xml_object[:entries] + %IppList{:Type => 'IMPLICIT', :Count => @phone_xml_object[:entries].length, :Columns => @phone_xml_object[:columns]} + - if @phone_xml_object[:title] + %Title= @phone_xml_object[:title] + %Url= @phone_xml_object[:url] + - @phone_xml_object[:entries].each_with_index do |entry, index| + %Option{:ID => index+1, :Selected => (entry[:selected] ? 'TRUE' : 'FALSE'), :Key => (entry[:key] ? entry[:key] : 'item'), :Value => entry[:value]} + - if entry[:image] + %Image= entry[:image] + %OptionText= entry[:text].to_s + - if entry[:text_center] + %OptionText= entry[:text_center].to_s + - if entry[:text_right] + %OptionText= entry[:text_right].to_s + - if @phone_xml_object[:hidden] + - @phone_xml_object[:hidden].each do |key, value| + %IppHidden{:Type => 'VALUE', :Key => key} + %Value= value + - if @phone_xml_object[:commands] + - @phone_xml_object[:commands].each_with_index do |command, index| + %IppCommand{:Type => command[:type], :DisplayOn => command[:display], :Priority => index, :Key => command[:key], :Value => command[:value], :DisplayOn => command[:display_on], :Select => command[:select], :Default => command[:default], :Auto => command[:auto]} + %Label= command[:label] + %Screen= "1" diff --git a/app/views/config_siemens/clean-up.xml.erb b/app/views/config_siemens/clean-up.xml.erb new file mode 100644 index 0000000..e1cbf93 --- /dev/null +++ b/app/views/config_siemens/clean-up.xml.erb @@ -0,0 +1,5 @@ +<DlsMessage xsi:schemaLocation="http://www.siemens.com/DLS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siemens.com/DLS"> + <Message nonce="<%=@my_nonce%>"> + <Action>CleanUp</Action> + </Message> +</DlsMessage>
\ No newline at end of file diff --git a/app/views/config_siemens/index.xml.erb b/app/views/config_siemens/index.xml.erb new file mode 100644 index 0000000..0c60b1f --- /dev/null +++ b/app/views/config_siemens/index.xml.erb @@ -0,0 +1,5 @@ +<DlsMessage xsi:schemaLocation="http://www.siemens.com/DLS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siemens.com/DLS"> + <Message nonce="<%=@my_nonce%>"> + <Action>ReadAllItems</Action> + </Message> +</DlsMessage>
\ No newline at end of file diff --git a/app/views/config_siemens/write.xml.erb b/app/views/config_siemens/write.xml.erb new file mode 100644 index 0000000..ee9e32e --- /dev/null +++ b/app/views/config_siemens/write.xml.erb @@ -0,0 +1,10 @@ +<DlsMessage xsi:schemaLocation="http://www.siemens.com/DLS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siemens.com/DLS"> + <Message nonce="<%=@my_nonce%>"> + <Action>WriteItems</Action> + <ItemList> + <% @new_settings.each do |setting| %> + <Item name="<%=setting[0]%>" <% if ! setting[1].nil? %>index="<%=setting[1]%>"<%end%>><%=setting[2]%></Item> + <% end %> + </ItemList> + </Message> +</DlsMessage>
\ No newline at end of file |