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

@@ -2,10 +2,18 @@
if (isset($heading))
echo $heading;
else
elseif (!isset($caption))
echo '<h2>'.__('Customers',true).'</h2>';
$headers_manual = array('Id', 'Name', 'Comment');
$headers = array('ID', 'Name', 'Comment');
$column_class = array();
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)));
@@ -13,8 +21,6 @@ if (isset($paginator)) {
$headers = array($paginator->sort('id'),
$paginator->sort('name'),
$paginator->sort('comment'));
} else {
$headers = $headers_manual;
}
$rows = array();
@@ -38,7 +44,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");