summaryrefslogtreecommitdiff
path: root/app/views/phones/_index_core.html.haml
blob: 175aeb0d02ed5c8186e0827fe43f54d9af7edb56 (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
- if defined?(phones.total_pages)
  = will_paginate phones, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')

%table.table.table-striped
  %thead
    %tr
      - if defined?(show_phoneable) && show_phoneable
        %th= sortable :phoneable_id, t('phones.index.phoneable')
      %th= sortable :mac_address, t('phones.index.mac_address')
      %th
        %span.hidden-phone
          = sortable :phone_model_id, t('phones.index.phone_model_id')
        %span.visible-phone
          = truncate(t('phones.index.phone_model_id'), :length => 9)
      %th
        %span.hidden-phone
          = sortable :hot_deskable, t('phones.index.hot_deskable')
      %th
        %span.hidden-phone
          = sortable :ip_address, t('phones.index.ip_address')

  %tbody
    - for phone in phones
      %tr{:class => (phone.ip_address.blank? ? 'warning' : '')}
        - if defined?(show_phoneable) && show_phoneable
          %td
            = phone.phoneable
        %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}