git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@395 97e9348a-65ac-dc4b-aefc-98561f571b83
23 lines
1.1 KiB
PHP
23 lines
1.1 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
// Define the table columns
|
|
$cols = array();
|
|
$cols['Sort'] = array('index' => 'Unit.sort_order', 'hidden' => true);
|
|
$cols['Walk'] = array('index' => 'Unit.walk_order', 'formatter' => 'number');
|
|
$cols['ID'] = array('index' => 'Unit.id', 'formatter' => 'id');
|
|
$cols['Unit'] = array('index' => 'Unit.name', 'formatter' => 'shortname');
|
|
$cols['Size'] = array('index' => 'UnitSize.name', 'formatter' => 'shortname');
|
|
$cols['Rent'] = array('index' => 'Unit.rent', 'formatter' => 'currency');
|
|
$cols['Status'] = array('index' => 'Unit.status', 'formatter' => 'name'); // We have enough real estate
|
|
$cols['Balance'] = array('index' => 'balance', 'formatter' => 'currency');
|
|
$cols['Comment'] = array('index' => 'Unit.comment', 'formatter' => 'comment');
|
|
|
|
// Render the grid
|
|
$grid
|
|
->columns($cols)
|
|
->sortField('Sort')
|
|
->defaultFields(array('Sort', 'ID', 'Unit'))
|
|
->searchFields(array('Unit', 'Size', 'Status'))
|
|
->render($this, isset($config) ? $config : null,
|
|
array_diff(array_keys($cols), array('Walk', 'Comment')));
|