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

@@ -12,19 +12,6 @@ class CustomersController extends AppController {
function addDefaultSideMenuLinks() {
parent::addDefaultSideMenuLinks();
$this->addSideMenuLink('Current',
array('controller' => 'customers', 'action' => 'current'), null,
'CONTROLLER');
$this->addSideMenuLink('Past',
array('controller' => 'customers', 'action' => 'past'), null,
'CONTROLLER');
$this->addSideMenuLink('All',
array('controller' => 'customers', 'action' => 'all'), null,
'CONTROLLER');
$this->addSideMenuLink('Add Customer',
array('controller' => 'customers', 'action' => 'add'), null,
'CONTROLLER');
}
@@ -40,6 +27,25 @@ class CustomersController extends AppController {
function past() { $this->gridView('Past Tenants'); }
function all() { $this->gridView('All Customers'); }
function gridView($title, $action = null, $element = null) {
$this->addSideMenuLink('Current',
array('controller' => 'customers', 'action' => 'current'), null,
'CONTROLLER');
$this->addSideMenuLink('Past',
array('controller' => 'customers', 'action' => 'past'), null,
'CONTROLLER');
$this->addSideMenuLink('All',
array('controller' => 'customers', 'action' => 'all'), null,
'CONTROLLER');
$this->sideMenuAreaName('Creation', 'ACTION', $this->new_area);
$this->addSideMenuLink('New Customer',
array('controller' => 'customers', 'action' => 'add'), null,
'ACTION', $this->new_area);
parent::gridView($title, $action, $element);
}
/**************************************************************************
**************************************************************************