Moved all controllers to the new addGridViewSideMenuLinks virtual function.
git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@777 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -8,12 +8,25 @@ class TransactionsController extends AppController {
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* override: addDefaultSideMenuLinks
|
||||
* - Adds controller specific default side menu links
|
||||
* override: addGridViewSideMenuLinks
|
||||
* - Adds grid view navigation side menu links
|
||||
*/
|
||||
|
||||
function addDefaultSideMenuLinks() {
|
||||
parent::addDefaultSideMenuLinks();
|
||||
function addGridViewSideMenuLinks() {
|
||||
parent::addGridViewSideMenuLinks();
|
||||
|
||||
$this->addSideMenuLink('Invoices',
|
||||
array('controller' => 'transactions', 'action' => 'invoice'), null,
|
||||
'CONTROLLER');
|
||||
$this->addSideMenuLink('Receipts',
|
||||
array('controller' => 'transactions', 'action' => 'receipt'), null,
|
||||
'CONTROLLER');
|
||||
$this->addSideMenuLink('Deposits',
|
||||
array('controller' => 'transactions', 'action' => 'deposit'), null,
|
||||
'CONTROLLER');
|
||||
$this->addSideMenuLink('All',
|
||||
array('controller' => 'transactions', 'action' => 'all'), null,
|
||||
'CONTROLLER');
|
||||
}
|
||||
|
||||
|
||||
@@ -37,21 +50,6 @@ class TransactionsController extends AppController {
|
||||
$this->gridView('Deposits');
|
||||
}
|
||||
|
||||
function gridView($title, $action = null, $element = null) {
|
||||
$this->addSideMenuLink('Invoices',
|
||||
array('controller' => 'transactions', 'action' => 'invoice'), null,
|
||||
'CONTROLLER');
|
||||
$this->addSideMenuLink('Receipts',
|
||||
array('controller' => 'transactions', 'action' => 'receipt'), null,
|
||||
'CONTROLLER');
|
||||
$this->addSideMenuLink('Deposits',
|
||||
array('controller' => 'transactions', 'action' => 'deposit'), null,
|
||||
'CONTROLLER');
|
||||
$this->addSideMenuLink('All',
|
||||
array('controller' => 'transactions', 'action' => 'all'), null,
|
||||
'CONTROLLER');
|
||||
parent::gridView($title, $action, $element);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user