'.__('Contacts',true).''; $headers_manual = array('Id', 'Last Name', 'First Name', 'Company', 'Comment'); if (isset($paginator)) { echo $paginator->counter(array( 'format' => __('Page %page% of %pages%, showing %current% records (%start% - %end%) of %count% total', true))); $headers = array($paginator->sort('id'), $paginator->sort('last_name'), $paginator->sort('first_name'), $paginator->sort('company_name'), //$paginator->sort('unit_id'), $paginator->sort('comment')); } else { $headers = $headers_manual; } $rows = array(); foreach ($contacts as $contact) { $rows[] = array($html->link($contact['Contact']['id'], array('controller' => 'contacts', 'action' => 'view', $contact['Contact']['id'])), $html->link($contact['Contact']['last_name'], array('controller' => 'contacts', 'action' => 'view', $contact['Contact']['id'])), $html->link($contact['Contact']['first_name'], array('controller' => 'contacts', 'action' => 'view', $contact['Contact']['id'])), $contact['Contact']['company_name'], $contact['Contact']['comment']); } echo $this->element('table', array('class' => 'item contact list', 'headers' => $headers, 'rows' => $rows, 'column_class' => $headers_manual)); if (isset($paginator)) { echo('
' . "\n"); echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled')); echo(' | '); echo $paginator->numbers(); echo(' | '); echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled')); echo('
' . "\n"); }