From 6ec40d4f0b99801354a342644e788ce13fcc204b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 11 Jun 2013 11:20:08 +0200 Subject: pagination added --- app/views/phones/_index_core.html.haml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app/views/phones/_index_core.html.haml') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index 9a865f0..a77395c 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,18 +1,21 @@ +- if defined?(phones.total_pages) + = will_paginate phones, :renderer => BootstrapPagination::Rails, :previous_label => raw(''), :next_label => raw('') + %table.table.table-striped %thead %tr - %th= t('phones.index.mac_address') + %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 -- cgit v1.2.3