summaryrefslogtreecommitdiff
path: root/app/views/phones/_index_core.html.haml
blob: 9a865f067b9ec1f756c0f95ecdf22fb4eb0a06c2 (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
%table.table.table-striped
  %thead
    %tr
      %th= t('phones.index.mac_address')
      %th
        %span.hidden-phone
          = t('phones.index.phone_model_id')
        %span.visible-phone
          = truncate(t('phones.index.phone_model_id'), :length => 9)
      %th
        %span.hidden-phone
          = t('phones.index.hot_deskable')
      %th
        %span.hidden-phone
          = t('phones.index.ip_address')

  %tbody
    - for phone in phones
      %tr{:class => (phone.ip_address.blank? ? 'warning' : '')}
        %td= phone.pretty_mac_address
        %td= phone.phone_model
        %td
          %span.hidden-phone
            %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.hot_desk'), :'data-trigger' => 'hover'}
              = phone.hot_deskable == true ? t('simple_form.yes') : t('simple_form.no')

        %td
          - if phone.ip_address.blank?
            %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'}
              = '-'
          - else
            = phone.ip_address
        =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone}