summaryrefslogtreecommitdiff
path: root/app/views/config_snom/snom_vision.xml.haml
blob: 053feb961df5a8e0970ade14ee817c117e4306c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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=>"!"}