Getting sidemenu ready for more dynamic actions based on context. Couple minor tweaks to layout.

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526/site@44 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-30 20:51:07 +00:00
parent b409bf09d1
commit 6661d26c76
5 changed files with 30 additions and 20 deletions

View File

@@ -7,6 +7,13 @@ class ContactsController extends AppController {
'order' => array('Contact.last_name' => 'ASC',
'Contact.first_name' => 'ASC'));
var $sidemenu_links =
array(array('name' => 'Tenants', 'header' => true),
array('name' => 'Current', 'url' => array('controller' => 'contacts', 'action' => 'current')),
array('name' => 'Past', 'url' => array('controller' => 'contacts', 'action' => 'past')),
array('name' => 'All Tenants', 'url' => array('controller' => 'contacts', 'action' => 'tenants')),
array('name' => 'All Contacts', 'url' => array('controller' => 'contacts', 'action' => 'all')),
);
/**************************************************************************
**************************************************************************
@@ -15,15 +22,7 @@ class ContactsController extends AppController {
* - Generates controller specific links for the side menu
*/
function sideMenuLinks() {
$menu = parent::sideMenuLinks();
//$menu[] = array('hr' => true);
$menu[] = array('name' => 'Tenants', 'header' => true);
$menu[] = array('name' => 'Current', 'url' => array('controller' => 'contacts', 'action' => 'current'));
$menu[] = array('name' => 'Past', 'url' => array('controller' => 'contacts', 'action' => 'past'));
$menu[] = array('name' => 'All Tenants', 'url' => array('controller' => 'contacts', 'action' => 'tenants'));
$menu[] = array('name' => 'All Contacts', 'url' => array('controller' => 'contacts', 'action' => 'all'));
return $menu;
return array_merge(parent::sideMenuLinks(), $this->sidemenu_links);
}
@@ -159,6 +158,11 @@ class ContactsController extends AppController {
}
}
$this->sidemenu_links[] =
array('name' => 'Operations', 'header' => true);
$this->sidemenu_links[] =
array('name' => 'Move-Out', 'url' => array('controller' => 'units', 'action' => 'move-out'));
$this->set(compact('contact', 'title', 'mytstval',
'outstanding_balance',
'outstanding_deposit'));