More work on tidying up the menu items for usability.

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@735 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-23 00:02:53 +00:00
parent f545502162
commit da88975fed
7 changed files with 183 additions and 91 deletions

View File

@@ -14,18 +14,6 @@ class TransactionsController extends AppController {
function addDefaultSideMenuLinks() {
parent::addDefaultSideMenuLinks();
$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');
}
@@ -41,12 +29,29 @@ class TransactionsController extends AppController {
function invoice() { $this->gridView('Invoices'); }
function receipt() { $this->gridView('Receipts'); }
function deposit() {
if (empty($this->params['admin']))
$this->sideMenuEnable('CONTROLLER', $this->std_area, false);
$this->addSideMenuLink('New Deposit',
array('controller' => 'tenders', 'action' => 'deposit'), null,
'ACTION');
$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);
}
/**************************************************************************
**************************************************************************