git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@782 97e9348a-65ac-dc4b-aefc-98561f571b83
25 lines
1.3 KiB
PHP
25 lines
1.3 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
// Define the table columns
|
|
$cols = array();
|
|
$cols['Size'] = array('index' => 'UnitSize.name', 'formatter' => 'shortname');
|
|
$cols['Width'] = array('index' => 'UnitSize.width', 'formatter' => 'number');
|
|
$cols['Depth'] = array('index' => 'UnitSize.depth', 'formatter' => 'number');
|
|
$cols['Height'] = array('index' => 'UnitSize.height', 'formatter' => 'number');
|
|
$cols['Area'] = array('index' => 'sqft', 'formatter' => 'number');
|
|
$cols['Volume'] = array('index' => 'cuft', 'formatter' => 'number');
|
|
$cols['Deposit'] = array('index' => 'UnitSize.deposit', 'formatter' => 'currency');
|
|
$cols['Rent'] = array('index' => 'UnitSize.rent', 'formatter' => 'currency');
|
|
$cols['A. Cost'] = array('index' => 'sqcost', 'formatter' => 'currency');
|
|
$cols['V. Cost'] = array('index' => 'cucost', 'formatter' => 'currency');
|
|
$cols['Comment'] = array('index' => 'Unit.comment', 'formatter' => 'comment');
|
|
|
|
// Render the grid
|
|
$grid
|
|
->columns($cols)
|
|
->sortField('Area')
|
|
->defaultFields(array('Size', 'Area'))
|
|
->searchFields(array('Size', 'Width', 'Depth', 'Area', 'Deposit', 'Rent'))
|
|
->render($this, isset($config) ? $config : null,
|
|
array_diff(array_keys($cols), array('Height', 'Volume', 'A. Cost', 'V. Cost', 'Comment')));
|