git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@826 97e9348a-65ac-dc4b-aefc-98561f571b83
20 lines
952 B
PHP
20 lines
952 B
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
// Define the table columns
|
|
$cols = array();
|
|
$cols['Relationship'] = array('index' => 'ContactsCustomer.type', 'formatter' => 'enum');
|
|
$cols['Name'] = array('index' => 'Contact.display_name', 'formatter' => 'longname');
|
|
$cols['Last Name'] = array('index' => 'Contact.last_name', 'formatter' => 'name');
|
|
$cols['First Name'] = array('index' => 'Contact.first_name', 'formatter' => 'name');
|
|
$cols['Company'] = array('index' => 'Contact.company_name', 'formatter' => 'longname');
|
|
$cols['Comment'] = array('index' => 'Contact.comment', 'formatter' => 'comment');
|
|
|
|
// Render the grid
|
|
$grid
|
|
->columns($cols)
|
|
->sortField('Last Name')
|
|
->defaultFields(array('Last Name', 'First Name'))
|
|
->searchFields(array('Last Name', 'First Name', 'Company'))
|
|
->render($this, isset($config) ? $config : null,
|
|
array_diff(array_keys($cols), array('Relationship', 'Comment')));
|