Changed leases element to understand some common fields

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@224 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-06 04:30:03 +00:00
parent 87f0d3217a
commit 8237ca1f9d

View File

@@ -12,9 +12,12 @@ $cols['Move-Out'] = array('index' => 'Lease.moveout_date', 'formatter' => 'dat
$cols['Balance'] = array('index' => 'Lease.balance', 'formatter' => 'currency', 'sortable'=>false); $cols['Balance'] = array('index' => 'Lease.balance', 'formatter' => 'currency', 'sortable'=>false);
$cols['Comment'] = array('index' => 'Lease.comment', 'formatter' => 'comment'); $cols['Comment'] = array('index' => 'Lease.comment', 'formatter' => 'comment');
$jqGrid_options = array('jqGridColumns' => $cols, $custom_post_data = compact('nothing');
'controller' => 'leases', $jqGrid_options = array('jqGridColumns' => $cols,
'caption' => isset($caption) ? $caption : null); 'controller' => 'leases');
$jqGrid_options += compact('action', 'caption',
'grid_div_id', 'grid_div_class', 'grid_id', 'grid_setup',
'nolinks', 'limit');
if (isset($leases)) { if (isset($leases)) {
$jqGrid_options += array('custom_ids' => $jqGrid_options += array('custom_ids' =>
@@ -23,9 +26,11 @@ if (isset($leases)) {
$leases), $leases),
'limit' => 5); 'limit' => 5);
} }
else {
if (isset($searchfields)) {
$jqGrid_options += array('search_fields' => array('Customer', 'Unit')); $jqGrid_options += array('search_fields' => array('Customer', 'Unit'));
} }
$jqGrid_options += compact('custom_post_data');
$jqGrid_options['sort_column'] = 'LeaseID'; $jqGrid_options['sort_column'] = 'LeaseID';
echo $this->element('jqGrid', $jqGrid_options); echo $this->element('jqGrid', $jqGrid_options);