|
From: <gem...@li...> - 2012-09-26 18:33:12
|
Revision: 962
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=962&view=rev
Author: matijsdejong
Date: 2012-09-26 18:33:03 +0000 (Wed, 26 Sep 2012)
Log Message:
-----------
Code now works with multiple success reception codes
Modified Paths:
--------------
trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
trunk/library/classes/Gems/Default/ReceptionAction.php
trunk/library/classes/Gems/Util/ReceptionCode.php
trunk/library/classes/MUtil/Snippets/SnippetAbstract.php
trunk/library/snippets/Generic/ModelItemTableSnippet.php
trunk/library/snippets/ShowSingleSurveyTokenSnippet.php
trunk/library/snippets/ShowTrackTokenSnippet.php
Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
===================================================================
--- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-09-26 13:35:44 UTC (rev 961)
+++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-09-26 18:33:03 UTC (rev 962)
@@ -118,7 +118,7 @@
*
* @var mixed String or array of snippets name
*/
- protected $showSnippets = array('Generic_ContentTitleSnippet', 'Generic_ModelItemTableSnippet');
+ protected $showSnippets = array('Generic_ContentTitleSnippet', 'ModelItemTableSnippetGeneric');
/**
*
Modified: trunk/library/classes/Gems/Default/ReceptionAction.php
===================================================================
--- trunk/library/classes/Gems/Default/ReceptionAction.php 2012-09-26 13:35:44 UTC (rev 961)
+++ trunk/library/classes/Gems/Default/ReceptionAction.php 2012-09-26 18:33:03 UTC (rev 962)
@@ -82,7 +82,6 @@
$model->set('grc_success', 'label', $this->_('Is success code'),
'multiOptions', $yesNo ,
- 'disabled', true,
'elementClass', 'CheckBox',
'description', $this->_('This reception code is a success code.'));
$model->set('grc_active', 'label', $this->_('Active'),
Modified: trunk/library/classes/Gems/Util/ReceptionCode.php
===================================================================
--- trunk/library/classes/Gems/Util/ReceptionCode.php 2012-09-26 13:35:44 UTC (rev 961)
+++ trunk/library/classes/Gems/Util/ReceptionCode.php 2012-09-26 18:33:03 UTC (rev 962)
@@ -92,6 +92,24 @@
*
* @return boolean
*/
+ public function getDescription()
+ {
+ return $this->_get('grc_description');
+ }
+
+ /**
+ *
+ * @return boolean
+ */
+ public function hasDescription()
+ {
+ return (boolean) $this->_get('grc_description');
+ }
+
+ /**
+ *
+ * @return boolean
+ */
public function hasRedoCode()
{
return (boolean) $this->_get('grc_redo_survey');
Modified: trunk/library/classes/MUtil/Snippets/SnippetAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Snippets/SnippetAbstract.php 2012-09-26 13:35:44 UTC (rev 961)
+++ trunk/library/classes/MUtil/Snippets/SnippetAbstract.php 2012-09-26 18:33:03 UTC (rev 962)
@@ -243,6 +243,7 @@
public function redirectRoute()
{
if ($url = $this->getRedirectRoute()) {
+ MUtil_Echo::track($url);
$router = new Zend_Controller_Action_Helper_Redirector();
$router->gotoRouteAndExit($url, null, $this->resetRoute);
}
Modified: trunk/library/snippets/Generic/ModelItemTableSnippet.php
===================================================================
--- trunk/library/snippets/Generic/ModelItemTableSnippet.php 2012-09-26 13:35:44 UTC (rev 961)
+++ trunk/library/snippets/Generic/ModelItemTableSnippet.php 2012-09-26 18:33:03 UTC (rev 962)
@@ -39,6 +39,7 @@
* Displays each fields of a single item in a model in a row in a Html table
* the model set through the $model snippet parameter.
*
+ * @deprecated No longer needed with new snippet loader
* @package Gems
* @subpackage Snippets\Generic
* @copyright Copyright (c) 2011 Erasmus MC
Modified: trunk/library/snippets/ShowSingleSurveyTokenSnippet.php
===================================================================
--- trunk/library/snippets/ShowSingleSurveyTokenSnippet.php 2012-09-26 13:35:44 UTC (rev 961)
+++ trunk/library/snippets/ShowSingleSurveyTokenSnippet.php 2012-09-26 18:33:03 UTC (rev 962)
@@ -100,7 +100,7 @@
// COMPLETION DATE
$fields = array();
- if (! $this->token->hasSuccesCode()) {
+ if ($this->token->getReceptionCode()->hasDescription()) {
$bridge->addMarkerRow();
$fields[] = 'grc_description';
}
Modified: trunk/library/snippets/ShowTrackTokenSnippet.php
===================================================================
--- trunk/library/snippets/ShowTrackTokenSnippet.php 2012-09-26 13:35:44 UTC (rev 961)
+++ trunk/library/snippets/ShowTrackTokenSnippet.php 2012-09-26 18:33:03 UTC (rev 962)
@@ -105,7 +105,7 @@
// COMPLETION DATE
$fields = array();
- if (! $this->token->hasSuccesCode()) {
+ if ($this->token->getReceptionCode()->hasDescription()) {
$bridge->addMarkerRow();
$fields[] = 'grc_description';
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|