Finally added a format helper, which has been long intended. There may be still be conversion issues, it hasn't been tested much.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@77 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-08 03:32:07 +00:00
parent e740cc859b
commit f08884f326
16 changed files with 178 additions and 349 deletions

View File

@@ -5,9 +5,17 @@ if (isset($heading))
elseif (!isset($caption))
echo '<h2>'.__('Contacts',true).'</h2>';
$headers_manual = array_merge(array('Id', 'Last Name', 'First Name', 'Company'),
isset($contacts[0]['ContactsCustomer']) ? array('Type', 'Active') : array(),
array('Comment'));
$headers = array_merge(array('ID', 'Last Name', 'First Name', 'Company'),
isset($contacts[0]['ContactsCustomer']) ? array('Type', 'Active') : array(),
array('Comment'));
foreach (array_intersect($headers, array('ID')) AS $k => $v) {
$column_class[$k] = 'id';
}
foreach (array_intersect($headers, array('Comment')) AS $k => $v) {
$column_class[$k] = 'comment';
}
if (isset($paginator)) {
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records (%start% - %end%) of %count% total', true)));
@@ -21,8 +29,6 @@ if (isset($paginator)) {
$paginator->sort('active'))
: array()),
array($paginator->sort('comment')));
} else {
$headers = $headers_manual;
}
$rows = array();
@@ -55,7 +61,7 @@ echo $this->element('table',
'caption' => isset($caption) ? $caption : null,
'headers' => $headers,
'rows' => $rows,
'column_class' => $headers_manual));
'column_class' => $column_class));
if (isset($paginator)) {
echo('<div class="paging">' . "\n");