|
From: <gem...@li...> - 2011-09-13 14:38:21
|
Revision: 11
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=11&view=rev
Author: matijsdejong
Date: 2011-09-13 14:38:14 +0000 (Tue, 13 Sep 2011)
Log Message:
-----------
- starting to make trackId just an option
Modified Paths:
--------------
trunk/library/classes/Gems/Default/TrackAction.php
trunk/library/classes/Gems/Menu/MenuAbstract.php
Modified: trunk/library/classes/Gems/Default/TrackAction.php
===================================================================
--- trunk/library/classes/Gems/Default/TrackAction.php 2011-09-13 12:28:48 UTC (rev 10)
+++ trunk/library/classes/Gems/Default/TrackAction.php 2011-09-13 14:38:14 UTC (rev 11)
@@ -479,7 +479,7 @@
$this->html->h2(sprintf($this->_('%s track for respondent nr %s'), $data['gtr_track_name'], $this->_getParam(MUtil_Model::REQUEST_ID)));
- if (! isset($this->project->trackId)) {
+ if (! $this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) {
$table = parent::getShowTable();
$table->setRepeater(array($data));
@@ -514,7 +514,7 @@
$this->addSnippet('TrackTokenOverviewSnippet', 'trackData', $data, 'baseUrl', $baseUrl);
- if (! isset($this->project->trackId)) {
+ if (! $this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) {
$this->addTrackUsage($data['gr2o_patient_nr'], $data['gr2t_id_organization'], $data['gr2t_id_track'], $baseUrl);
}
Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php
===================================================================
--- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-13 12:28:48 UTC (rev 10)
+++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-13 14:38:14 UTC (rev 11)
@@ -242,12 +242,18 @@
public function addProjectPage($label)
{
if ($this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) {
- $infoPage = $this->addPage($label, 'pr.project', 'project-tracks', 'show')
- ->addHiddenParameter(MUtil_Model::REQUEST_ID, $this->escort->getTrackId());
- $trackSurveys = $infoPage->addShowAction('pr.project');
- $trackSurveys->addActionButton($this->_('Preview'), 'pr.project.questions', 'questions')
+ if ($trackId = $this->escort->getTrackId()) {
+ $infoPage = $this->addPage($label, 'pr.project', 'project-tracks', 'show')
+ ->addHiddenParameter(MUtil_Model::REQUEST_ID, $trackId);
+ $trackSurveys = $infoPage;
+ } else {
+ $infoPage = $this->addPage($label, 'pr.project', 'project-tracks');
+ $trackSurveys = $infoPage->addShowAction('pr.project');
+ }
+ $trackSurveys->addAction($this->_('Preview'), 'pr.project.questions', 'questions')
->addNamedParameters(MUtil_Model::REQUEST_ID, 'gro_id_track', Gems_Model::SURVEY_ID, 'gsu_id_survey');
+ // MUtil_Echo::track($infoPage->_toNavigationArray(array($this->escort->request)));
} else {
if ($this->escort instanceof Gems_Project_Tracks_StandAloneSurveysInterface) {
$infoPage = $this->addContainer($label, 'pr.project');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|