Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r475 - in registry/trunk/app: Controller View/Elements

Subject: COmanage Developers List

List archive

[comanage-dev] r475 - in registry/trunk/app: Controller View/Elements


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r475 - in registry/trunk/app: Controller View/Elements
  • Date: Fri, 1 Mar 2013 23:46:40 -0500
  • Authentication-results: sfpop-ironport05.merit.edu; dkim=neutral (message not signed) header.i=none

Author: marie
Date: 2013-03-01 23:46:40 -0500 (Fri, 01 Mar 2013)
New Revision: 475

Modified:
registry/trunk/app/Controller/AppController.php
registry/trunk/app/View/Elements/dropMenu.ctp
Log:
co558 - passing content to menu explicitly in case it is not set on some pages

Modified: registry/trunk/app/Controller/AppController.php
===================================================================
--- registry/trunk/app/Controller/AppController.php 2013-03-02 01:38:38
UTC (rev 474)
+++ registry/trunk/app/Controller/AppController.php 2013-03-02 04:46:40
UTC (rev 475)
@@ -1114,6 +1114,12 @@
$menu['plugins'][$plugin] = $this->$plugin->cmPluginMenus;
}
}
+
+ // Determine user's own NSF Demographics id
+
+ $this->loadModel('CoPerson');
+ $persondata = $this->CoPerson->findById($orgIDs[0]['co_id']);
+ $menu['CoNsfDemographic']['id'] = $persondata['CoNsfDemographic']['id'];

$this->set('menuContent', $menu);
}

Modified: registry/trunk/app/View/Elements/dropMenu.ctp
===================================================================
--- registry/trunk/app/View/Elements/dropMenu.ctp 2013-03-02 01:38:38
UTC (rev 474)
+++ registry/trunk/app/View/Elements/dropMenu.ctp 2013-03-02 04:46:40
UTC (rev 475)
@@ -345,12 +345,12 @@

// Adjust the link to the NSF Demographics Controller
according to whether or
// not data has been set.
- if(empty($co_people[0]['CoNsfDemographic']['id'])) {
+ if(empty($menuContent['CoNsfDemographic'][id])) {
$args['action'] = 'add';
- $args['copersonid'] = $co_people[0]['CoPerson']['id'];
+ $args['copersonid'] = $mycos[0]['co_person_id'];
} else {
$args['action'] = 'edit';
- $args[] = $co_people[0]['CoNsfDemographic']['id'];
+ $args[] = $menuContent['CoNsfDemographic']['id'];
}

print $this->Html->link(_txt('me.for',
array($co['co_name'])), $args);



  • [comanage-dev] r475 - in registry/trunk/app: Controller View/Elements, svnlog, 03/01/2013

Archive powered by MHonArc 2.6.16.

Top of Page