|
From: <gem...@li...> - 2011-10-21 15:43:14
|
Revision: 126
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=126&view=rev
Author: matijsdejong
Date: 2011-10-21 15:43:06 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
Fix for #28 database actions do not show correctly in menu.
Preparations started for #29 and associated #18: configurable automatic mails.
Continued working on #10: SnippetAction now has create and edit actions as well.
Made MUtil/Controller/ModelSnippetActionAbstract.php independent of MUtil/Controller/ModelActionAbstract.php less code was copied than was left unused and the copied code has been stable for a long time.
Modified Paths:
--------------
trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
trunk/library/classes/Gems/Default/DatabaseAction.php
trunk/library/classes/Gems/Email/MultiMailForm.php
trunk/library/classes/Gems/Util/DbLookup.php
trunk/library/classes/Gems/Util/Translated.php
trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php
trunk/library/configs/db/patches.sql
trunk/library/controllers/MailController.php
Added Paths:
-----------
trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php
trunk/library/snippets/Generic/ModelFormSnippet.php
Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
===================================================================
--- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -26,7 +26,6 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Short description of file
*
* @package Gems
* @subpackage Controller
@@ -37,10 +36,8 @@
*/
/**
- * Short description for class
+ * Class contains Gems specific adaptations to parent class.
*
- * Long description for class (if any)...
- *
* @package Gems
* @subpackage Controller
* @copyright Copyright (c) 2011 Erasmus MC
@@ -50,12 +47,6 @@
abstract class Gems_Controller_ModelSnippetActionAbstract extends MUtil_Controller_ModelSnippetActionAbstract
{
/**
- *
- * @var GemsEscort
- */
- public $escort;
-
- /**
* The parameters used for the autofilter action.
*
* @var array Mixed key => value array for snippet initialization
@@ -74,6 +65,19 @@
protected $autofilterSnippets = 'Generic_ModelTableSnippet';
/**
+ * The snippets used for the create and edit actions.
+ *
+ * @var mixed String or array of snippets name
+ */
+ protected $createEditSnippets = 'Generic_ModelFormSnippet';
+
+ /**
+ *
+ * @var GemsEscort
+ */
+ public $escort;
+
+ /**
* The snippets used for the index action, before those in autofilter
*
* @var mixed String or array of snippets name
Modified: trunk/library/classes/Gems/Default/DatabaseAction.php
===================================================================
--- trunk/library/classes/Gems/Default/DatabaseAction.php 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/classes/Gems/Default/DatabaseAction.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -93,6 +93,18 @@
}
/**
+ * Set the parameters needed by the menu.
+ *
+ * @param array $data The current model item
+ */
+ private function _setMenuParameters(array $data)
+ {
+ $source = $this->menu->getParameterSource();
+ $source['script'] = $data['script'] ? true : false;
+ $source['exists'] = $data['exists'] ? true : false;
+ }
+
+ /**
* Adds elements from the model to the bridge that creates the form.
*
* Overrule this function to add different elements to the browse table, without
@@ -180,6 +192,8 @@
$model = $this->getModel();
$data = $model->applyRequest($this->getRequest())->loadFirst();
+ $this->_setMenuParameters($data);
+
if (! ($data && isset($data['exists']) && $data['exists'])) {
$this->addMessage($this->_('This database object does not exist. You cannot delete it.'));
$this->html->buttonDiv($this->createMenuLinks(1));
@@ -438,6 +452,8 @@
$model = $this->getModel();
$data = $model->loadFirst();
+ $this->_setMenuParameters($data);
+
if (! ($data && isset($data['exists'], $data['script']) && ($data['exists'] || $data['script']))) {
$this->addMessage($this->_('This database object does not exist. You cannot create it.'));
$this->html->buttonDiv($this->createMenuLinks(1));
@@ -580,9 +596,9 @@
$model = $this->getModel();
$data = $model->loadFirst();
- $source = $this->menu->getParameterSource();
- $source['script'] = $data['script'];
- $source['exists'] = $data['exists'];
+ if ($data) {
+ $this->_setMenuParameters($data);
+ }
parent::showAction();
}
@@ -592,6 +608,8 @@
$model = $this->getModel();
$data = $model->loadFirst();
+ $this->_setMenuParameters($data);
+
if (! ($data && isset($data['exists']) && $data['exists'])) {
$this->addMessage($this->_('This database object does not exist. You cannot view it.'));
$this->html->buttonDiv($this->createMenuLinks(1));
Modified: trunk/library/classes/Gems/Email/MultiMailForm.php
===================================================================
--- trunk/library/classes/Gems/Email/MultiMailForm.php 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/classes/Gems/Email/MultiMailForm.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -1,31 +1,31 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
* @version $Id$
* @package Gems
* @subpackage Email
@@ -69,15 +69,11 @@
protected function createMethodElement()
{
- $options = array(
- 'M' => $this->escort->_('Send multiple mails per respondent, one for each checked token.'),
- 'O' => $this->escort->_('Send one mail per respondent, mark all checked tokens as send.'),
- 'A' => $this->escort->_('Send one mail per respondent, mark only mailed tokens as send.'),
- );
+ $options = $this->escort->getUtil()->getTranslated()->getBulkMailProcessOptions();
return new Zend_Form_Element_Radio('multi_method', array(
'label' => $this->escort->_('Method'),
- 'multiOptions' => $options,
+ 'multiOptions' => $options,
'required' => true,
));
}
@@ -138,11 +134,11 @@
$title = null;
}
- return $this->_createMultiOption($tokenData,
- $this->mailer->getTokenName($tokenData),
- $tokenData['grs_email'],
- $tokenData['survey_short'],
- $title,
+ return $this->_createMultiOption($tokenData,
+ $this->mailer->getTokenName($tokenData),
+ $tokenData['grs_email'],
+ $tokenData['survey_short'],
+ $title,
$menuFind);
}
@@ -202,7 +198,7 @@
$this->tokensData = $tokensData;
$this->setTokenData(reset($tokensData));
-
+
return $this;
}
}
Copied: trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php (from rev 124, trunk/library/classes/Gems/Snippets/ModelTableSnippetGeneric.php)
===================================================================
--- trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php (rev 0)
+++ trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -0,0 +1,70 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Snippets
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
+ */
+
+/**
+ * Displays an edit form based on the model the model set through the $model snippet parameter.
+ *
+ * If you want to use this class "as is" use the 'Generic_ModelFormSnippet' snippet.
+ *
+ * This class is not in the standard snippet loading directories and does not follow
+ * their naming conventions, but exists only to make it simple to extend this class
+ * for a specific implementation.
+ *
+ * @package MUtil
+ * @subpackage Snippets
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4.4
+ */
+class Gems_Snippets_ModelFormSnippetGeneric extends Gems_Snippets_ModelFormSnippetAbstract
+{
+ /**
+ *
+ * @var MUtil_Model_ModelAbstract
+ */
+ protected $model;
+
+ /**
+ * Creates the model
+ *
+ * @return MUtil_Model_ModelAbstract
+ */
+ protected function createModel()
+ {
+ return $this->model;
+ }
+}
Modified: trunk/library/classes/Gems/Util/DbLookup.php
===================================================================
--- trunk/library/classes/Gems/Util/DbLookup.php 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/classes/Gems/Util/DbLookup.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -104,6 +104,33 @@
return $groups;
}
+ /**
+ * Retrieve an array of groups the user is allowed to assign: his own group and all groups
+ * he inherits rights from
+ *
+ * @return array
+ */
+ public function getAllowedStaffGroups()
+ {
+ $groups = $this->getActiveStaffGroups();
+ if ($this->session->user_role === 'super') {
+ return $groups;
+
+ } else {
+ $rolesAllowed = $this->acl->getRoleAndParents($this->session->user_role);
+ $roles = $this->db->fetchPairs('SELECT ggp_id_group, ggp_role FROM gems__groups WHERE ggp_group_active=1 AND ggp_staff_members=1 ORDER BY ggp_name');
+ $result = array();
+
+ foreach ($roles as $id => $role) {
+ if ((in_array($role, $rolesAllowed)) && isset($groups[$id])) {
+ $result[$id] = $groups[$id];
+ }
+ }
+
+ return $result;
+ }
+ }
+
public function getDefaultGroup()
{
$groups = $this->getActiveStaffGroups();
@@ -140,7 +167,24 @@
}
/**
+ * Return the available mail templates.
*
+ * @staticvar array $data
+ * @return array The tempalteId => subject list
+ */
+ public function getMailTemplates()
+ {
+ static $data;
+
+ if (! $data) {
+ $data = $this->db->fetchPairs("SELECT gmt_id_message, gmt_subject FROM gems__mail_templates ORDER BY gmt_subject");
+ }
+
+ return $data;
+ }
+
+ /**
+ *
* @staticvar array $organizations
* @return array List of the active organizations
*/
@@ -192,33 +236,6 @@
return $groups;
}
- /**
- * Retrieve an array of groups the user is allowed to assign: his own group and all groups
- * he inherits rights from
- *
- * @return array
- */
- public function getAllowedStaffGroups()
- {
- $groups = $this->getActiveStaffGroups();
- if ($this->session->user_role === 'super') {
- return $groups;
-
- } else {
- $rolesAllowed = $this->acl->getRoleAndParents($this->session->user_role);
- $roles = $this->db->fetchPairs('SELECT ggp_id_group, ggp_role FROM gems__groups WHERE ggp_group_active=1 AND ggp_staff_members=1 ORDER BY ggp_name');
- $result = array();
-
- foreach ($roles as $id => $role) {
- if ((in_array($role, $rolesAllowed)) && isset($groups[$id])) {
- $result[$id] = $groups[$id];
- }
- }
-
- return $result;
- }
- }
-
public function getUserConsents()
{
static $consents;
Modified: trunk/library/classes/Gems/Util/Translated.php
===================================================================
--- trunk/library/classes/Gems/Util/Translated.php 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/classes/Gems/Util/Translated.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -170,6 +170,20 @@
}
/**
+ * The options for bulk mail token processing.
+ *
+ * @return array
+ */
+ public function getBulkMailProcessOptions()
+ {
+ return array(
+ 'M' => $this->_('Send multiple mails per respondent, one for each checked token.'),
+ 'O' => $this->_('Send one mail per respondent, mark all checked tokens as send.'),
+ 'A' => $this->_('Send one mail per respondent, mark only mailed tokens as send.'),
+ );
+ }
+
+ /**
* Get a translated empty value for usage in dropdowns
*
* On instantiation of the class via Gems_Loader this variable will be populated
Modified: trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -46,9 +46,18 @@
* @license New BSD License
* @since Class available since version 1.4.2
*/
-abstract class MUtil_Controller_ModelSnippetActionAbstract extends MUtil_Controller_ModelActionAbstract
+abstract class MUtil_Controller_ModelSnippetActionAbstract extends MUtil_Controller_Action
{
/**
+ * Created in createModel().
+ *
+ * Always retrieve using $this->getModel().
+ *
+ * $var MUtil_Model_ModelAbstract $_model The model in use
+ */
+ private $_model;
+
+ /**
* The parameters used for the autofilter action.
*
* @var array Mixed key => value array for snippet initialization
@@ -63,6 +72,20 @@
protected $autofilterSnippets = 'ModelTableSnippet';
/**
+ * The parameters used for the create and edit actions.
+ *
+ * @var array Mixed key => value array for snippet initialization
+ */
+ protected $createEditParameters = array();
+
+ /**
+ * The snippets used for the create and edit actions.
+ *
+ * @var mixed String or array of snippets name
+ */
+ protected $createEditSnippets = 'ModelFormSnippet';
+
+ /**
* The parameters used for the index action minus those in autofilter.
*
* @var array Mixed key => value array for snippet initialization
@@ -111,6 +134,23 @@
public $summarizedActions = array('index', 'autofilter');
/**
+ * Set to true in so $this->html is created at startup.
+ *
+ * @var boolean $useHtmlView true
+ */
+ public $useHtmlView = true; // Overrule parent
+
+ /**
+ * The request ID value
+ *
+ * @return string The request ID value
+ */
+ protected function _getIdParam()
+ {
+ return $this->_getParam(MUtil_Model::REQUEST_ID);
+ }
+
+ /**
* Set the action key in request
*
* Use this when an action is a Ajax action for retrieving
@@ -157,6 +197,77 @@
}
/**
+ * Action for showing a create new page
+ */
+ public function createAction()
+ {
+ if ($this->createEditSnippets) {
+ $this->createEditParameters['createData'] = true;
+ $this->createEditParameters['model'] = $this->getModel();
+ $this->createEditParameters['request'] = $this->getRequest();
+
+ $this->addSnippets($this->createEditSnippets, $this->createEditParameters);
+ }
+ }
+
+ /**
+ * Creates a model for getModel(). Called only for each new $action.
+ *
+ * The parameters allow you to easily adapt the model to the current action. The $detailed
+ * parameter was added, because the most common use of action is a split between detailed
+ * and summarized actions.
+ *
+ * @param boolean $detailed True when the current action is not in $summarizedActions.
+ * @param string $action The current action.
+ * @return MUtil_Model_ModelAbstract
+ */
+ abstract protected function createModel($detailed, $action);
+
+ /**
+ * Action for showing a edit item page
+ */
+ public function editAction()
+ {
+ if ($this->createEditSnippets) {
+ $this->createEditParameters['createData'] = false;
+ $this->createEditParameters['model'] = $this->getModel();
+ $this->createEditParameters['request'] = $this->getRequest();
+
+ $this->addSnippets($this->createEditSnippets, $this->createEditParameters);
+ }
+ }
+
+ /**
+ * Returns the model for the current $action.
+ *
+ * The parameters allow you to easily adapt the model to the current action. The $detailed
+ * parameter was added, because the most common use of action is a split between detailed
+ * and summarized actions.
+ *
+ * @return MUtil_Model_ModelAbstract
+ */
+ protected function getModel()
+ {
+ $request = $this->getRequest();
+ $action = null === $request ? '' : $request->getActionName();
+
+ // Only get new model if there is no model or the model was for a different action
+ if (! ($this->_model && $this->_model->isMeta('action', $action))) {
+ $detailed = ! in_array($action, $this->summarizedActions);
+
+ $this->_model = $this->createModel($detailed, $action);
+ $this->_model->setMeta('action', $action);
+
+ // Detailed models DO NOT USE $_POST for filtering,
+ // multirow models DO USE $_POST parameters for filtering.
+ $this->_model->applyRequest($request, $detailed);
+ }
+
+ return $this->_model;
+ }
+
+
+ /**
* Action for showing a browse page
*/
public function indexAction()
@@ -179,7 +290,6 @@
}
}
-
/**
* Action for showing an item page
*/
Modified: trunk/library/configs/db/patches.sql
===================================================================
--- trunk/library/configs/db/patches.sql 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/configs/db/patches.sql 2011-10-21 15:43:06 UTC (rev 126)
@@ -211,6 +211,7 @@
-- PATCH: Add mail actions to admin role
UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.mail.log') WHERE grl_name = 'admin' AND grl_privileges NOT LIKE '%pr.mail.log%';
UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.mail.server,pr.mail.server.create,pr.mail.server.delete,pr.mail.server.edit') WHERE grl_name = 'super' AND grl_privileges NOT LIKE '%pr.mail.server%';
+UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.mail.job,pr.mail.job.create,pr.mail.job.delete,pr.mail.job.edit') WHERE grl_name = 'super' AND grl_privileges NOT LIKE '%pr.mail.job%';
-- PATCH: Set default for new rounds at days
ALTER TABLE `gems__round_periods` CHANGE `grp_valid_after_unit` `grp_valid_after_unit` CHAR(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'D',
Modified: trunk/library/controllers/MailController.php
===================================================================
--- trunk/library/controllers/MailController.php 2011-10-21 13:55:24 UTC (rev 125)
+++ trunk/library/controllers/MailController.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -1,33 +1,48 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package Gems
+ * @subpackage Default
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
+ */
+
+/**
+ *
+ * @package Gems
+ * @subpackage Default
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4.2
+ */
class MailController extends Gems_Default_MailAction
{
}
Copied: trunk/library/snippets/Generic/ModelFormSnippet.php (from rev 124, trunk/library/snippets/Generic/ModelTableSnippet.php)
===================================================================
--- trunk/library/snippets/Generic/ModelFormSnippet.php (rev 0)
+++ trunk/library/snippets/Generic/ModelFormSnippet.php 2011-10-21 15:43:06 UTC (rev 126)
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Snippets
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
+ */
+
+/**
+ * Displays an edit form based on the model the model set through the $model snippet parameter.
+ *
+ * Usage snippet for Gems_Snippets_ModelTableSnippetGeneric
+ *
+ * @package MUtil
+ * @subpackage Snippets
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4
+ */
+class Generic_ModelFormSnippet extends Gems_Snippets_ModelFormSnippetGeneric
+{ }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|