summaryrefslogtreecommitdiff
path: root/app/views/config_snom/snom_vision.xml.haml
blob: 38a8d350e2413d27555c62773e87f2efeab28c9c (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
!!! 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]
        %left_button_type{:idx=> index_left, :perm=>"!"}= button[:type]
        %left_button_value{:idx=> index_left, :perm=>"!"}= button[:value]

      - 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]
        %right_button_type{:idx=> index_right, :perm=>"!"}= button[:type]
        %right_button_value{:idx=> index_right, :perm=>"!"}= button[:value]