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:
abijah
2009-08-25 02:37:01 +00:00
parent b2a85a5197
commit 3ff5967415
5 changed files with 86 additions and 102 deletions

View File

@@ -6,12 +6,26 @@ class CustomersController 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('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('New Customer',
array('controller' => 'customers', 'action' => 'add'), null,
'ACTION', $this->new_area);
}
@@ -27,25 +41,6 @@ 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);
}
/**************************************************************************
**************************************************************************