Moved Edit as the final menu item of each set, when present.

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@772 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-25 01:14:34 +00:00
parent 20309fba39
commit b89750a4ef
2 changed files with 11 additions and 10 deletions

View File

@@ -150,12 +150,6 @@ class TendersController extends AppController {
));
// Watch out for the special "Closing" entries
if (!empty($tender['TenderType']['id']))
$this->addSideMenuLink('Edit',
array('action' => 'edit', $id), null,
'ACTION');
if (!empty($tender['Tender']['deposit_transaction_id'])
&& empty($tender['Tender']['nsf_transaction_id'])
// Hard to tell what types of items can come back as NSF.
@@ -168,6 +162,13 @@ class TendersController extends AppController {
'ACTION');
}
// Watch out for the special "Closing" entries, which have
// tender_type_id set to NULL. Otherwise, allow editing.
if (!empty($tender['TenderType']['id']))
$this->addSideMenuLink('Edit',
array('action' => 'edit', $id), null,
'ACTION');
// Prepare to render.
$title = "Tender #{$tender['Tender']['id']} : {$tender['Tender']['name']}";
$this->set(compact('tender', 'title'));

View File

@@ -249,10 +249,6 @@ class UnitsController extends AppController {
}
// Set up dynamic menu items
$this->addSideMenuLink('Edit',
array('action' => 'edit', $id), null,
'ACTION');
if (isset($unit['CurrentLease']['id']) &&
!isset($unit['CurrentLease']['moveout_date'])) {
$this->addSideMenuLink('Move-Out',
@@ -280,6 +276,10 @@ class UnitsController extends AppController {
'ACTION');
}
$this->addSideMenuLink('Edit',
array('action' => 'edit', $id), null,
'ACTION');
// Prepare to render.
$title = 'Unit ' . $unit['Unit']['name'];
$this->set(compact('unit', 'title',