Added an element for monetary_sources. Not sure if it will get used, but it was easy enough to do.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@138 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
22
views/elements/monetary_sources.ctp
Normal file
22
views/elements/monetary_sources.ctp
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php /* -*- mode:PHP -*- */
|
||||
|
||||
// Define the table columns
|
||||
$cols = array();
|
||||
$cols['ID'] = array('index' => 'MonetarySource.id', 'formatter' => 'id');
|
||||
$cols['Name'] = array('index' => 'MonetarySource.name', 'formatter' => 'longname');
|
||||
$cols['Type'] = array('index' => 'MonetaryType.name', 'formatter' => 'name');
|
||||
$cols['Comment'] = array('index' => 'MonetarySource.comment', 'formatter' => 'comment');
|
||||
|
||||
$jqGrid_options = array('jqGridColumns' => $cols,
|
||||
'controller' => 'monetary_sources',
|
||||
'caption' => isset($caption) ? $caption : null);
|
||||
|
||||
if (isset($monetary_sources)) {
|
||||
$jqGrid_options += array('custom_ids' =>
|
||||
array_map(create_function('$data',
|
||||
'return $data["id"];'),
|
||||
$monetary_sources),
|
||||
'limit' => 5);
|
||||
}
|
||||
|
||||
echo $this->element('jqGrid', $jqGrid_options);
|
||||
Reference in New Issue
Block a user