Minor tweak to the css to create a margin for each grid, and so added a div to wrap each item listing. Changed the search boxes to only be available for the overall item listing.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@124 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-14 23:54:48 +00:00
parent 4d49ad6516
commit 31c603c757
6 changed files with 49 additions and 18 deletions

View File

@@ -8,6 +8,20 @@ $cols['Size'] = array('index' => 'UnitSize.name', 'width' => '75');
$cols['Status'] = array('index' => 'Unit.status', 'width' => '75');
$cols['Comment'] = array('index' => 'Unit.comment', 'formatter' => 'comment');
echo $this->element('jqGrid',
array('jqGridColumns' => $cols));
$jqGrid_options = array('jqGridColumns' => $cols,
'controller' => 'units',
'caption' => isset($caption) ? $caption : null);
if (isset($units)) {
$jqGrid_options += array('custom_ids' =>
array_map(create_function('$data',
'return $data["id"];'),
$units),
'limit' => 5);
}
else {
$jqGrid_options += array('search_fields' => array('Unit', 'Size', 'Status'));
}
echo $this->element('jqGrid', $jqGrid_options);