diff options
Diffstat (limited to 'app/views/phones')
-rw-r--r-- | app/views/phones/_index_core.html.haml | 16 | ||||
-rw-r--r-- | app/views/phones/index.html.haml | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index 9a865f0..175aeb0 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,22 +1,30 @@ +- 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 - %th= t('phones.index.mac_address') + - 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 - = t('phones.index.phone_model_id') + = 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 - = t('phones.index.hot_deskable') + = sortable :hot_deskable, t('phones.index.hot_deskable') %th %span.hidden-phone - = t('phones.index.ip_address') + = 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 diff --git a/app/views/phones/index.html.haml b/app/views/phones/index.html.haml index 4de7919..8e61706 100644 --- a/app/views/phones/index.html.haml +++ b/app/views/phones/index.html.haml @@ -1,6 +1,6 @@ - content_for :title, t("phones.index.page_title") - if @phones.count > 0 - = render "index_core", :phones => @phones + = render "index_core", :phones => @phones, :show_phoneable => (@parent.class == Tenant) = render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Phone}
\ No newline at end of file |