'.__('Customers',true).''; $headers_manual = array('Id', 'Name', '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('name'), $paginator->sort('comment')); } else { $headers = $headers_manual; } $rows = array(); foreach ($customers as $customer) { if (isset($customer['Customer'])) $customer = $customer['Customer']; $rows[] = array($html->link($customer['id'], array('controller' => 'customers', 'action' => 'view', $customer['id'])), $html->link($customer['name'], array('controller' => 'customers', 'action' => 'view', $customer['id'])), $customer['comment']); } echo $this->element('table', array('class' => 'item customer list', 'caption' => isset($caption) ? $caption : null, '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"); }