git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@115 97e9348a-65ac-dc4b-aefc-98561f571b83
44 lines
1.9 KiB
PHP
44 lines
1.9 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
// Define the table columns
|
|
$cols = array();
|
|
$cols['ID'] = array('index' => 'Customer.id', 'width' => '30', 'align' => 'center');
|
|
if (isset($customers[0]['ContactsCustomer']))
|
|
$cols['Relationship'] = array('index' => 'ContactsCustomer.type', 'width' => '75', 'align' => 'left');
|
|
$cols['Name'] = array('index' => 'Customer.name', 'width' => '150', 'align' => 'left');
|
|
$cols['Last Name'] = array('index' => 'PrimaryContact.last_name', 'width' => '100', 'align' => 'left');
|
|
$cols['First Name'] = array('index' => 'PrimaryContact.first_name', 'width' => '100', 'align' => 'left');
|
|
$cols['Leases'] = array('index' => 'lease_count', 'width' => '60', 'align' => 'center');
|
|
$cols['Comment'] = array('index' => 'Customer.comment', 'width' => '300', 'align' => 'left');
|
|
|
|
// Some of the columns should not be sortable
|
|
foreach (array_intersect_key($cols, array('Comment'=>1)) AS $k => $v)
|
|
$cols[$k]['sortable'] = false;
|
|
|
|
// Some of the columns should be searchable
|
|
foreach (array_intersect_key($cols, array('Last Name'=>1, 'First Name'=>1)) AS $k => $v)
|
|
$cols[$k]['search'] = true;
|
|
|
|
echo $this->element('jqGrid',
|
|
array('jqGridColumns' => $cols));
|
|
|
|
?>
|
|
|
|
<div>Search By:<BR>
|
|
<input type="checkbox" id="autosearch" onclick="enableAutosubmit(this.checked)" CHECKED>Enable Autosearch<BR>
|
|
|
|
Last Name<BR>
|
|
<input type="text" CLASS="filt-text" id="filt_last_name" name="PrimaryContact.last_name" />
|
|
<button CLASS="filt-submit" ID="submit_filt_last_name" style="margin-left:30px;">Search</button><BR>
|
|
|
|
First Name<BR>
|
|
<input type="text" CLASS="filt-text" id="filt_first_name" name="PrimaryContact.first_name" />
|
|
<button CLASS="filt-submit" ID="submit_filt_first_name" style="margin-left:30px;">Search</button><BR>
|
|
|
|
<div>
|
|
<button CLASS="filt-clear" ONCLICK="gridRestore()">Clear</button>
|
|
</div>
|
|
|
|
</div>
|
|
|