'.__('Transactions',true).''; $headers = array('Id', 'Timestamp', 'Comment'); $column_class = array(); foreach (array_intersect($headers, array('Comment')) AS $k => $v) { $column_class[$k] = 'comment'; } foreach (array_intersect($headers, array('Id')) AS $k => $v) { $column_class[$k] = 'id'; } 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('customer_id'), $paginator->sort('Timestamp', 'stamp'), $paginator->sort('Through', 'through_date'), $paginator->sort('Due', 'due_date'), $paginator->sort('comment')); } $rows = array(); foreach ($transactions as $transaction) { $customer = $transaction['Customer']; if (isset($transaction['Transaction'])) $transaction = $transaction['Transaction']; $rows[] = array($html->link('#'.$transaction['id'], array('controller' => 'transactions', 'action' => 'view', $transaction['id'])), $html->link($customer['name'], array('controller' => 'customers', 'action' => 'view', $customer['id'])), datefmt($transaction['stamp']), datefmt($transaction['through_date']), datefmt($transaction['due_date']), $transaction['comment']); } echo $this->element('table', array('class' => 'item transaction list', 'caption' => isset($caption) ? $caption : null, 'headers' => $headers, 'rows' => $rows, 'column_class' => $column_class)); if (isset($paginator)) { echo('