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@77 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-08 03:32:07 +00:00
parent 52032180f3
commit 374843aeee
16 changed files with 178 additions and 349 deletions

View File

@@ -5,7 +5,15 @@ if (isset($heading))
else
echo '<h2>'.__('Units',true).'</h2>';
$headers_manual = array('Id', 'Unit', 'Size', 'Status', 'Comment');
$headers = array('ID', 'Unit', 'Size', 'Status', '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] = 'slack';
}
if (isset($paginator)) {
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records (%start% - %end%) of %count% total', true)));
@@ -15,8 +23,6 @@ if (isset($paginator)) {
$paginator->sort('unit_size_id'),
$paginator->sort('status'),
$paginator->sort('comment'));
} else {
$headers = $headers_manual;
}
$rows = array();
@@ -36,9 +42,10 @@ foreach ($units as $unit) {
echo $this->element('table',
array('class' => 'item unit list',
'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");