- if defined?(phones.total_pages)
= will_paginate phones, :renderer => BootstrapPagination::Rails, :previous_label => raw(''), :next_label => raw('')
%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}