From: <gem...@li...> - 2012-06-07 14:04:28
|
Revision: 745 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=745&view=rev Author: matijsdejong Date: 2012-06-07 14:04:22 +0000 (Thu, 07 Jun 2012) Log Message: ----------- Updated changelog + Upgrades AElement.php email title only set when empty Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Upgrades.php trunk/library/classes/MUtil/Html/AElement.php Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2012-06-07 14:03:17 UTC (rev 744) +++ trunk/library/changelog.txt 2012-06-07 14:04:22 UTC (rev 745) @@ -1,3 +1,12 @@ +Important changes from 1.5.3 => 1.5.4 +============================================================ +New logLevel project.ini setting +Added export of all patient data on a single page or PDF (if binary specified in project.ini) +Fixed a lot of issues with staff not being able to login or not being created +Fixed handling of token return on multi-url sites +Added maximum number of reminders sent to tokens +Fixed several date display and editing issues + Important changes from 1.5.2 => 1.5.3 ============================================================ People can login using their e-mail address as user name. This can be activated by for respondents and staff seperately, by default this is off for both. Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2012-06-07 14:03:17 UTC (rev 744) +++ trunk/library/classes/Gems/Upgrades.php 2012-06-07 14:04:22 UTC (rev 745) @@ -1,4 +1,5 @@ <?php + /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -59,6 +60,7 @@ $this->register(array($this, 'Upgrade150to151'), 'Upgrade from 1.5.0 to 1.5.1'); $this->register(array($this, 'Upgrade151to152'), 'Upgrade from 1.5.1 to 1.5.2'); $this->register(array($this, 'Upgrade152to153'), 'Upgrade from 1.5.2 to 1.5.3'); + $this->register(array($this, 'Upgrade153to154'), 'Upgrade from 1.5.3 to 1.5.4'); } @@ -116,4 +118,14 @@ return true; } + + /** + * To upgrade to 1.5.4 just execute patchlevel 47 + */ + public function Upgrade153to154() + { + $this->_batch->addTask('Db_ExecutePatch', 47); + + return true; + } } \ No newline at end of file Modified: trunk/library/classes/MUtil/Html/AElement.php =================================================================== --- trunk/library/classes/MUtil/Html/AElement.php 2012-06-07 14:03:17 UTC (rev 744) +++ trunk/library/classes/MUtil/Html/AElement.php 2012-06-07 14:04:22 UTC (rev 745) @@ -112,7 +112,9 @@ $href = $args['href']; unset($args['href']); } else { - $args['title'] = $email; + if (! isset($args['title'])) { + $args['title'] = $email; + } $href = array('mailto:', $email); } if (! isset($args['onclick'])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-06-21 12:10:48
|
Revision: 777 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=777&view=rev Author: matijsdejong Date: 2012-06-21 12:10:37 +0000 (Thu, 21 Jun 2012) Log Message: ----------- Third step in multi organizational view: everything seems to work as intended but found issue at token return that needs to be fixed Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Default/RespondentAction.php trunk/library/classes/Gems/Menu/SubMenuItem.php trunk/library/classes/Gems/Model.php trunk/library/classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php trunk/library/classes/MUtil/Html/ArrayAttribute.php trunk/library/snippets/ShowSingleSurveyTokenSnippet.php trunk/library/snippets/ShowTrackTokenSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Menu/HiddenOrganizationHrefAttribute.php Removed Paths: ------------- trunk/library/classes/Gems/Model/ModelAbstract.php Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/changelog.txt 2012-06-21 12:10:37 UTC (rev 777) @@ -1,3 +1,9 @@ +Important changes from 1.5.4 => 1.5.5 +============================================================ +Internally code no longer uses the 'Hidden Organization' but expects both an id1/patientNr plus an id2/organizationId to be specified +Externally the organization id is still left out of the url when not needed +Check all your (snippet) extensions to RespondentAction and project specific versions of ShowTrackTokenSnippet and ShowSingleSurveySnippet: you may need to specify extra parameters as the menu items need to know the organization id + Important changes from 1.5.3 => 1.5.4 ============================================================ New logLevel project.ini setting Modified: trunk/library/classes/Gems/Default/RespondentAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentAction.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-06-21 12:10:37 UTC (rev 777) @@ -52,7 +52,7 @@ 'RespondentTokenTabsSnippet', 'RespondentTokenSnippet', ); - + public $exportSnippets = array('RespondentDetailsSnippet'); public $filterStandard = array('grc_success' => 1); @@ -60,10 +60,10 @@ public $sortKey = array('gr2o_opened' => SORT_DESC); public $useTabbedForms = true; - + /** - * Constructs the form - * + * Constructs the form + * * @param Gems_Export_RespondentExport $export * @return Gems_Form_TableForm */ @@ -71,12 +71,12 @@ { $form = new Gems_Form_TableForm(); $form->setAttrib('target', '_blank'); - + $element = new Zend_Form_Element_Checkbox('group'); $element->setLabel($this->_('Group surveys')); $element->setValue(1); $form->addElement($element); - + $element = new Zend_Form_Element_Select('format'); $element->setLabel($this->_('Output format')); $outputFormats = array('html' => 'HTML'); @@ -86,12 +86,12 @@ } $element->setMultiOptions($outputFormats); $form->addElement($element); - + $element = new Zend_Form_Element_Submit('export'); $element->setLabel($this->_('Export')) ->setAttrib('class', 'button'); $form->addElement($element); - + return $form; } @@ -245,7 +245,7 @@ $model->addColumn('CASE WHEN grs_email IS NULL OR LENGTH(TRIM(grs_email)) = 0 THEN 1 ELSE 0 END', 'calc_email'); } - $model->set('gr2o_id_organization', 'default', $model->getCurrentOrganization()); + $model->set('gr2o_id_organization', 'default', $this->getOrganizationId()); return $model; } @@ -343,6 +343,20 @@ $this->html[] = $form; } + /** + * Returns the currently used organization + * + * @return int An organization id + */ + protected function getOrganizationId() + { + if ($orgId = $this->_getParam(MUtil_Model::REQUEST_ID2)) { + return $orgId; + } + + return $this->loader->getCurrentUser()->getCurrentOrganizationId(); + } + public function getMenuParameter($name, $default) { switch ($name) { @@ -476,18 +490,18 @@ } $params['respondentData'] = $data; $this->addSnippets($this->exportSnippets, $params); - + //Now show the export form $export = $this->loader->getRespondentExport($this); $form = $this->_getExportForm($export); $this->html->h2($this->_('Export respondent')); $div = $this->html->div(array('id' => 'mainform')); $div[] = $form; - + $request = $this->getRequest(); - + $form->populate($request->getParams()); - + if ($request->isPost()) { $export->render((array) $data['gr2o_patient_nr'], $this->getRequest()->getParam('group'), $this->getRequest()->getParam('format')); } Added: trunk/library/classes/Gems/Menu/HiddenOrganizationHrefAttribute.php =================================================================== --- trunk/library/classes/Gems/Menu/HiddenOrganizationHrefAttribute.php (rev 0) +++ trunk/library/classes/Gems/Menu/HiddenOrganizationHrefAttribute.php 2012-06-21 12:10:37 UTC (rev 777) @@ -0,0 +1,78 @@ +<?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 <COPYRIGHT HOLDER> 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 Menu + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * A class that hides the current organization when it is specified as parameter + * + * @package Gems + * @subpackage Menu + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.5 + */ +class Gems_Menu_HiddenOrganizationHrefAttribute extends MUtil_Html_HrefArrayAttribute +{ + private $_hiddenOrgId; + + /** + * Returns the rendered values of th earray elements + * + * @return array + */ + protected function _getArrayRendered() + { + $results = parent::_getArrayRendered(); + + // MUtil_Echo::track($results); + + if (isset($results[MUtil_Model::REQUEST_ID1], $results[MUtil_Model::REQUEST_ID2]) && ($results[MUtil_Model::REQUEST_ID2] == $this->_hiddenOrgId)) { + $results[MUtil_Model::REQUEST_ID] = $results[MUtil_Model::REQUEST_ID1]; + unset($results[MUtil_Model::REQUEST_ID1], $results[MUtil_Model::REQUEST_ID2]); + } + + return $results; + } + + /** + * The organization id that should not be displayed. + * + * @param int $orgId Organization id + */ + public function setHiddenOrgId($orgId) { + $this->_hiddenOrgId = $orgId; + } +} Modified: trunk/library/classes/Gems/Menu/SubMenuItem.php =================================================================== --- trunk/library/classes/Gems/Menu/SubMenuItem.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/classes/Gems/Menu/SubMenuItem.php 2012-06-21 12:10:37 UTC (rev 777) @@ -161,6 +161,15 @@ } } + /** + * A function that determines the parameters that this menu item should have using these paramter + * sources. + * + * @param Gems_Menu_ParameterCollector $source A source of parameter values + * @param array $parameters A usually empty array of parameters that is filled from the sources + * @param boolean $raiseConditions When true, no lazyness is returned + * @return boolean Or lazy condition. When true menu item is enabled otherwise false + */ private function _applyParameterSources(Gems_Menu_ParameterCollector $source, array &$parameters, $raiseConditions) { // Gems_Menu::$verbose = true; @@ -185,10 +194,9 @@ } } - if ($this->_hiddenOrgId) { - // Remove org paramter that should remain hidden. + if ($this->_hiddenOrgId && $raiseConditions) { + // Remove org paramter that should remain hidden when conditions have been raised. if (isset($parameters[MUtil_Model::REQUEST_ID1], $parameters[MUtil_Model::REQUEST_ID2]) && - (! $parameters[MUtil_Model::REQUEST_ID2] instanceof MUtil_Lazy_LazyInterface) && ($parameters[MUtil_Model::REQUEST_ID2] == $this->_hiddenOrgId)) { $parameters[MUtil_Model::REQUEST_ID] = $parameters[MUtil_Model::REQUEST_ID1]; unset($parameters[MUtil_Model::REQUEST_ID1], $parameters[MUtil_Model::REQUEST_ID2]); @@ -198,6 +206,13 @@ return $condition; } + /** + * Generate a hrf attribute using these sources + * + * @param Gems_Menu_ParameterCollector $source A parameter source collection + * @param boolean $condition When true the system may create a Lazy condition for the url + * @return MUtil_Html_HrefArrayAttribute + */ private function _toHRef(Gems_Menu_ParameterCollector $source, &$condition) { if ($this->get('allowed')) { @@ -205,7 +220,12 @@ if ($condition = $this->_applyParameterSources($source, $parameters, ! $condition)) { - $url = new MUtil_Html_HrefArrayAttribute($parameters); + if ($this->_hiddenOrgId) { + $url = new Gems_Menu_HiddenOrganizationHrefAttribute($parameters); + $url->setHiddenOrgId($this->_hiddenOrgId); + } else { + $url = new MUtil_Html_HrefArrayAttribute($parameters); + } $url->setRouteReset($this->get('reset_param', true)); foreach (array('module', 'controller', 'action', 'route') as $name) { @@ -577,6 +597,7 @@ if ($patientId = $request->getParam(MUtil_Model::REQUEST_ID)) { $request->setParam(MUtil_Model::REQUEST_ID1, $patientId); $request->setParam(MUtil_Model::REQUEST_ID2, $this->_hiddenOrgId); + $request->setParam(MUtil_Model::REQUEST_ID, null); } } @@ -781,6 +802,7 @@ public function removeParameters() { + $this->_parameters = true; $this->_requiredParameters = null; return $this; } Deleted: trunk/library/classes/Gems/Model/ModelAbstract.php =================================================================== --- trunk/library/classes/Gems/Model/ModelAbstract.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/classes/Gems/Model/ModelAbstract.php 2012-06-21 12:10:37 UTC (rev 777) @@ -1,111 +0,0 @@ -<?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. - * - * Short description of file - * - * @package Gems - * @subpackage - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ - */ - -/** - * Short description for ModelAbstract - * - * Long description for class ModelAbstract (if any)... - * - * @package Gems - * @subpackage Sample - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.0 - * @deprecated Class deprecated since version 2.0 - */ -class Gems_Model_ModelAbstract extends Gems_Model_JoinModel implements MUtil_Registry_TargetInterface -{ - /** - * Allows the loader to set resources. - * - * @param string $name Name of resource to set - * @param mixed $resource The resource. - * @return boolean True if $resource was OK - */ - public function answerRegistryRequest($name, $resource) - { - $this->$name = $resource; - - return true; - } - - /** - * Should be called after answering the request to allow the Target - * to check if all required registry values have been set correctly. - * - * @return boolean False if required are missing. - */ - public function checkRegistryRequestsAnswers() - { - return true; - } - - /** - * Filters the names that should not be requested. - * - * Can be overriden. - * - * @param string $name - * @return boolean - */ - protected function filterRequestNames($name) - { - return '_' !== $name[0]; - } - - /** - * Allows the loader to know the resources to set. - * - * Returns those object variables defined by the subclass but not at the level of this definition. - * - * Can be overruled. - * - * @return array of string names - */ - public function getRegistryRequests() - { - // Filter using the $this->filterRequestNames() callback - return array_filter(array_keys(get_object_vars($this)), array($this, 'filterRequestNames')); - } - - /** - * This is the place to put code to run after object initialization has finished and when all - * registry requests have been answered - */ - public function init() - { - } -} \ No newline at end of file Modified: trunk/library/classes/Gems/Model.php =================================================================== --- trunk/library/classes/Gems/Model.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/classes/Gems/Model.php 2012-06-21 12:10:37 UTC (rev 777) @@ -121,7 +121,7 @@ /** * Create a Gems project wide unique user id * - * @see Gems_Model_ModelAbstract + * @see Gems_Model_RespondentModel * * @param mixed $value The value being saved * @param boolean $isNew True when a new item is being saved Modified: trunk/library/classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php 2012-06-21 12:10:37 UTC (rev 777) @@ -36,7 +36,7 @@ */ /** - * Generic extension for displaying tokens + * Generic extension for displaying tokens * * @package Gems * @subpackage Tracker Modified: trunk/library/classes/MUtil/Html/ArrayAttribute.php =================================================================== --- trunk/library/classes/MUtil/Html/ArrayAttribute.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/classes/MUtil/Html/ArrayAttribute.php 2012-06-21 12:10:37 UTC (rev 777) @@ -91,6 +91,11 @@ parent::__construct($name, $value); } + /** + * Returns the rendered values of th earray elements + * + * @return array + */ protected function _getArrayRendered() { $results = array(); Modified: trunk/library/snippets/ShowSingleSurveyTokenSnippet.php =================================================================== --- trunk/library/snippets/ShowSingleSurveyTokenSnippet.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/snippets/ShowSingleSurveyTokenSnippet.php 2012-06-21 12:10:37 UTC (rev 777) @@ -62,6 +62,9 @@ // Extra parameter needed for menu items $bridge->gtr_track_type; + $bridge->gr2t_id_respondent_track; + $bridge->gr2o_patient_nr; + $bridge->gr2o_id_organization; $bridge->grc_success; $controller = $this->request->getControllerName(); Modified: trunk/library/snippets/ShowTrackTokenSnippet.php =================================================================== --- trunk/library/snippets/ShowTrackTokenSnippet.php 2012-06-21 12:07:52 UTC (rev 776) +++ trunk/library/snippets/ShowTrackTokenSnippet.php 2012-06-21 12:10:37 UTC (rev 777) @@ -1,6 +1,5 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -63,6 +62,9 @@ // Extra item needed for menu items $bridge->gtr_track_type; + $bridge->gr2t_id_respondent_track; + $bridge->gr2o_patient_nr; + $bridge->gr2o_id_organization; $bridge->grc_success; $controller = $this->request->getControllerName(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-06-21 16:10:25
|
Revision: 780 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=780&view=rev Author: matijsdejong Date: 2012-06-21 16:10:15 +0000 (Thu, 21 Jun 2012) Log Message: ----------- Fixed AddTracksSnippet, now uses menu and works with new attributes Modified Paths: -------------- trunk/library/classes/Gems/Default/TrackActionAbstract.php trunk/library/classes/Gems/User/User.php trunk/library/snippets/AddTracksSnippet.php Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2012-06-21 14:57:13 UTC (rev 779) +++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2012-06-21 16:10:15 UTC (rev 780) @@ -141,14 +141,6 @@ $patientId = $this->_getParam(MUtil_Model::REQUEST_ID1); $orgId = $this->_getParam(MUtil_Model::REQUEST_ID2); - // When no resp id, check the current menu item paramter filter that MUtil_Model::REQUEST_ID does not contain a token - if ((! $patientId) && $this->menu->getCurrent()->checkParameterFilter(Gems_Model::ID_TYPE)) { - $patientId = $this->_getIdParam(); - } - if (! $orgId) { - $orgId = $this->escort->getCurrentOrganization(); - } - return array ($patientId, $orgId); } Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2012-06-21 14:57:13 UTC (rev 779) +++ trunk/library/classes/Gems/User/User.php 2012-06-21 16:10:15 UTC (rev 780) @@ -1337,6 +1337,7 @@ //Create the list of request cache keys that match an organization ID (to be extended) $possibleOrgIds = array( + MUtil_Model::REQUEST_ID2, 'gr2o_id_organization', 'gto_id_organization'); Modified: trunk/library/snippets/AddTracksSnippet.php =================================================================== --- trunk/library/snippets/AddTracksSnippet.php 2012-06-21 14:57:13 UTC (rev 779) +++ trunk/library/snippets/AddTracksSnippet.php 2012-06-21 16:10:15 UTC (rev 780) @@ -72,6 +72,12 @@ public $loader; /** + * + * @var Gems_Menu + */ + protected $menu; + + /** * Optional: $request or $tokenData must be set * * @var Zend_Controller_Request_Abstract @@ -117,65 +123,49 @@ switch ($trackType) { case 'T': $trackController = 'track'; + $trackTypeLetter = 'T'; break; case 'S': $trackController = 'survey'; + $trackTypeLetter = 'S'; break; case 'M': $trackController = 'survey'; + $trackTypeLetter = 'S'; break; default: throw new exception('Invalid track type requested.'); } - $trackTypeCache = $trackType . '_' . $this->session->user_style; - $trackTypeTime = $trackType . '_time'; + $organization_id = intval($this->request->getParam(MUtil_Model::REQUEST_ID2)); + $trackTypeCache = $trackType . '_' . $organization_id; + $trackTypeTime = $trackType . '_time'; if (isset($this->session->$trackTypeCache, $this->session->$trackTypeTime) && (time() < $this->session->$trackTypeTime)) { $tracks = $this->session->$trackTypeCache; } else { - $organization_id = $this->escort->getCurrentOrganization(); - switch ($trackType) { - case 'T': - $sql = "SELECT gtr_id_track, gtr_track_name - FROM gems__tracks - WHERE gtr_date_start < CURRENT_TIMESTAMP AND - (gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND - gtr_active = 1 AND - gtr_track_type = 'T' AND - gtr_organizations LIKE '%|$organization_id|%' - ORDER BY gtr_track_name"; - break; - case 'S': - $sql = "SELECT gtr_id_track, gtr_track_name - FROM gems__tracks INNER JOIN - gems__rounds ON gtr_id_track = gro_id_track INNER JOIN - gems__surveys ON gro_id_survey = gsu_id_survey INNER JOIN - gems__groups ON gsu_id_primary_group = ggp_id_group - WHERE gtr_date_start < CURRENT_TIMESTAMP AND - (gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND - gtr_active = 1 AND - gtr_track_type = 'S' AND - ggp_respondent_members = 1 AND - gtr_organizations LIKE '%|$organization_id|%' - ORDER BY gtr_track_name"; - break; - case 'M': - $sql = "SELECT gtr_id_track, gtr_track_name - FROM gems__tracks INNER JOIN - gems__rounds ON gtr_id_track = gro_id_track INNER JOIN - gems__surveys ON gro_id_survey = gsu_id_survey INNER JOIN - gems__groups ON gsu_id_primary_group = ggp_id_group - WHERE gtr_date_start < CURRENT_TIMESTAMP AND - (gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND - gtr_active = 1 AND - gtr_track_type = 'S' AND - ggp_respondent_members = 0 AND - gtr_organizations LIKE '%|$organization_id|%' - ORDER BY gtr_track_name"; - break; - // default: - // throw new exception('Invalid track type requested.'); + if ($trackType == 'T') { + $sql = "SELECT gtr_id_track, gtr_track_name + FROM gems__tracks + WHERE gtr_date_start < CURRENT_TIMESTAMP AND + (gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND + gtr_active = 1 AND + gtr_track_type = 'T' AND + gtr_organizations LIKE '%|$organization_id|%' + ORDER BY gtr_track_name"; + } else { + $sql = "SELECT gtr_id_track, gtr_track_name + FROM gems__tracks INNER JOIN + gems__rounds ON gtr_id_track = gro_id_track INNER JOIN + gems__surveys ON gro_id_survey = gsu_id_survey INNER JOIN + gems__groups ON gsu_id_primary_group = ggp_id_group + WHERE gtr_date_start < CURRENT_TIMESTAMP AND + (gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND + gtr_active = 1 AND + gtr_track_type = '$trackTypeLetter' AND + ggp_respondent_members = 1 AND + gtr_organizations LIKE '%|$organization_id|%' + ORDER BY gtr_track_name"; } $tracks = $this->db->fetchPairs($sql); @@ -186,17 +176,23 @@ $div = MUtil_Html::create()->div(array('class' => 'toolbox')); if ($tracks) { - $pageRef['RouteReset'] = true; + $menuIndex = $this->menu->findController($trackController, 'index'); + $menuView = $this->menu->findController($trackController, 'view'); + $menuCreate = $this->menu->findController($trackController, 'create'); - $div->a(array('controller' => $trackController, 'action' => 'index') + $pageRef, + $div->a($menuIndex->toHRefAttribute($this->request), $trackTypeDescription, array('class' => 'toolanchor')); - $data = new MUtil_Lazy_RepeatableByKeyValue($tracks); + $data = new MUtil_Lazy_RepeatableByKeyValue($tracks); + $params = array('gtr_id_track' => $data->key, 'gtr_track_type' => $trackTypeLetter); + $li = $div->ul($data)->li(); - $li->a(array(Gems_Model::TRACK_ID => $data->key, 'controller' => $trackController, 'action' => 'view') + $pageRef, array('class' => 'rightFloat')) + $li->a($menuView->toHRefAttribute($this->request, $params), array('class' => 'rightFloat')) ->img(array('src' => 'info.png', 'width' => 12, 'height' => 12, 'alt' => $this->_('info'))); - $li->a(array(Gems_Model::TRACK_ID => $data->key, 'controller' => $trackController, 'action' => 'create') + $pageRef, $data->value, array('class' => 'add')); + $li->a($menuCreate->toHRefAttribute($this->request, $params), + $data->value, + array('class' => 'add')); } else { $div->span($trackTypeDescription, array('class' => 'toolanchor disabled')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-06-27 11:34:42
|
Revision: 791 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=791&view=rev Author: matijsdejong Date: 2012-06-27 11:34:34 +0000 (Wed, 27 Jun 2012) Log Message: ----------- Code cleanup and prettier error messages Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/Gems/Model/HiddenOrganizationModel.php trunk/library/classes/GemsEscort.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-06-26 13:56:06 UTC (rev 790) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-06-27 11:34:34 UTC (rev 791) @@ -88,7 +88,10 @@ return; } - throw new Exception($this->_('Invalid organization.')); + throw new Gems_Exception( + $this->_('Inaccessible or unknown organization'), + 403, null, + sprintf($this->_('Access to this page is not allowed for current role: %s.'), $this->loader->getCurrentUser()->getRole())); } /** Modified: trunk/library/classes/Gems/Model/HiddenOrganizationModel.php =================================================================== --- trunk/library/classes/Gems/Model/HiddenOrganizationModel.php 2012-06-26 13:56:06 UTC (rev 790) +++ trunk/library/classes/Gems/Model/HiddenOrganizationModel.php 2012-06-27 11:34:34 UTC (rev 791) @@ -107,10 +107,12 @@ } if (isset($parameters[MUtil_Model::REQUEST_ID2]) && - !array_key_exists($parameters[MUtil_Model::REQUEST_ID2], $this->user->getAllowedOrganizations()) - ) { + (! array_key_exists($parameters[MUtil_Model::REQUEST_ID2], $this->user->getAllowedOrganizations()))) { - throw new Exception($this->translate->_('Invalid organization.')); + throw new Gems_Exception( + $this->translate->_('Inaccessible or unknown organization'), + 403, null, + sprintf($this->translate->_('Access to this page is not allowed for current role: %s.'), $this->user->getRole())); } return parent::applyParameters($parameters); Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2012-06-26 13:56:06 UTC (rev 790) +++ trunk/library/classes/GemsEscort.php 2012-06-27 11:34:34 UTC (rev 791) @@ -1539,8 +1539,6 @@ $loader = $this->getLoader(); $user = $loader->getCurrentUser(); - // MUtil_Echo::r($request->getParams(), 'params'); - // MUtil_Echo::r($request->getUserParams(), 'userparams'); // Load the menu. As building the menu can depend on all resources and the request, we do it here. // // PS: The REQUEST is needed because otherwise the locale for translate is not certain. @@ -1607,9 +1605,9 @@ // Throw an exception + HTTP 401 when an autofilter is called if ($request->getActionName() == 'autofilter') { throw new Gems_Exception("Session expired", 401); - } else if ($menuItem = $this->menu->findFirst(array('allowed' => true, 'visible' => true))) { + } elseif ($menuItem = $this->menu->findFirst(array('allowed' => true, 'visible' => true))) { // Do not store previous request & show message when the intended action is logoff - if (!($request->getControllerName() == 'index' && $request->getActionName() == 'logoff')) { + if (! ($request->getControllerName() == 'index' && $request->getActionName() == 'logoff')) { $this->addMessage($this->_('You are no longer logged in.')); $this->addMessage($this->_('You must login to access this page.')); Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-06-26 13:56:06 UTC (rev 790) +++ trunk/library/languages/default-en.po 2012-06-27 11:34:34 UTC (rev 791) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-06-14 15:04+0100\n" +"POT-Creation-Date: 2012-06-27 13:31+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -37,58 +37,58 @@ msgid "You are not logged in" msgstr "You are not logged in" -#: classes/GemsEscort.php:965 +#: classes/GemsEscort.php:968 #, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:990 +#: classes/GemsEscort.php:993 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1432 +#: classes/GemsEscort.php:1435 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -#: classes/GemsEscort.php:1563 +#: classes/GemsEscort.php:1564 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1565 -#: classes/GemsEscort.php:1569 +#: classes/GemsEscort.php:1566 #: classes/GemsEscort.php:1570 +#: classes/GemsEscort.php:1571 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1580 +#: classes/GemsEscort.php:1581 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1582 -#: classes/GemsEscort.php:1625 +#: classes/GemsEscort.php:1583 +#: classes/GemsEscort.php:1626 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1598 +#: classes/GemsEscort.php:1599 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1600 +#: classes/GemsEscort.php:1601 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "Access to this page is not allowed for current role: %s." -#: classes/GemsEscort.php:1610 -#: classes/GemsEscort.php:1623 +#: classes/GemsEscort.php:1611 +#: classes/GemsEscort.php:1624 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1611 +#: classes/GemsEscort.php:1612 msgid "You must login to access this page." msgstr "You must login to access this page." -#: classes/GemsEscort.php:1752 -#: classes/GemsEscort.php:1754 +#: classes/GemsEscort.php:1753 +#: classes/GemsEscort.php:1755 #, php-format msgid "%d survey" msgid_plural "%d surveys" @@ -185,7 +185,7 @@ msgstr "Roles" #: classes/Gems/Menu.php:197 -#: classes/Gems/Menu.php:347 +#: classes/Gems/Menu.php:377 msgid "Assigned" msgstr "Assigned" @@ -218,7 +218,7 @@ msgstr "Upgrade" #: classes/Gems/Menu.php:220 -#: classes/Gems/Menu.php:320 +#: classes/Gems/Menu.php:341 msgid "Show" msgstr "Show" @@ -264,155 +264,159 @@ msgstr "Change password" #: classes/Gems/Menu.php:248 -#: classes/Gems/Menu.php:289 -#: classes/Gems/Menu.php:324 +#: classes/Gems/Menu.php:301 +#: classes/Gems/Menu.php:347 msgid "Token" msgstr "Token" -#: classes/Gems/Menu.php:280 +#: classes/Gems/Menu.php:289 msgid "Export" msgstr "Export" -#: classes/Gems/Menu.php:285 +#: classes/Gems/Menu.php:296 msgid "Track" msgstr "Track" -#: classes/Gems/Menu.php:292 -#: classes/Gems/Menu.php:312 -#: classes/Gems/Menu.php:343 +#: classes/Gems/Menu.php:304 +#: classes/Gems/Menu.php:329 +#: classes/Gems/Menu.php:371 msgid "Add" msgstr "Add" -#: classes/Gems/Menu.php:296 -#: classes/Gems/Menu.php:378 +#: classes/Gems/Menu.php:310 +#: classes/Gems/Menu.php:410 msgid "Preview" msgstr "Preview" -#: classes/Gems/Menu.php:303 +#: classes/Gems/Menu.php:319 msgid "Tracks" msgstr "Tracks" -#: classes/Gems/Menu.php:316 +#: classes/Gems/Menu.php:335 msgid "Assignments" msgstr "Assignments" -#: classes/Gems/Menu.php:328 +#: classes/Gems/Menu.php:351 msgid "Edit" msgstr "Edit" -#: classes/Gems/Menu.php:332 +#: classes/Gems/Menu.php:357 msgid "Delete" msgstr "Delete" -#: classes/Gems/Menu.php:337 +#: classes/Gems/Menu.php:364 msgid "Surveys" msgstr "Surveys" -#: classes/Gems/Menu.php:369 +#: classes/Gems/Menu.php:401 msgid "Fill in" msgstr "Fill in" -#: classes/Gems/Menu.php:372 +#: classes/Gems/Menu.php:404 msgid "Print PDF" msgstr "Print PDF" -#: classes/Gems/Menu.php:375 +#: classes/Gems/Menu.php:407 msgid "E-Mail now!" msgstr "E-Mail now!" -#: classes/Gems/Menu.php:381 +#: classes/Gems/Menu.php:413 msgid "Answers" msgstr "Answers" -#: classes/Gems/Menu.php:531 +#: classes/Gems/Menu.php:565 msgid "Respondents" msgstr "Patients" -#: classes/Gems/Menu.php:539 +#: classes/Gems/Menu.php:573 msgid "Overview" msgstr "Overview" -#: classes/Gems/Menu.php:546 +#: classes/Gems/Menu.php:580 msgid "Project" msgstr "Project" -#: classes/Gems/Menu.php:549 +#: classes/Gems/Menu.php:583 msgid "Setup" msgstr "Setup" -#: classes/Gems/Menu.php:552 +#: classes/Gems/Menu.php:586 +msgid "Track Builder" +msgstr "Track Builder" + +#: classes/Gems/Menu.php:589 msgid "Mail" msgstr "Mail" -#: classes/Gems/Menu.php:555 -msgid "Track Builder" -msgstr "Track Builder" - -#: classes/Gems/Menu.php:561 +#: classes/Gems/Menu.php:595 msgid "Export respondent" msgstr "Export respondent" -#: classes/Gems/Menu.php:567 +#: classes/Gems/Menu.php:601 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:580 +#: classes/Gems/Menu.php:615 msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:230 +#: classes/Gems/Model.php:206 msgid "Respondent nr" msgstr "Patient nr" -#: classes/Gems/Model.php:231 +#: classes/Gems/Model.php:209 +msgid "Organization" +msgstr "Organization" + +#: classes/Gems/Model.php:211 msgid "Opened" msgstr "Opened" -#: classes/Gems/Model.php:232 +#: classes/Gems/Model.php:212 msgid "Consent" msgstr "Consent" -#: classes/Gems/Model.php:234 +#: classes/Gems/Model.php:214 msgid "E-Mail" msgstr "E-Mail" -#: classes/Gems/Model.php:239 +#: classes/Gems/Model.php:219 msgid "Gender" msgstr "Gender" -#: classes/Gems/Model.php:240 +#: classes/Gems/Model.php:220 msgid "First name" msgstr "First name" -#: classes/Gems/Model.php:241 +#: classes/Gems/Model.php:221 msgid "Surname prefix" msgstr "Surname prefix" -#: classes/Gems/Model.php:242 +#: classes/Gems/Model.php:222 msgid "Last name" msgstr "Last name" -#: classes/Gems/Model.php:244 +#: classes/Gems/Model.php:224 msgid "Name" msgstr "Name" -#: classes/Gems/Model.php:247 +#: classes/Gems/Model.php:227 msgid "Street" msgstr "Street" -#: classes/Gems/Model.php:248 +#: classes/Gems/Model.php:228 msgid "Zipcode" msgstr "Zipcode" -#: classes/Gems/Model.php:249 +#: classes/Gems/Model.php:229 msgid "City" msgstr "City" -#: classes/Gems/Model.php:251 +#: classes/Gems/Model.php:231 msgid "Phone" msgstr "Phone" -#: classes/Gems/Model.php:253 +#: classes/Gems/Model.php:233 msgid "Birthday" msgstr "Birthday" @@ -987,11 +991,6 @@ msgid "%s records found." msgstr "%s records found." -#: classes/Gems/Default/ExportAction.php:172 -#: classes/Gems/Default/LogAction.php:197 -msgid "Organization" -msgstr "Organization" - #: classes/Gems/Default/ExportAction.php:181 msgid "Export to" msgstr "Export to" @@ -1420,6 +1419,7 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 +#: classes/Gems/Default/RespondentAction.php:373 msgid "(all organizations)" msgstr "(all organizations)" @@ -1442,8 +1442,8 @@ msgstr "Login Name" #: classes/Gems/Default/OptionAction.php:136 -#: classes/Gems/Default/OrganizationAction.php:132 -#: classes/Gems/Default/RespondentAction.php:175 +#: classes/Gems/Default/OrganizationAction.php:135 +#: classes/Gems/Default/RespondentAction.php:221 msgid "Language" msgstr "Language" @@ -1464,113 +1464,113 @@ msgid "Item" msgstr "Item" -#: classes/Gems/Default/OrganizationAction.php:91 -msgid "Invalid organization." -msgstr "Invalid organization." +#: classes/Gems/Default/OrganizationAction.php:92 +msgid "Inaccessible or unknown organization" +msgstr "Inaccessible or unknown organization" -#: classes/Gems/Default/OrganizationAction.php:113 +#: classes/Gems/Default/OrganizationAction.php:116 msgid "Url" msgstr "Url" -#: classes/Gems/Default/OrganizationAction.php:114 +#: classes/Gems/Default/OrganizationAction.php:117 msgid "Task" msgstr "Task" -#: classes/Gems/Default/OrganizationAction.php:115 +#: classes/Gems/Default/OrganizationAction.php:118 msgid "Contact name" msgstr "Contact name" -#: classes/Gems/Default/OrganizationAction.php:116 +#: classes/Gems/Default/OrganizationAction.php:119 msgid "Contact email" msgstr "Contact email" -#: classes/Gems/Default/OrganizationAction.php:119 +#: classes/Gems/Default/OrganizationAction.php:122 msgid "Style" msgstr "Style" -#: classes/Gems/Default/OrganizationAction.php:124 +#: classes/Gems/Default/OrganizationAction.php:127 msgid "Default url's" msgstr "Default url's" -#: classes/Gems/Default/OrganizationAction.php:126 +#: classes/Gems/Default/OrganizationAction.php:129 #, php-format msgid "Always switch to this organization when %s is accessed from one of these space separated url's. The first is used for mails." msgstr "Always switch to this organization when %s is accessed from one of these space separated url's. The first is used for mails." -#: classes/Gems/Default/OrganizationAction.php:136 +#: classes/Gems/Default/OrganizationAction.php:139 msgid "Can the organization be used?" msgstr "Can the organization be used?" -#: classes/Gems/Default/OrganizationAction.php:137 +#: classes/Gems/Default/OrganizationAction.php:140 msgid "Login" msgstr "Login" -#: classes/Gems/Default/OrganizationAction.php:137 +#: classes/Gems/Default/OrganizationAction.php:140 msgid "Can people login for this organization?" msgstr "Can people login for this organization?" -#: classes/Gems/Default/OrganizationAction.php:138 +#: classes/Gems/Default/OrganizationAction.php:141 msgid "Accepting" msgstr "Accepting" -#: classes/Gems/Default/OrganizationAction.php:138 +#: classes/Gems/Default/OrganizationAction.php:141 msgid "Can new respondents be added to the organization?" msgstr "Can new patients be added to the organization?" -#: classes/Gems/Default/OrganizationAction.php:139 +#: classes/Gems/Default/OrganizationAction.php:142 msgid "Does the organization have respondents?" msgstr "Does the organization have patients?" -#: classes/Gems/Default/OrganizationAction.php:140 +#: classes/Gems/Default/OrganizationAction.php:143 msgid "Respondent group" msgstr "Patient group" -#: classes/Gems/Default/OrganizationAction.php:140 +#: classes/Gems/Default/OrganizationAction.php:143 msgid "Allows respondents to login." msgstr "Allow patients to login." -#: classes/Gems/Default/OrganizationAction.php:144 +#: classes/Gems/Default/OrganizationAction.php:147 msgid "Greeting" msgstr "Greeting" -#: classes/Gems/Default/OrganizationAction.php:144 -#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "For emails and token forward screen." msgstr "For emails and token forward screen." -#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "Signature" msgstr "Signature" -#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:150 msgid "Accessible by" msgstr "Accessible by" -#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:150 msgid "Checked organizations see this organizations respondents." msgstr "Checked organizations see this organizations patients." -#: classes/Gems/Default/OrganizationAction.php:157 +#: classes/Gems/Default/OrganizationAction.php:160 msgid "Code name" msgstr "Code name" -#: classes/Gems/Default/OrganizationAction.php:157 +#: classes/Gems/Default/OrganizationAction.php:160 msgid "Only for programmers." msgstr "Only for programmers." -#: classes/Gems/Default/OrganizationAction.php:175 +#: classes/Gems/Default/OrganizationAction.php:178 msgid "This can not be changed yet" msgstr "This can not be changed yet" -#: classes/Gems/Default/OrganizationAction.php:177 +#: classes/Gems/Default/OrganizationAction.php:180 msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:207 +#: classes/Gems/Default/OrganizationAction.php:210 msgid "Participating organizations" msgstr "Participating organizations" -#: classes/Gems/Default/OrganizationAction.php:218 +#: classes/Gems/Default/OrganizationAction.php:221 msgid "organization" msgid_plural "organizations" msgstr[0] "organization" @@ -1820,189 +1820,115 @@ msgstr[0] "reception code" msgstr[1] "reception codes" -#: classes/Gems/Default/RespondentAction.php:119 +#: classes/Gems/Default/RespondentAction.php:77 +#: classes/Gems/Default/RespondentExportAction.php:71 +msgid "Group surveys" +msgstr "Group surveys" + +#: classes/Gems/Default/RespondentAction.php:82 +#: classes/Gems/Default/RespondentExportAction.php:76 +msgid "Output format" +msgstr "Output format" + +#: classes/Gems/Default/RespondentAction.php:160 #, php-format msgid "Random Example BSN: %s" msgstr "Random Example BSN: %s" -#: classes/Gems/Default/RespondentAction.php:122 +#: classes/Gems/Default/RespondentAction.php:162 msgid "Enter a 9-digit SSN number." msgstr "Enter a 9-digit BSN number." -#: classes/Gems/Default/RespondentAction.php:127 +#: classes/Gems/Default/RespondentAction.php:169 msgid "Identification" msgstr "Identification" -#: classes/Gems/Default/RespondentAction.php:134 +#: classes/Gems/Default/RespondentAction.php:180 msgid "SSN" msgstr "BSN" -#: classes/Gems/Default/RespondentAction.php:138 +#: classes/Gems/Default/RespondentAction.php:184 msgid "Patient number" msgstr "Patient number" -#: classes/Gems/Default/RespondentAction.php:147 +#: classes/Gems/Default/RespondentAction.php:193 msgid "Medical data" msgstr "Medical data" -#: classes/Gems/Default/RespondentAction.php:154 +#: classes/Gems/Default/RespondentAction.php:200 msgid "DBC's, etc..." msgstr "DBC's, etc..." -#: classes/Gems/Default/RespondentAction.php:157 +#: classes/Gems/Default/RespondentAction.php:203 msgid "Contact information" msgstr "Contact information" -#: classes/Gems/Default/RespondentAction.php:162 +#: classes/Gems/Default/RespondentAction.php:208 msgid "Respondent has no e-mail" msgstr "Patient has no e-mail" -#: classes/Gems/Default/RespondentAction.php:163 +#: classes/Gems/Default/RespondentAction.php:209 msgid "With housenumber" msgstr "With housenumber" -#: classes/Gems/Default/RespondentAction.php:170 +#: classes/Gems/Default/RespondentAction.php:216 msgid "Country" msgstr "Country" -#: classes/Gems/Default/RespondentAction.php:174 +#: classes/Gems/Default/RespondentAction.php:220 msgid "Settings" msgstr "Settings" -#: classes/Gems/Default/RespondentAction.php:176 +#: classes/Gems/Default/RespondentAction.php:222 msgid "Has the respondent signed the informed consent letter?" msgstr "Has the patient signed the informed consent letter?" -#: classes/Gems/Default/RespondentAction.php:206 +#: classes/Gems/Default/RespondentAction.php:252 msgid "Comments" msgstr "Comments" -#: classes/Gems/Default/RespondentAction.php:207 +#: classes/Gems/Default/RespondentAction.php:253 msgid "Treatment" msgstr "Treatment" -#: classes/Gems/Default/RespondentAction.php:235 +#: classes/Gems/Default/RespondentAction.php:281 msgid "Rejection code" msgstr "Rejection code" -#: classes/Gems/Default/RespondentAction.php:242 +#: classes/Gems/Default/RespondentAction.php:288 msgid "Delete respondent" msgstr "Delete patient" -#: classes/Gems/Default/RespondentAction.php:274 +#: classes/Gems/Default/RespondentAction.php:320 msgid "Respondent deleted." msgstr "Patient deleted" -#: classes/Gems/Default/RespondentAction.php:278 +#: classes/Gems/Default/RespondentAction.php:324 msgid "Respondent tracks stopped." msgstr "Patient tracks stopped." -#: classes/Gems/Default/RespondentAction.php:282 +#: classes/Gems/Default/RespondentAction.php:328 msgid "Choose a reception code to delete." msgstr "Choose a reception code to delete." -#: classes/Gems/Default/RespondentAction.php:331 +#: classes/Gems/Default/RespondentAction.php:422 msgid "respondent" msgid_plural "respondents" msgstr[0] "patient" msgstr[1] "patients" -#: classes/Gems/Default/RespondentAction.php:404 +#: classes/Gems/Default/RespondentAction.php:497 msgid "Please settle the informed consent form for this respondent." msgstr "Please settle the informed consent form for this patient." -#: classes/Gems/Default/RespondentExportAction.php:74 +#: classes/Gems/Default/RespondentExportAction.php:61 msgid "Respondent number" msgstr "Patient number" -#: classes/Gems/Default/RespondentExportAction.php:78 +#: classes/Gems/Default/RespondentExportAction.php:65 msgid "Separate multiple respondents with a comma (,)" msgstr "Separate multiple respondents with a comma (,)" -#: classes/Gems/Default/RespondentExportAction.php:84 -msgid "Group surveys" -msgstr "Group surveys" - -#: classes/Gems/Default/RespondentExportAction.php:89 -msgid "Output format" -msgstr "Output format" - -#: classes/Gems/Default/RespondentExportAction.php:131 -#, php-format -msgid "Unable to run PDF conversion: \"%s\"" -msgstr "Unable to run PDF conversion: \"%s\"" - -#: classes/Gems/Default/RespondentExportAction.php:169 -msgid "Round" -msgstr "Round" - -#: classes/Gems/Default/RespondentExportAction.php:180 -msgid "Open" -msgstr "Open" - -#: classes/Gems/Default/RespondentExportAction.php:183 -msgid "Completed" -msgstr "Completed" - -#: classes/Gems/Default/RespondentExportAction.php:189 -msgid "Missed" -msgstr "Missed" - -#: classes/Gems/Default/RespondentExportAction.php:191 -#: classes/Gems/Default/RespondentExportAction.php:193 -msgid "Future" -msgstr "Future" - -#: classes/Gems/Default/RespondentExportAction.php:198 -msgid "Single Survey" -msgstr "Single Survey" - -#: classes/Gems/Default/RespondentExportAction.php:244 -msgid "Enter the particulars concerning the assignment to this respondent." -msgstr "Enter the particulars concerning the assignment to this patient." - -#: classes/Gems/Default/RespondentExportAction.php:245 -msgid "Assigned by" -msgstr "Assigned by" - -#: classes/Gems/Default/RespondentExportAction.php:246 -msgid "Start" -msgstr "Start" - -#: classes/Gems/Default/RespondentExportAction.php:250 -msgid "Comment" -msgstr "Comment" - -#: classes/Gems/Default/RespondentExportAction.php:258 -msgid "Track information" -msgstr "Track information" - -#: classes/Gems/Default/RespondentExportAction.php:296 -#, php-format -msgid "Unknown respondent %s" -msgstr "Unknown respondent %s" - -#: classes/Gems/Default/RespondentExportAction.php:302 -#: classes/Gems/Default/RespondentExportAction.php:310 -msgid "Respondent information" -msgstr "Patient information" - -#: classes/Gems/Default/RespondentExportAction.php:330 -msgid "Respondent report" -msgstr "Respondent report" - -#: classes/Gems/Default/RespondentExportAction.php:334 -msgid "Report information" -msgstr "Report information" - -#: classes/Gems/Default/RespondentExportAction.php:335 -msgid "Generated by" -msgstr "Generated by" - -#: classes/Gems/Default/RespondentExportAction.php:337 -msgid "Generated on" -msgstr "Generated on" - #: classes/Gems/Default/RespondentPlanAction.php:67 msgid "Show respondent" msgstr "Show patient" @@ -2456,26 +2382,30 @@ msgid "Answered" msgstr "Answered" +#: classes/Gems/Default/TokenPlanAction.php:327 +msgid "Missed" +msgstr "Missed" + #: classes/Gems/Default/TokenPlanAction.php:341 msgid "(all fillers)" msgstr "(all fillers)" -#: classes/Gems/Default/TokenPlanAction.php:363 +#: classes/Gems/Default/TokenPlanAction.php:360 msgid "(all staff)" msgstr "(all staff)" -#: classes/Gems/Default/TokenPlanAction.php:474 +#: classes/Gems/Default/TokenPlanAction.php:471 msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:483 +#: classes/Gems/Default/TokenPlanAction.php:480 #: classes/Gems/Default/TrackAction.php:450 msgid "token" msgid_plural "tokens" msgstr[0] "token" msgstr[1] "tokens" -#: classes/Gems/Default/TokenPlanAction.php:488 +#: classes/Gems/Default/TokenPlanAction.php:485 msgid "Token planning" msgstr "Token planning" @@ -2548,32 +2478,48 @@ msgid "Available tracks" msgstr "Available tracks" -#: classes/Gems/Default/TrackActionAbstract.php:171 +#: classes/Gems/Default/TrackActionAbstract.php:163 #, php-format msgid "Token answers: %s" msgstr "Token answers: %s" -#: classes/Gems/Default/TrackActionAbstract.php:197 +#: classes/Gems/Default/TrackActionAbstract.php:189 #, php-format msgid "Adding the %s track to respondent %s" msgstr "Adding the %s track to patient %s" -#: classes/Gems/Default/TrackActionAbstract.php:303 +#: classes/Gems/Default/TrackActionAbstract.php:201 +msgid "Enter the particulars concerning the assignment to this respondent." +msgstr "Enter the particulars concerning the assignment to this patient." + +#: classes/Gems/Default/TrackActionAbstract.php:202 +msgid "Assigned by" +msgstr "Assigned by" + +#: classes/Gems/Default/TrackActionAbstract.php:203 +msgid "Start" +msgstr "Start" + +#: classes/Gems/Default/TrackActionAbstract.php:208 +msgid "Comment" +msgstr "Comment" + +#: classes/Gems/Default/TrackActionAbstract.php:295 #, php-format msgid "Email %s %s" msgstr "Email %s %s" -#: classes/Gems/Default/TrackActionAbstract.php:309 +#: classes/Gems/Default/TrackActionAbstract.php:301 #, php-format msgid "%s %s not found." msgstr "%s %s not found." -#: classes/Gems/Default/TrackActionAbstract.php:493 +#: classes/Gems/Default/TrackActionAbstract.php:481 #, php-format msgid "Overview of %s track for respondent %s" msgstr "Overview of %s track for patient %s" -#: classes/Gems/Default/TrackActionAbstract.php:497 +#: classes/Gems/Default/TrackActionAbstract.php:485 msgid "This track is currently not assigned to this respondent." msgstr "This track is currently not assigned to this patient." @@ -2790,6 +2736,10 @@ msgid "Survey cannot be taken at this moment." msgstr "Survey cannot be taken at this moment." +#: classes/Gems/Email/OneMailForm.php:55 +msgid "Round" +msgstr "Round" + #: classes/Gems/Email/OneMailForm.php:58 msgid "Last contact" msgstr "Last contact" @@ -2826,6 +2776,19 @@ msgid "Format answers" msgstr "Format answers" +#: classes/Gems/Export/RespondentExport.php:128 +#, php-format +msgid "Unable to run PDF conversion: \"%s\"" +msgstr "Unable to run PDF conversion: \"%s\"" + +#: classes/Gems/Export/RespondentExport.php:193 +msgid "Single Survey" +msgstr "Single Survey" + +#: classes/Gems/Export/RespondentExport.php:254 +msgid "Track information" +msgstr "Track information" + #: classes/Gems/Export/Spss.php:59 msgid "Which file" msgstr "Which file" @@ -2936,15 +2899,15 @@ msgid "Check all assignments" msgstr "Check all assignments" -#: classes/Gems/Menu/SubMenuItem.php:380 +#: classes/Gems/Menu/SubMenuItem.php:410 msgid "New" msgstr "New" -#: classes/Gems/Menu/SubMenuItem.php:434 +#: classes/Gems/Menu/SubMenuItem.php:464 msgid "Export the current data set to Excel" msgstr "Export the current data set to Excel" -#: classes/Gems/Menu/SubMenuItem.php:438 +#: classes/Gems/Menu/SubMenuItem.php:468 msgid "Excel export" msgstr "Excel export" @@ -3117,6 +3080,36 @@ msgid "Answered surveys" msgstr "Answered surveys" +#: classes/Gems/Snippets/Export/ReportFooterSnippet.php:55 +msgid "Report generation finished." +msgstr "Report generation finished." + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:54 +msgid "Respondent report" +msgstr "Respondent report" + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:58 +msgid "Report information" +msgstr "Report information" + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:59 +msgid "Generated by" +msgstr "Generated by" + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:61 +msgid "Generated on" +msgstr "Generated on" + +#: classes/Gems/Snippets/Export/RespondentSnippet.php:75 +#, php-format +msgid "Unknown respondent %s" +msgstr "Unknown respondent %s" + +#: classes/Gems/Snippets/Export/RespondentSnippet.php:81 +#: classes/Gems/Snippets/Export/RespondentSnippet.php:89 +msgid "Respondent information" +msgstr "Patient information" + #: classes/Gems/Task/Db/ExecutePatch.php:66 #, php-format msgid "Executing patchlevel %d" @@ -3191,6 +3184,20 @@ msgid "No tokens were changed." msgstr "No tokens were changed." +#: classes/Gems/Tracker/Token.php:956 +msgid "Open" +msgstr "Open" + +#: classes/Gems/Tracker/Token.php:959 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:200 +msgid "Completed" +msgstr "Completed" + +#: classes/Gems/Tracker/Token.php:967 +#: classes/Gems/Tracker/Token.php:969 +msgid "Future" +msgstr "Future" + #: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:135 msgid "No surveys were changed." msgstr "No surveys were changed." @@ -3361,27 +3368,27 @@ msgid "Enter tokens as %s." msgstr "Enter tokens as %s." -#: classes/Gems/Tracker/Model/StandardTokenModel.php:216 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:197 msgid "Measure(d) on" msgstr "Measure(d) on" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:220 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:201 msgid "Duration in seconds" msgstr "Duration in seconds" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:221 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:202 msgid "Score" msgstr "Score" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:230 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:211 msgid "Assigned to" msgstr "Assigned to" -#: classes/Gems/Tracker/Model/TrackModel.php:118 +#: classes/Gems/Tracker/Model/TrackModel.php:99 msgid "Track Engine" msgstr "Track Engine" -#: classes/Gems/Tracker/Model/TrackModel.php:123 +#: classes/Gems/Tracker/Model/TrackModel.php:104 msgid "Use until" msgstr "Use until" @@ -3401,12 +3408,14 @@ #: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:240 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:124 +#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:164 #, php-format msgid "Token %s not found." msgstr "Token %s not found." #: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:244 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:128 +#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:168 msgid "No token specified." msgstr "No token specified." @@ -3754,21 +3763,20 @@ msgid "You are not allowed to login from this location." msgstr "You are not allowed to login from this location." -#: classes/Gems/User/User.php:1140 +#: classes/Gems/User/User.php:1160 msgid "Your birthday" msgstr "Your birthday" -#: classes/Gems/User/User.php:1156 -#: classes/Gems/User/Form/ChangePasswordForm.php:163 +#: classes/Gems/User/User.php:1176 #, php-format msgid "%s is not correct." msgstr "%s is not correct." -#: classes/Gems/User/User.php:1238 +#: classes/Gems/User/User.php:1258 msgid "Trying to send a password reset to a user that cannot be reset." msgstr "Trying to send a password reset to a user that cannot be reset." -#: classes/Gems/User/User.php:1266 +#: classes/Gems/User/User.php:1286 msgid "Unable to send e-mail." msgstr "Unable to send e-mail." @@ -4113,19 +4121,19 @@ msgid "One or more IPs are illegal." msgstr "One or more IPs are illegal." -#: snippets/AddTracksSnippet.php:198 +#: snippets/AddTracksSnippet.php:211 msgid "info" msgstr "info" -#: snippets/AddTracksSnippet.php:203 +#: snippets/AddTracksSnippet.php:218 msgid "None available" msgstr "None available" -#: snippets/AddTracksSnippet.php:218 +#: snippets/AddTracksSnippet.php:233 msgid "by Respondents" msgstr "by Patients" -#: snippets/AddTracksSnippet.php:221 +#: snippets/AddTracksSnippet.php:236 msgid "by Staff" msgstr "by Staff" @@ -4166,7 +4174,6 @@ msgstr "Deleted token %s for survey %s." #: snippets/DeleteTrackTokenSnippet.php:286 -#: snippets/EditTrackTokenSnippet.php:182 #, php-format msgid "%d token changed by recalculation." msgid_plural "%d tokens changed by recalculation." @@ -4222,8 +4229,8 @@ msgid "Selected surveys" msgstr "Selected surveys" -#: snippets/ShowSingleSurveyTokenSnippet.php:76 -#: snippets/ShowTrackTokenSnippet.php:77 +#: snippets/ShowSingleSurveyTokenSnippet.php:79 +#: snippets/ShowTrackTokenSnippet.php:79 msgid "Actions" msgstr "Actions" @@ -4369,6 +4376,9 @@ msgstr[0] "After this survey there is one other survey we would like you to answer." msgstr[1] "After this survey there are another %d surveys we would like you to answer." +#~ msgid "Invalid organization." +#~ msgstr "Invalid organization." + #~ msgid "Check all is answersed" #~ msgstr "Check all is answersed" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-06-26 13:56:06 UTC (rev 790) +++ trunk/library/languages/default-nl.po 2012-06-27 11:34:34 UTC (rev 791) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-06-14 15:04+0100\n" +"POT-Creation-Date: 2012-06-27 13:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -37,58 +37,58 @@ msgid "You are not logged in" msgstr "U bent niet ingelogd" -#: classes/GemsEscort.php:965 +#: classes/GemsEscort.php:968 #, php-format msgid "User: %s" msgstr "Login: %s" -#: classes/GemsEscort.php:990 +#: classes/GemsEscort.php:993 msgid "version" msgstr "versie" -#: classes/GemsEscort.php:1432 +#: classes/GemsEscort.php:1435 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." -#: classes/GemsEscort.php:1563 +#: classes/GemsEscort.php:1564 msgid "Please check back later." msgstr "Probeer het later opnieuw." -#: classes/GemsEscort.php:1565 -#: classes/GemsEscort.php:1569 +#: classes/GemsEscort.php:1566 #: classes/GemsEscort.php:1570 +#: classes/GemsEscort.php:1571 msgid "System is in maintenance mode" msgstr "Systeem is in onderhoudsmodus" -#: classes/GemsEscort.php:1580 +#: classes/GemsEscort.php:1581 msgid "No access to site." msgstr "Geen toegang tot website." -#: classes/GemsEscort.php:1582 -#: classes/GemsEscort.php:1625 +#: classes/GemsEscort.php:1583 +#: classes/GemsEscort.php:1626 msgid "You have no access to this site." msgstr "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1598 +#: classes/GemsEscort.php:1599 msgid "No access to page" msgstr "Geen toegang tot pagina" -#: classes/GemsEscort.php:1600 +#: classes/GemsEscort.php:1601 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." -#: classes/GemsEscort.php:1610 -#: classes/GemsEscort.php:1623 +#: classes/GemsEscort.php:1611 +#: classes/GemsEscort.php:1624 msgid "You are no longer logged in." msgstr "U bent niet meer ingelogd." -#: classes/GemsEscort.php:1611 +#: classes/GemsEscort.php:1612 msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." -#: classes/GemsEscort.php:1752 -#: classes/GemsEscort.php:1754 +#: classes/GemsEscort.php:1753 +#: classes/GemsEscort.php:1755 #, php-format msgid "%d survey" msgid_plural "%d surveys" @@ -185,7 +185,7 @@ msgstr "Rollen" #: classes/Gems/Menu.php:197 -#: classes/Gems/Menu.php:347 +#: classes/Gems/Menu.php:377 msgid "Assigned" msgstr "Toegewezen" @@ -218,7 +218,7 @@ msgstr "Upgrade" #: classes/Gems/Menu.php:220 -#: classes/Gems/Menu.php:320 +#: classes/Gems/Menu.php:341 msgid "Show" msgstr "Toon" @@ -264,155 +264,159 @@ msgstr "Uw wachtwoord" #: classes/Gems/Menu.php:248 -#: classes/Gems/Menu.php:289 -#: classes/Gems/Menu.php:324 +#: classes/Gems/Menu.php:301 +#: classes/Gems/Menu.php:347 msgid "Token" msgstr "Kenmerk" -#: classes/Gems/Menu.php:280 +#: classes/Gems/Menu.php:289 msgid "Export" msgstr "Exporteer" -#: classes/Gems/Menu.php:285 +#: classes/Gems/Menu.php:296 msgid "Track" msgstr "Traject" -#: classes/Gems/Menu.php:292 -#: classes/Gems/Menu.php:312 -#: classes/Gems/Menu.php:343 +#: classes/Gems/Menu.php:304 +#: classes/Gems/Menu.php:329 +#: classes/Gems/Menu.php:371 msgid "Add" msgstr "Voeg toe" -#: classes/Gems/Menu.php:296 -#: classes/Gems/Menu.php:378 +#: classes/Gems/Menu.php:310 +#: classes/Gems/Menu.php:410 msgid "Preview" msgstr "Preview" -#: classes/Gems/Menu.php:303 +#: classes/Gems/Menu.php:319 msgid "Tracks" msgstr "Trajecten" -#: classes/Gems/Menu.php:316 +#: classes/Gems/Menu.php:335 msgid "Assignments" msgstr "Toewijzingen" -#: classes/Gems/Menu.php:328 +#: classes/Gems/Menu.php:351 msgid "Edit" msgstr "Wijzig" -#: classes/Gems/Menu.php:332 +#: classes/Gems/Menu.php:357 msgid "Delete" msgstr "Verwijder" -#: classes/Gems/Menu.php:337 +#: classes/Gems/Menu.php:364 msgid "Surveys" msgstr "Vragenlijsten" -#: classes/Gems/Menu.php:369 +#: classes/Gems/Menu.php:401 msgid "Fill in" msgstr "Vul in" -#: classes/Gems/Menu.php:372 +#: classes/Gems/Menu.php:404 msgid "Print PDF" msgstr "Print PDF" -#: classes/Gems/Menu.php:375 +#: classes/Gems/Menu.php:407 msgid "E-Mail now!" msgstr "Email nu!" -#: classes/Gems/Menu.php:381 +#: classes/Gems/Menu.php:413 msgid "Answers" msgstr "Antwoorden" -#: classes/Gems/Menu.php:531 +#: classes/Gems/Menu.php:565 msgid "Respondents" msgstr "Patiënten" -#: classes/Gems/Menu.php:539 +#: classes/Gems/Menu.php:573 msgid "Overview" msgstr "Overzicht" -#: classes/Gems/Menu.php:546 +#: classes/Gems/Menu.php:580 msgid "Project" msgstr "Project" -#: classes/Gems/Menu.php:549 +#: classes/Gems/Menu.php:583 msgid "Setup" msgstr "Beheer" -#: classes/Gems/Menu.php:552 +#: classes/Gems/Menu.php:586 +msgid "Track Builder" +msgstr "Traject bouwer" + +#: classes/Gems/Menu.php:589 msgid "Mail" msgstr "Email" -#: classes/Gems/Menu.php:555 -msgid "Track Builder" -msgstr "Traject bouwer" - -#: classes/Gems/Menu.php:561 +#: classes/Gems/Menu.php:595 msgid "Export respondent" msgstr "Exporteer patiënt" -#: classes/Gems/Menu.php:567 +#: classes/Gems/Menu.php:601 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:580 +#: classes/Gems/Menu.php:615 msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:230 +#: classes/Gems/Model.php:206 msgid "Respondent nr" msgstr "Patiënt nr" -#: classes/Gems/Model.php:231 +#: classes/Gems/Model.php:209 +msgid "Organization" +msgstr "Organisatie" + +#: classes/Gems/Model.php:211 msgid "Opened" msgstr "Bekeken op" -#: classes/Gems/Model.php:232 +#: classes/Gems/Model.php:212 msgid "Consent" msgstr "Toestemming" -#: classes/Gems/Model.php:234 +#: classes/Gems/Model.php:214 msgid "E-Mail" msgstr "Email" -#: classes/Gems/Model.php:239 +#: classes/Gems/Model.php:219 msgid "Gender" msgstr "Geslacht" -#: classes/Gems/Model.php:240 +#: classes/Gems/Model.php:220 msgid "First name" msgstr "Voornaam" -#: classes/Gems/Model.php:241 +#: classes/Gems/Model.php:221 msgid "Surname prefix" msgstr "Tussenvoegsel" -#: classes/Gems/Model.php:242 +#: classes/Gems/Model.php:222 msgid "Last name" msgstr "Achternaam" -#: classes/Gems/Model.php:244 +#: classes/Gems/Model.php:224 msgid "Name" msgstr "Naam" -#: classes/Gems/Model.php:247 +#: classes/Gems/Model.php:227 msgid "Street" msgstr "Straat" -#: classes/Gems/Model.php:248 +#: classes/Gems/Model.php:228 msgid "Zipcode" msgstr "Postcode" -#: classes/Gems/Model.php:249 +#: classes/Gems/Model.php:229 msgid "City" msgstr "Woonplaats" -#: classes/Gems/Model.php:251 +#: classes/Gems/Model.php:231 msgid "Phone" msgstr "Telefoon" -#: classes/Gems/Model.php:253 +#: classes/Gems/Model.php:233 msgid "Birthday" msgstr "Geboren op" @@ -987,11 +991,6 @@ msgid "%s records found." msgstr "%s records gevonden." -#: classes/Gems/Default/ExportAction.php:172 -#: classes/Gems/Default/LogAction.php:197 -msgid "Organization" -msgstr "Organisatie" - #: classes/Gems/Default/ExportAction.php:181 msgid "Export to" msgstr "Exporteer naar" @@ -1420,6 +1419,7 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 +#: classes/Gems/Default/RespondentAction.php:373 msgid "(all organizations)" msgstr "(alle organisaties)" @@ -1442,8 +1442,8 @@ msgstr "Login Naam" #: classes/Gems/Default/OptionAction.php:136 -#: classes/Gems/Default/OrganizationAction.php:132 -#: classes/Gems/Default/RespondentAction.php:175 +#: classes/Gems/Default/OrganizationAction.php:135 +#: classes/Gems/Default/RespondentAction.php:221 msgid "Language" msgstr "Taal" @@ -1464,113 +1464,113 @@ msgid "Item" msgstr "Item" -#: classes/Gems/Default/OrganizationAction.php:91 -msgid "Invalid organization." -msgstr "Ongeldige organisatie." +#: classes/Gems/Default/OrganizationAction.php:92 +msgid "Inaccessible or unknown organization" +msgstr "Ontoegankelijke of onbekende organisatie." -#: classes/Gems/Default/OrganizationAction.php:113 +#: classes/Gems/Default/OrganizationAction.php:116 msgid "Url" msgstr "Url" -#: classes/Gems/Default/OrganizationAction.php:114 +#: classes/Gems/Default/OrganizationAction.php:117 msgid "Task" msgstr "Taak" -#: classes/Gems/Default/OrganizationAction.php:115 +#: classes/Gems/Default/OrganizationAction.php:118 msgid "Contact name" msgstr "Contact naam" -#: classes/Gems/Default/OrganizationAction.php:116 +#: classes/Gems/Default/OrganizationAction.php:119 msgid "Contact email" msgstr "Contact email" -#: classes/Gems/Default/OrganizationAction.php:119 +#: classes/Gems/Default/OrganizationAction.php:122 msgid "Style" msgstr "Stijl" -#: classes/Gems/Default/OrganizationAction.php:124 +#: classes/Gems/Default/OrganizationAction.php:127 msgid "Default url's" msgstr "Standaard url's" -#: classes/Gems/Default/OrganizationAction.php:126 +#: classes/Gems/Default/OrganizationAction.php:129 #, php-format msgid "Always switch to this organization when %s is accessed from one of these space separated url's. The first is used for mails." msgstr "Altijd naar deze organisatie overschakelen als %s vanaf één van deze door spatie gescheiden url's wordt aangeroepen. De eerste url wordt gebruikt voor emails." -#: classes/Gems/Default/OrganizationAction.php:136 +#: classes/Gems/Default/OrganizationAction.php:139 msgid "Can the organization be used?" msgstr "Is de organisatie in gebruik?" -#: classes/Gems/Default/OrganizationAction.php:137 +#: classes/Gems/Default/OrganizationAction.php:140 msgid "Login" msgstr "Inloggen" -#: classes/Gems/Default/OrganizationAction.php:137 +#: classes/Gems/Default/OrganizationAction.php:140 msgid "Can people login for this organization?" msgstr "Kunnen personen inloggen voor deze organisatie?" -#: classes/Gems/Default/OrganizationAction.php:138 +#: classes/Gems/Default/OrganizationAction.php:141 msgid "Accepting" msgstr "Accepteert" -#: classes/Gems/Default/OrganizationAction.php:138 +#: classes/Gems/Default/OrganizationAction.php:141 msgid "Can new respondents be added to the organization?" msgstr "Accepteert de organisatie nieuwe patiënten?" -#: classes/Gems/Default/OrganizationAction.php:139 +#: classes/Gems/Default/OrganizationAction.php:142 msgid "Does the organization have respondents?" msgstr "Heeft de organisatie patiënten?" -#: classes/Gems/Default/OrganizationAction.php:140 +#: classes/Gems/Default/OrganizationAction.php:143 msgid "Respondent group" msgstr "Patiënt groep" -#: classes/Gems/Default/OrganizationAction.php:140 +#: classes/Gems/Default/OrganizationAction.php:143 msgid "Allows respondents to login." msgstr "Patiënten toestaan in te loggen." -#: classes/Gems/Default/OrganizationAction.php:144 +#: classes/Gems/Default/OrganizationAction.php:147 msgid "Greeting" msgstr "Begroeting" -#: classes/Gems/Default/OrganizationAction.php:144 -#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "For emails and token forward screen." msgstr "Voor emails en kenmerk scherm." -#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "Signature" msgstr "Handtekening" -#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:150 msgid "Accessible by" msgstr "Toegankelijk voor" -#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:150 msgid "Checked organizations see this organizations respondents." msgstr "Geselecteerde organizaties kunnen de patiënten van deze organisatie bekijken." -#: classes/Gems/Default/OrganizationAction.php:157 +#: classes/Gems/Default/OrganizationAction.php:160 msgid "Code name" msgstr "Code naam" -#: classes/Gems/Default/OrganizationAction.php:157 +#: classes/Gems/Default/OrganizationAction.php:160 msgid "Only for programmers." msgstr "Uitsluitend voor programmeurs." -#: classes/Gems/Default/OrganizationAction.php:175 +#: classes/Gems/Default/OrganizationAction.php:178 msgid "This can not be changed yet" msgstr "Dit kan nog niet gewijzigd worden" -#: classes/Gems/Default/OrganizationAction.php:177 +#: classes/Gems/Default/OrganizationAction.php:180 msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:207 +#: classes/Gems/Default/OrganizationAction.php:210 msgid "Participating organizations" msgstr "Deelnemende organisaties" -#: classes/Gems/Default/OrganizationAction.php:218 +#: classes/Gems/Default/OrganizationAction.php:221 msgid "organization" msgid_plural "organizations" msgstr[0] "organisatie" @@ -1820,189 +1820,115 @@ msgstr[0] "Ontvangst code" msgstr[1] "Ontvangst code" -#: classes/Gems/Default/RespondentAction.php:119 +#: classes/Gems/Default/RespondentAction.php:77 +#: classes/Gems/Default/RespondentExportAction.php:71 +msgid "Group surveys" +msgstr "Groepeer vragenlijsten" + +#: classes/Gems/Default/RespondentAction.php:82 +#: classes/Gems/Default/RespondentExportAction.php:76 +msgid "Output format" +msgstr "Uitvoerformaat" + +#: classes/Gems/Default/RespondentAction.php:160 #, php-format msgid "Random Example BSN: %s" msgstr "Willekeurig voorbeeld BSN: %s" -#: classes/Gems/Default/RespondentAction.php:122 +#: classes/Gems/Default/RespondentAction.php:162 msgid "Enter a 9-digit SSN number." msgstr "Voer een BSN nummer van 9 cijfers in." -#: classes/Gems/Default/RespondentAction.php:127 +#: classes/Gems/Default/RespondentAction.php:169 msgid "Identification" msgstr "Identificatie" -#: classes/Gems/Default/RespondentAction.php:134 +#: classes/Gems/Default/RespondentAction.php:180 msgid "SSN" msgstr "SSN" -#: classes/Gems/Default/RespondentAction.php:138 +#: classes/Gems/Default/RespondentAction.php:184 msgid "Patient number" msgstr "Patiënt nummer" -#: classes/Gems/Default/RespondentAction.php:147 +#: classes/Gems/Default/RespondentAction.php:193 msgid "Medical data" msgstr "Medische gegevens" -#: classes/Gems/Default/RespondentAction.php:154 +#: classes/Gems/Default/RespondentAction.php:200 msgid "DBC's, etc..." msgstr "DBC's, etc..." -#: classes/Gems/Default/RespondentAction.php:157 +#: classes/Gems/Default/RespondentAction.php:203 msgid "Contact information" msgstr "Contact informatie" -#: classes/Gems/Default/RespondentAction.php:162 +#: classes/Gems/Default/RespondentAction.php:208 msgid "Respondent has no e-mail" msgstr "Patiënt zonder email" -#: classes/Gems/Default/RespondentAction.php:163 +#: classes/Gems/Default/RespondentAction.php:209 msgid "With housenumber" msgstr "Met huisnummer" -#: classes/Gems/Default/RespondentAction.php:170 +#: classes/Gems/Default/RespondentAction.php:216 msgid "Country" msgstr "Land" -#: classes/Gems/Default/RespondentAction.php:174 +#: classes/Gems/Default/RespondentAction.php:220 msgid "Settings" msgstr "Instellingen" -#: classes/Gems/Default/RespondentAction.php:176 +#: classes/Gems/Default/RespondentAction.php:222 msgid "Has the respondent signed the informed consent letter?" msgstr "Heeft de patiënt het \"informed consent\" formulier ondertekend?" -#: classes/Gems/Default/RespondentAction.php:206 +#: classes/Gems/Default/RespondentAction.php:252 msgid "Comments" msgstr "Opmerkingen" -#: classes/Gems/Default/RespondentAction.php:207 +#: classes/Gems/Default/RespondentAction.php:253 msgid "Treatment" msgstr "Behandeling" -#: classes/Gems/Default/RespondentAction.php:235 +#: classes/Gems/Default/RespondentAction.php:281 msgid "Rejection code" msgstr "Afkeuringscode" -#: classes/Gems/Default/RespondentAction.php:242 +#: classes/Gems/Default/RespondentAction.php:288 msgid "Delete respondent" msgstr "Verwijder patiënt" -#: classes/Gems/Default/RespondentAction.php:274 +#: classes/Gems/Default/RespondentAction.php:320 msgid "Respondent deleted." msgstr "Patiënt verwijderd" -#: classes/Gems/Default/RespondentAction.php:278 +#: classes/Gems/Default/RespondentAction.php:324 msgid "Respondent tracks stopped." msgstr "Trajecten van patiënt zijn gestopt." -#: classes/Gems/Default/RespondentAction.php:282 +#: classes/Gems/Default/RespondentAction.php:328 msgid "Choose a reception code to delete." msgstr "Kies een ontvangst code om te verwijderen." -#: classes/Gems/Default/RespondentAction.php:331 +#: classes/Gems/Default/RespondentAction.php:422 msgid "respondent" msgid_plural "respondents" msgstr[0] "patiënt" msgstr[1] "patiënten" -#: classes/Gems/Default/RespondentAction.php:404 +#: classes/Gems/Default/RespondentAction.php:497 msgid "Please settle the informed consent form for this respondent." msgstr "A.u.b. het informed consent formulier doornemen met deze patiënt" -#: classes/Gems/Default/RespondentExportAction.php:74 +#: classes/Gems/Default/RespondentExportAction.php:61 msgid "Respondent number" msgstr "Patiënt nummer" -#: classes/Gems/Default/RespondentExportAction.php:78 +#: classes/Gems/Default/RespondentExportAction.php:65 msgid "Separate multiple respondents with a comma (,)" msgstr "Scheid meerdere patienten met een comma (,)" -#: classes/Gems/Default/RespondentExportAction.php:84 -msgid "Group surveys" -msgstr "Groepeer vragenlijsten" - -#: classes/Gems/Default/RespondentExportAction.php:89 -msgid "Output format" -msgstr "Uitvoerformaat" - -#: classes/Gems/Default/RespondentExportAction.php:131 -#, php-format -msgid "Unable to run PDF conversion: \"%s\"" -msgstr "Kan PDF conversie niet starten: \"%s\"" - -#: classes/Gems/Default/RespondentExportAction.php:169 -msgid "Round" -msgstr "Ronde" - -#: classes/Gems/Default/RespondentExportAction.php:180 -msgid "Open" -msgstr "Open" - -#: classes/Gems/Default/RespondentExportAction.php:183 -msgid "Completed" -msgstr "Ingevuld" - -#: classes/Gems/Default/RespondentExportAction.php:189 -msgid "Missed" -msgstr "Gemist" - -#: classes/Gems/Default/RespondentExportAction.php:191 -#: classes/Gems/Default/RespondentExportAction.php:193 -msgid "Future" -msgstr "Toekomstig" - -#: classes/Gems/Default/RespondentExportAction.php:198 -msgid "Single Survey" -msgstr "Losse vragenlijst" - -#: classes/Gems/Default/RespondentExportAction.php:244 -msgid "Enter the particulars concerning the assignment to this respondent." -msgstr "Beschrijf de redenen om dit aan deze patiënt toe te wijzen." - -#: classes/Gems/Default/RespondentExportAction.php:245 -msgid "Assigned by" -msgstr "Toewijzer" - -#: classes/Gems/Default/RespondentExportAction.php:246 -msgid "Start" -msgstr "Aanvang" - -#: classes/Gems/Default/RespondentExportAction.php:250 -msgid "Comment" -msgstr "Opmerkingen" - -#: classes/Gems/Default/RespondentExportAction.php:258 -msgid "Track information" -msgstr "Traject informatie" - -#: classes/Gems/Default/RespondentExportAction.php:296 -#, php-format -msgid "Unknown respondent %s" -msgstr "Onbekende patiënt %s" - -#: classes/Gems/Default/RespondentExportAction.php:302 -#: classes/Gems/Default/RespondentExportAction.php:310 -msgid "Respondent information" -msgstr "Patiënt informatie" - -#: classes/Gems/Default/RespondentExportAction.php:330 -msgid "Respondent report" -msgstr "Patiënt rapportage" - -#: classes/Gems/Default/RespondentExportAction.php:334 -msgid "Report information" -msgstr "Informatie over rapportage" - -#: classes/Gems/Default/RespondentExportAction.php:335 -msgid "Generated by" -msgstr "Aangemaakt door" - -#: classes/Gems/Default/RespondentExportAction.php:337 -msgid "Generated on" -msgstr "Aangemaakt op" - #: classes/Gems/Default/RespondentPlanAction.php:67 msgid "Show respondent" msgstr "Toon patiënt" @@ -2456,26 +2382,30 @@ msgid "Answered" msgstr "Beantwoord" +#: classes/Gems/Default/TokenPlanAction.php:327 +msgid "Missed" +msgstr "Gemist" + #: classes/Gems/Default/TokenPlanAction.php:341 msgid "(all fillers)" msgstr "(alle invullers)" -#: classes/Gems/Default/TokenPlanAction.php:363 +#: classes/Gems/Default/TokenPlanAction.php:360 msgid "(all staff)" msgstr "(alle medewerkers)" -#: classes/Gems/Default/TokenPlanAction.php:474 +#: classes/Gems/Default/TokenPlanAction.php:471 msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:483 +#: classes/Gems/Default/TokenPlanAction.php:480 #: classes/Gems/Default/TrackAction.php:450 msgid "token" msgid_plural "tokens" msgstr[0] "kenmerk" msgstr[1] "kenmerken" -#: classes/Gems/Default/TokenPlanAction.php:488 +#: classes/Gems/Default/TokenPlanAction.php:485 msgid "Token planning" msgstr "Per kenmerk plannen" @@ -2548,32 +2478,48 @@ msgid "Available tracks" msgstr "Beschikbare trajecten" -#: classes/Gems/Default/TrackActionAbstract.php:171 +#: classes/Gems/Default/TrackActionAbstract.php:163 #, php-format msgid "Token answers: %s" msgstr "Kenmerk antwoorden: %s" -#: classes/Gems/Default/TrackActionAbstract.php:197 +#: classes/Gems/Default/TrackActionAbstract.php:189 #, php-format msgid "Adding the %s track to respondent %s" msgstr "Traject %s toewijzen aan patiënt %s." -#: classes/Gems/Default/TrackActionAbstract.php:303 +#: classes/Gems/Default/TrackActionAbstract.php:201 +msgid "Enter the particulars concerning the assignment to this respondent." +msgstr "Beschrijf de redenen om dit aan deze patiënt toe te wijzen." + +#: classes/Gems/Default/TrackActionAbstract.php:202 +msgid "Assigned by" +msgstr "Toewijzer" + +#: classes/Gems/Default/TrackActionAbstract.php:203 +msgid "Start" +msgstr "Aanvang" + +#: classes/Gems/Default/TrackActionAbstract.php:208 +msgid "Comment" +msgstr "Opmerkingen" + +#: classes/Gems/Default/TrackActionAbstract.php:295 #, php-format msgid "Email %s %s" msgstr "Email %s %s" -#: classes/Gems/Default/TrackActionAbstract.php:309 +#: classes/Gems/Default/TrackActionAbstract.php:301 #, php-format msgid "%s %s not found." msgstr "%s %s niet gevonden." -#: classes/Gems/Default/TrackActionAbstract.php:493 +#: classes/Gems/Default/TrackActionAbstract.php:481 #, php-format msgid "Overview of %s track for respondent %s" msgstr "Overzicht van het %s traject voor patiënt %s " -#: classes/Gems/Default/TrackActionAbstract.php:497 +#: classes/Gems/Default/TrackActionAbstract.php:485 msgid "This track is currently not assigned to this respondent." msgstr "Dit traject is nog niet aan deze patiënt toegewezen." @@ -2790,6 +2736,10 @@ msgid "Survey cannot be taken at this moment." msgstr "Deze vragenlijst kan op dit moment niet afgenomen worden." +#: classes/Gems/Email/OneMailForm.php:55 +msgid "Round" +msgstr "Ronde" + #: classes/Gems/Email/OneMailForm.php:58 msgid "Last contact" msgstr "Contactdatum" @@ -2826,6 +2776,19 @@ msgid "Format answers" msgstr "Antwoorden opmaken" +#: classes/Gems/Export/RespondentExport.php:128 +#, php-format +msgid "Unable to run PDF conversion: \"%s\"" +msgstr "Kan PDF conversie niet starten: \"%s\"" + +#: classes/Gems/Export/RespondentExport.php:193 +msgid "Single Survey" +msgstr "Losse vragenlijst" + +#: classes/Gems/Export/RespondentExport.php:254 +msgid "Track information" +msgstr "Traject informatie" + #: classes/Gems/Export/Spss.php:59 msgid "Which file" msgstr "Kies bestand" @@ -2936,15 +2899,15 @@ msgid "Check all assignments" msgstr "Controleer alle toewijzingen" -#: classes/Gems/Menu/SubMenuItem.php:380 +#: classes/Gems/Menu/SubMenuItem.php:410 msgid "New" msgstr "Nieuw" -#: classes/Gems/Menu/SubMenuItem.php:434 +#: classes/Gems/Menu/SubMenuItem.php:464 msgid "Export the current data set to Excel" msgstr "Exporteer de huidige gegevens naar Excel" -#: classes/Gems/Menu/SubMenuItem.php:438 +#: classes/Gems/Menu/SubMenuItem.php:468 msgid "Excel export" msgstr "Excel export" @@ -3117,6 +3080,36 @@ msgid "Answered surveys" msgstr "Beantwoorde vragenlijsten" +#: classes/Gems/Snippets/Export/ReportFooterSnippet.php:55 +msgid "Report generation finished." +msgstr "Rapport is aangemaakt." + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:54 +msgid "Respondent report" +msgstr "Patiënt rapportage" + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:58 +msgid "Report information" +msgstr "Informatie over rapportage" + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:59 +msgid "Generated by" +msgstr "Aangemaakt door" + +#: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:61 +msgid "Generated on" +msgstr "Aangemaakt op" + +#: classes/Gems/Snippets/Export/RespondentSnippet.php:75 +#, php-format +msgid "Unknown respondent %s" +msgstr "Onbekende patiënt %s" + +#: classes/Gems/Snippets/Export/RespondentSnippet.php:81 +#: classes/Gems/Snippets/Export/RespondentSnippet.php:89 +msgid "Respondent information" +msgstr "Patiënt informatie" + #: classes/Gems/Task/Db/ExecutePatch.php:66 #, php-format msgid "Executing patchlevel %d" @@ -3191,6 +3184,20 @@ msgid "No tokens were changed." msgstr "Geen kenmerken veranderd." +#: classes/Gems/Tracker/Token.php:956 +msgid "Open" +msgstr "Open" + +#: classes/Gems/Tracker/Token.php:959 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:200 +msgid "Completed" +msgstr "Ingevuld" + +#: classes/Gems/Tracker/Token.php:967 +#: classes/Gems/Tracker/Token.php:969 +msgid "Future" +msgstr "Toekomstig" + #: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:135 msgid "No surveys were changed." msgstr "Geen vragenlijsten veranderd." @@ -3361,27 +3368,27 @@ msgid "Enter tokens as %s." msgstr "Kenmerk invoeren als %s." -#: classes/Gems/Tracker/Model/StandardTokenModel.php:216 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:197 msgid "Measure(d) on" msgstr "Afname op" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:220 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:201 msgid "Duration in seconds" msgstr "Antwoordtijd (in sec.)" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:221 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:202 msgid "Score" msgstr "Score" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:230 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:211 msgid "Assigned to" msgstr "invuller" -#: classes/Gems/Tracker/Model/TrackModel.php:118 +#: classes/Gems/Tracker/Model/TrackModel.php:99 msgid "Track Engine" msgstr "Traject type" -#: classes/Gems/Tracker/Model/TrackModel.php:123 +#: classes/Gems/Tracker/Mode... [truncated message content] |
From: <gem...@li...> - 2012-07-06 16:35:22
|
Revision: 823 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=823&view=rev Author: matijsdejong Date: 2012-07-06 16:35:15 +0000 (Fri, 06 Jul 2012) Log Message: ----------- Final step in making Role editing user friendly Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Default/RoleAction.php trunk/library/configs/db/tables/gems__roles.20.sql Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2012-07-06 14:09:57 UTC (rev 822) +++ trunk/library/changelog.txt 2012-07-06 16:35:15 UTC (rev 823) @@ -1,8 +1,10 @@ Important changes from 1.5.4 => 1.5.5 ============================================================ +Role editing has become more interactive and safer to use Internally code no longer uses the 'Hidden Organization' but expects both an id1/patientNr plus an id2/organizationId to be specified Externally the organization id is still left out of the url when not needed -UPGRADE WARNING: Check all your (snippet) extensions to RespondentAction and project specific versions of ShowTrackTokenSnippet and ShowSingleSurveySnippet: you may need to specify extra parameters as the menu items need to know the organization id +UPGRADE WARNING: Check all your (snippet) extensions to RespondentAction, TrackAction, SurveyAction and project specific versions of ShowTrackTokenSnippet and ShowSingleSurveySnippet: you may need to specify extra parameters as the menu items need to know the organization id +New projects start with a basic css template Important changes from 1.5.3 => 1.5.4 ============================================================ Modified: trunk/library/classes/Gems/Default/RoleAction.php =================================================================== --- trunk/library/classes/Gems/Default/RoleAction.php 2012-07-06 14:09:57 UTC (rev 822) +++ trunk/library/classes/Gems/Default/RoleAction.php 2012-07-06 16:35:15 UTC (rev 823) @@ -94,17 +94,23 @@ foreach ($possibleParents as $parent) { if ($this->acl->hasRole($data['grl_name']) && $this->acl->inheritsRole($parent, $data['grl_name'])) { $disabled[] = $parent; + $possibleParents[$parent] .= ' ' . MUtil_Html::create('small', $this->_('child of current role'), $this->view); unset($currentParents[$parent]); } else { foreach ($currentParents as $p2) { if ($this->acl->hasRole($p2) && $this->acl->inheritsRole($p2, $parent)) { $disabled[] = $parent; + $possibleParents[$parent] .= ' ' . MUtil_Html::create( + 'small', + MUtil_Html::raw(sprintf($this->_('inherited from %s'), MUtil_Html::create('em', $p2, $this->view))), + $this->view); $currentParents[$parent] = $parent; } } } } $disabled[] = $data['grl_name']; + $possibleParents[$data['grl_name']] .= ' ' . MUtil_Html::create('small', $this->_('this role'), $this->view); } $bridge->addMultiCheckbox('grl_parents', 'multiOptions', $possibleParents, 'disable', $disabled, Modified: trunk/library/configs/db/tables/gems__roles.20.sql =================================================================== --- trunk/library/configs/db/tables/gems__roles.20.sql 2012-07-06 14:09:57 UTC (rev 822) +++ trunk/library/configs/db/tables/gems__roles.20.sql 2012-07-06 16:35:15 UTC (rev 823) @@ -31,6 +31,6 @@ ('security','security','','guest', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), ('staff','staff','pr.option.edit,pr.option.password,pr.plan,pr.plan.overview,pr.plan.token,pr.project,pr.project.questions,pr.respondent.create,pr.respondent.edit,pr.respondent.who,pr.setup,pr.staff,pr.survey,pr.survey.create,pr.token,pr.token.answers,pr.token.delete,pr.token.edit,pr.token.mail,pr.token.print,pr.track,pr.track.create,pr.track.delete,pr.track.edit,pr.respondent.reportdeath','guest', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), ('physician','physician','','staff', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('researcher','researcher','pr.project-information.changelog,pr.contact,pr.export,pr.plan.token,pr.plan.respondent,pr.plan.overview,pr.option.password,pr.option.edit,pr.organization-switch,pr.islogin','', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), + ('researcher','researcher','pr.project-information.changelog,pr.contact,pr.export,pr.plan.token,pr.plan.respondent,pr.plan.overview,pr.option.password,pr.option.edit,pr.organization-switch,pr.islogin','guest', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), ('admin','admin','pr.consent,pr.consent.create,pr.consent.edit,pr.group,pr.role,pr.mail,pr.mail.create,pr.mail.delete,pr.mail.edit,pr.mail.log,pr.organization,pr.organization-switch,pr.plan.overview.excel,pr.plan.respondent,pr.plan.respondent.excel,pr.plan.token.excel,pr.project-information,pr.reception,pr.reception.create,pr.reception.edit,pr.respondent.choose-org,pr.respondent.delete,pr.respondent.result,pr.source,pr.staff.create,pr.staff.delete,pr.staff.edit,pr.staff.see.all,pr.survey-maintenance,pr.track-maintenance,pr.token.mail.freetext','staff,researcher,security', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), ('super','super','pr.consent.delete,pr.country,pr.country.create,pr.country.delete,pr.country.edit,pr.database,pr.database.create,pr.database.delete,pr.database.edit,pr.database.execute,pr.database.patches,pr.group.create,pr.group.edit,pr.language,pr.mail.server,pr.mail.server.create,pr.mail.server.delete,pr.mail.server.edit,pr.organization.create,pr.organization.edit,pr.plan.choose-org,pr.plan.mail-as-application,pr.reception.delete,pr.role.create,pr.role.edit,pr.source.create,pr.source.edit,pr.source.synchronize,pr.source.synchronize-all,pr.staff.edit.all,pr.survey-maintenance.edit,pr.track-maintenance.create,pr.track-maintenance.edit,pr.maintenance','admin', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-07-13 09:36:42
|
Revision: 836 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=836&view=rev Author: michieltcs Date: 2012-07-13 09:36:33 +0000 (Fri, 13 Jul 2012) Log Message: ----------- Add gsu_code field to surveys Modified Paths: -------------- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__surveys.30.sql Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2012-07-12 14:13:16 UTC (rev 835) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2012-07-13 09:36:33 UTC (rev 836) @@ -376,6 +376,9 @@ $model->set('gsu_result_field', 'label', $this->_('Result field')); $model->set('gsu_duration', 'label', $this->_('Duration description'), 'description', $this->_('Text to inform the respondent.')); + + $model->setIfExists('gsu_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); + $model->set('gsu_beforeanswering_event', 'label', $this->_('Before answering'), 'multiOptions', $events->listSurveyBeforeAnsweringEvents()); $model->set('gsu_completed_event', 'label', $this->_('After completion'), 'multiOptions', $events->listSurveyCompletionEvents()); } Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-07-12 14:13:16 UTC (rev 835) +++ trunk/library/configs/db/patches.sql 2012-07-13 09:36:33 UTC (rev 836) @@ -414,3 +414,6 @@ -- PATCH: Allow multi org view for supers UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.respondent.multiorg') WHERE grl_name = 'super' AND grl_privileges NOT LIKE '%pr.respondent.multiorg%'; + +-- PATCH: Add code field to surveys +ALTER TABLE `gems__surveys` ADD gsu_code varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' NULL AFTER gsu_duration; Modified: trunk/library/configs/db/tables/gems__surveys.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__surveys.30.sql 2012-07-12 14:13:16 UTC (rev 835) +++ trunk/library/configs/db/tables/gems__surveys.30.sql 2012-07-13 09:36:33 UTC (rev 836) @@ -37,13 +37,16 @@ gsu_result_field varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', gsu_duration varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + gsu_code varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gsu_changed timestamp not null default current_timestamp on update current_timestamp, gsu_changed_by bigint unsigned not null, gsu_created timestamp not null, gsu_created_by bigint unsigned not null, PRIMARY KEY(gsu_id_survey), - INDEX (gsu_active) + INDEX (gsu_active), + INDEX (gsu_code) ) ENGINE=InnoDB auto_increment = 500 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-07-18 09:34:30
|
Revision: 853 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=853&view=rev Author: mennodekker Date: 2012-07-18 09:34:20 +0000 (Wed, 18 Jul 2012) Log Message: ----------- Fixed #549: Allow a layered login when organizations have children dev: allow to set label for top and child organization elements from the project's indexController Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/User/Form/LayeredLoginForm.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2012-07-18 08:01:04 UTC (rev 852) +++ trunk/library/classes/Gems/Default/IndexAction.php 2012-07-18 09:34:20 UTC (rev 853) @@ -117,7 +117,12 @@ Gems_Html::init(); if ($this->layeredLogin === true) { + // Allow to set labels without modifying the form by overriding the below methods + $args['topOrganizationDescription'] = $this->getTopOrganizationDescription(); + $args['childOrganizationDescription'] = $this->getChildOrganizationDescription(); + return $this->loader->getUserLoader()->getLayeredLoginForm($args); + } else { return $this->loader->getUserLoader()->getLoginForm($args); } @@ -203,6 +208,28 @@ } /** + * Modify this to set a new title for the child organization element + * if you use layered login + * + * @return string + */ + public function getChildOrganizationDescription() + { + return $this->translate->_('Department'); + } + + /** + * Modify this to set a new title for the top organization element + * if you use layered login + * + * @return string + */ + public function getTopOrganizationDescription() + { + return $this->translate->_('Organization'); + } + + /** * Dummy: always rerouted by GemsEscort */ public function indexAction() { } Modified: trunk/library/classes/Gems/User/Form/LayeredLoginForm.php =================================================================== --- trunk/library/classes/Gems/User/Form/LayeredLoginForm.php 2012-07-18 08:01:04 UTC (rev 852) +++ trunk/library/classes/Gems/User/Form/LayeredLoginForm.php 2012-07-18 09:34:20 UTC (rev 853) @@ -62,6 +62,20 @@ public $topOrganizationFieldName = 'toporganization'; /** + * The label for the top-organization element + * + * @var string + */ + public $topOrganizationDescription = null; + + /** + * The label for the child-organization element + * + * @var string + */ + public $childOrganizationDescription = null; + + /** * Return array of organizations that are a child of the given parentId * * @param int $parentId @@ -142,7 +156,7 @@ } else { $element = new Zend_Form_Element_Select($this->organizationFieldName); - $element->setLabel($this->translate->_('Organization')); + $element->setLabel($this->childOrganizationDescription); $element->setRegisterInArrayValidator(true); $element->setRequired(true); $element->setMultiOptions($childOrgs); @@ -214,7 +228,7 @@ } elseif (! $element instanceof Zend_Form_Element_Select) { $element = new Zend_Form_Element_Select($this->topOrganizationFieldName); - $element->setLabel($this->translate->_('Organization')); + $element->setLabel($this->topOrganizationDescription); $element->setRegisterInArrayValidator(true); $element->setRequired(true); $element->setMultiOptions($orgs); @@ -239,10 +253,49 @@ */ public function loadDefaultElements() { + // If not already set, set some defaults for organization elements + if (is_null($this->topOrganizationDescription)) { + $this->topOrganizationDescription = $this->translate->_('Organization'); + } + + if (is_null($this->childOrganizationDescription)) { + $this->childOrganizationDescription = $this->translate->_('Department'); + } + $this->getTopOrganizationElement(); parent::loadDefaultElements(); return $this; } + + /** + * Set the label for the child organization element + * + * Enables loading of parameter through Zend_Form::__construct() + * + * @param string $description + * @return Gems_User_Form_LayeredLoginForm (continuation pattern) + */ + public function setChildOrganizationDescription($description = null) + { + $this->childOrganizationDescription = $description; + + return $this; + } + + /** + * Set the label for the top organization element + * + * Enables loading of parameter through Zend_Form::__construct() + * + * @param string $description + * @return Gems_User_Form_LayeredLoginForm (continuation pattern) + */ + public function setTopOrganizationDescription($description = null) + { + $this->topOrganizationDescription = $description; + + return $this; + } } \ No newline at end of file Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-07-18 08:01:04 UTC (rev 852) +++ trunk/library/languages/default-en.po 2012-07-18 09:34:20 UTC (rev 853) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-16 19:30+0100\n" +"POT-Creation-Date: 2012-07-18 11:33+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Matijs de Jong <mj...@ma...>\n" +"Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1026,78 +1026,82 @@ msgid "Administrative groups" msgstr "Administrative groups" -#: classes/Gems/Default/IndexAction.php:157 +#: classes/Gems/Default/IndexAction.php:174 msgid "Request password reset" msgstr "Request password reset" -#: classes/Gems/Default/IndexAction.php:161 +#: classes/Gems/Default/IndexAction.php:178 msgid "Please enter your organization and your username or e-mail address. " msgstr "Please enter your organization and your username or e-mail address. " -#: classes/Gems/Default/IndexAction.php:163 +#: classes/Gems/Default/IndexAction.php:180 msgid "Please enter your username or e-mail address. " msgstr "Please enter your username or e-mail address. " -#: classes/Gems/Default/IndexAction.php:165 +#: classes/Gems/Default/IndexAction.php:182 msgid "We will then send you an e-mail with a link. The link will bring you to a page where you can set a new password of your choice." msgstr "We will then send you an e-mail with a link. The link will bring you to a page where you can set a new password of your choice." -#: classes/Gems/Default/IndexAction.php:171 +#: classes/Gems/Default/IndexAction.php:188 msgid "Execute password reset" msgstr "Execute password reset" -#: classes/Gems/Default/IndexAction.php:172 +#: classes/Gems/Default/IndexAction.php:189 msgid "We received your password reset request." msgstr "We received your password reset request." -#: classes/Gems/Default/IndexAction.php:175 +#: classes/Gems/Default/IndexAction.php:192 #, php-format msgid "Welcome to %s" msgstr "Welcome to %s" -#: classes/Gems/Default/IndexAction.php:176 +#: classes/Gems/Default/IndexAction.php:193 msgid "Welcome to this website." msgstr "Welcome to this website." -#: classes/Gems/Default/IndexAction.php:179 +#: classes/Gems/Default/IndexAction.php:196 msgid "Please enter your password of choice twice." msgstr "Please enter your password of choice twice." #: classes/Gems/Default/IndexAction.php:218 +msgid "Department" +msgstr "Department" + +#: classes/Gems/Default/IndexAction.php:257 msgid "Your password must be changed." msgstr "Your password must be changed." -#: classes/Gems/Default/IndexAction.php:233 +#: classes/Gems/Default/IndexAction.php:272 #, php-format msgid "Login successful, welcome %s." msgstr "Login successful, welcome %s." -#: classes/Gems/Default/IndexAction.php:273 +#: classes/Gems/Default/IndexAction.php:316 #, php-format msgid "Good bye: %s." msgstr "Good bye: %s." -#: classes/Gems/Default/IndexAction.php:296 +#: classes/Gems/Default/IndexAction.php:339 msgid "Your password reset request is no longer valid, please request a new link." msgstr "Your password reset request is no longer valid, please request a new link." -#: classes/Gems/Default/IndexAction.php:298 +#: classes/Gems/Default/IndexAction.php:341 msgid "Your password input request is no longer valid, please request a new link." msgstr "Your password input request is no longer valid, please request a new link." -#: classes/Gems/Default/IndexAction.php:317 +#: classes/Gems/Default/IndexAction.php:360 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We sent you an e-mail with a reset link. Click on the link in the e-mail." -#: classes/Gems/Default/IndexAction.php:326 +#: classes/Gems/Default/IndexAction.php:369 msgid "New password is active." msgstr "New password is active." -#: classes/Gems/Default/IndexAction.php:347 +#: classes/Gems/Default/IndexAction.php:390 msgid "Password reset requested" msgstr "Password reset requested" -#: classes/Gems/Default/IndexAction.php:350 +#: classes/Gems/Default/IndexAction.php:393 msgid "" "Dear {greeting},\n" "\n" @@ -4227,23 +4231,19 @@ #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:172 #: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:143 -#: snippets/DeleteTrackTokenSnippet.php:193 msgid "Edit token" msgstr "Edit token" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:225 -#: snippets/DeleteTrackTokenSnippet.php:245 #, php-format msgid "Redo of token %s." msgstr "Redo of token %s." #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:228 -#: snippets/DeleteTrackTokenSnippet.php:248 msgid "Old comment:" msgstr "Old comment:" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:249 -#: snippets/DeleteTrackTokenSnippet.php:269 #, php-format msgid "Created replacement token %2$s for token %1$s." msgstr "Created replacement token %2$s for token %1$s." @@ -4258,6 +4258,7 @@ msgstr "Deleted token %s for survey %s." #: snippets/DeleteTrackTokenSnippet.php:286 +#: snippets/EditTrackTokenSnippet.php:182 #, php-format msgid "%d token changed by recalculation." msgid_plural "%d tokens changed by recalculation." Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-07-18 08:01:04 UTC (rev 852) +++ trunk/library/languages/default-nl.po 2012-07-18 09:34:20 UTC (rev 853) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-16 19:31+0100\n" +"POT-Creation-Date: 2012-07-18 11:32+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Matijs de Jong <mj...@ma...>\n" +"Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1026,78 +1026,82 @@ msgid "Administrative groups" msgstr "Beheer groepen" -#: classes/Gems/Default/IndexAction.php:157 +#: classes/Gems/Default/IndexAction.php:174 msgid "Request password reset" msgstr "Wachtwoord vergeten?" -#: classes/Gems/Default/IndexAction.php:161 +#: classes/Gems/Default/IndexAction.php:178 msgid "Please enter your organization and your username or e-mail address. " msgstr "Geef uw organisatie en uw email adres of de gebruikersnaam op. " -#: classes/Gems/Default/IndexAction.php:163 +#: classes/Gems/Default/IndexAction.php:180 msgid "Please enter your username or e-mail address. " msgstr "Geef uw email adres of gebruikersnaam op. " -#: classes/Gems/Default/IndexAction.php:165 +#: classes/Gems/Default/IndexAction.php:182 msgid "We will then send you an e-mail with a link. The link will bring you to a page where you can set a new password of your choice." msgstr "Vervolgens sturen wij u een email met een link. De link verwijst naar een pagina waar u een zelfgekozen wachtwoord in kan voeren." -#: classes/Gems/Default/IndexAction.php:171 +#: classes/Gems/Default/IndexAction.php:188 msgid "Execute password reset" msgstr "Vervang vergeten passwood" -#: classes/Gems/Default/IndexAction.php:172 +#: classes/Gems/Default/IndexAction.php:189 msgid "We received your password reset request." msgstr "We hebben uw verzoek voor een nieuw wachtwoord ontvangen." -#: classes/Gems/Default/IndexAction.php:175 +#: classes/Gems/Default/IndexAction.php:192 #, php-format msgid "Welcome to %s" msgstr "Welkom bij %s" -#: classes/Gems/Default/IndexAction.php:176 +#: classes/Gems/Default/IndexAction.php:193 msgid "Welcome to this website." msgstr "Welkom op deze website." -#: classes/Gems/Default/IndexAction.php:179 +#: classes/Gems/Default/IndexAction.php:196 msgid "Please enter your password of choice twice." msgstr "Geef twee keer een zelfgekozen wachtwoord op." #: classes/Gems/Default/IndexAction.php:218 +msgid "Department" +msgstr "Afdeling" + +#: classes/Gems/Default/IndexAction.php:257 msgid "Your password must be changed." msgstr "Uw wachtwoord moet veranderd worden." -#: classes/Gems/Default/IndexAction.php:233 +#: classes/Gems/Default/IndexAction.php:272 #, php-format msgid "Login successful, welcome %s." msgstr "Login in orde, welkom %s." -#: classes/Gems/Default/IndexAction.php:273 +#: classes/Gems/Default/IndexAction.php:316 #, php-format msgid "Good bye: %s." msgstr "Tot ziens: %s." -#: classes/Gems/Default/IndexAction.php:296 +#: classes/Gems/Default/IndexAction.php:339 msgid "Your password reset request is no longer valid, please request a new link." msgstr "Uw verzoek om een nieuw wachtwoord is niet meer geldig, maar u kan hieronder een nieuwe link aanvragen." -#: classes/Gems/Default/IndexAction.php:298 +#: classes/Gems/Default/IndexAction.php:341 msgid "Your password input request is no longer valid, please request a new link." msgstr "Uw link om een wachtwoord in te voeren is niet meer geldig, maar u kan hieronder een nieuwe link aanvragen." -#: classes/Gems/Default/IndexAction.php:317 +#: classes/Gems/Default/IndexAction.php:360 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We hebben u een email met reset link gestuurd. Klik op de link in de email." -#: classes/Gems/Default/IndexAction.php:326 +#: classes/Gems/Default/IndexAction.php:369 msgid "New password is active." msgstr "Nieuwe wachtwoord geactiveerd." -#: classes/Gems/Default/IndexAction.php:347 +#: classes/Gems/Default/IndexAction.php:390 msgid "Password reset requested" msgstr "Wachtwoord reset aangevraagd" -#: classes/Gems/Default/IndexAction.php:350 +#: classes/Gems/Default/IndexAction.php:393 msgid "" "Dear {greeting},\n" "\n" @@ -4227,23 +4231,19 @@ #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:172 #: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:143 -#: snippets/DeleteTrackTokenSnippet.php:193 msgid "Edit token" msgstr "Kenmerk bewerken" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:225 -#: snippets/DeleteTrackTokenSnippet.php:245 #, php-format msgid "Redo of token %s." msgstr "Herkansing voor kenmerk %s." #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:228 -#: snippets/DeleteTrackTokenSnippet.php:248 msgid "Old comment:" msgstr "Oude opmerkingen" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:249 -#: snippets/DeleteTrackTokenSnippet.php:269 #, php-format msgid "Created replacement token %2$s for token %1$s." msgstr "Kenmerk %s is vervangen door het nieuwe kenmerk %s." @@ -4258,6 +4258,7 @@ msgstr "Kenmerk %s voor vragenlijsten %s is verwijderd." #: snippets/DeleteTrackTokenSnippet.php:286 +#: snippets/EditTrackTokenSnippet.php:182 #, php-format msgid "%d token changed by recalculation." msgid_plural "%d tokens changed by recalculation." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-07-20 16:33:51
|
Revision: 863 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=863&view=rev Author: matijsdejong Date: 2012-07-20 16:33:41 +0000 (Fri, 20 Jul 2012) Log Message: ----------- fixed #365 track fields can be deleted fixed #366 track rounds can be deleted or else deactivated Fix for organization switch that went wrong Deactived rounds are show as deleted Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Default/TrackFieldsAction.php trunk/library/classes/Gems/Default/TrackMaintenanceAction.php trunk/library/classes/Gems/Default/TrackRoundAction.php trunk/library/classes/Gems/Default/TrackRoundsAction.php trunk/library/classes/Gems/Menu/MenuAbstract.php trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php trunk/library/classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php trunk/library/classes/GemsEscort.php trunk/library/configs/db/patches.sql trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-07-20 16:33:41 UTC (rev 863) @@ -118,7 +118,9 @@ */ protected function _createSelectElement($name, $options, $empty = null) { - if (is_string($options)) { + if ($options instanceof MUtil_Model_ModelAbstract) { + $options = $options->get($name, 'multiOptions'); + } elseif (is_string($options)) { $options = $this->db->fetchPairs($options); natsort($options); } Modified: trunk/library/classes/Gems/Default/TrackFieldsAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackFieldsAction.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Default/TrackFieldsAction.php 2012-07-20 16:33:41 UTC (rev 863) @@ -76,6 +76,37 @@ } /** + * Creates a form to delete a record + * + * Uses $this->getModel() + * $this->addFormElements() + */ + public function deleteAction() + { + $field = $this->_getParam('fid'); + $used = $this->db->fetchOne("SELECT COUNT(*) FROM gems__respondent2track2field WHERE gr2t2f_id_field = ? AND gr2t2f_value IS NOT NULL", $field); + + if ($this->isConfirmedItem($this->_('Delete %s'))) { + $model = $this->getModel(); + $deleted = $model->delete(); + + // Always perform delete, fields may be empty + $this->db->delete('gems__respondent2track2field', $this->db->quoteInto('gr2t2f_id_field = ?', $field)); + + $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted)); + + if ($used) { + $this->addMessage(sprintf($this->plural('Field also deleted from %s assigned track.', 'Field also deleted from %s assigned tracks.', $used), $used)); + } + + $this->_reroute(array('action' => 'index', MUtil_Model::REQUEST_ID => $this->_getParam(MUtil_Model::REQUEST_ID)), true); + + } elseif ($used) { + $this->addMessage(sprintf($this->plural('This field will be deleted from %s assigned track.', 'This field will be deleted from %s assigned tracks.', $used), $used)); + } + } + + /** * Returns a text element for autosearch. Can be overruled. * * The form / html elements to search on. Elements can be grouped by inserting null's between them. @@ -143,4 +174,13 @@ { return $this->_('Fields'); } + + public function init() + { + // Make sure the menu knows the track type + $source = $this->menu->getParameterSource(); + $source->setTrackType($this->db->fetchOne('SELECT gtr_track_type FROM gems__tracks WHERE gtr_id_track = ?', $this->_getIdParam())); + + return parent::init(); + } } \ No newline at end of file Modified: trunk/library/classes/Gems/Default/TrackMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-07-20 16:33:41 UTC (rev 863) @@ -253,6 +253,56 @@ $this->addSnippets($tracker->getTrackEngineEditSnippets(), 'trackEngine', $trackEngine, 'trackId', $trackId); } + /** + * Returns a text element for autosearch. Can be overruled. + * + * The form / html elements to search on. Elements can be grouped by inserting null's between them. + * That creates a distinct group of elements + * + * @param MUtil_Model_ModelAbstract $model + * @param array $data The $form field values (can be usefull, but no need to set them) + * @return array Of Zend_Form_Element's or static tekst to add to the html or null for group breaks. + */ + protected function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) + { + $elements = parent::getAutoSearchElements($model, $data); + + if ($elements) { + $br = MUtil_Html::create('br'); + $elements[] = $this->_createSelectElement('gtr_track_class', $model, $this->_('(all track engines)')); + + $elements[] = $br; + + $element = $this->_createSelectElement('active', $this->util->getTranslated()->getYesNo(), $this->_('(both)')); + $element->setLabel($model->get('gtr_active', 'label')); + $elements[] = $element; + + } + + return $elements; + } + + /** + * Additional data filter statements for the user input. + * + * User input that has the same name as a model field is automatically + * used as a filter, but if the name is different processing is needed. + * That processing should happen here. + * + * @param array $data The current user input + * @return array New filter statements + */ + protected function getDataFilter(array $data) + { + $filter = parent::getDataFilter($data); + + if (isset($data['active']) && strlen($data['active'])) { + $filter['gtr_active'] = $data['active']; + } + + return $filter; + } + public function getTopic($count = 1) { return $this->plural('track', 'tracks', $count); @@ -276,7 +326,7 @@ parent::showAction(); $this->showList("fields", array(MUtil_Model::REQUEST_ID => 'gtf_id_track', 'fid' => 'gtf_id_field')); - $this->showList("rounds", array(MUtil_Model::REQUEST_ID => 'gro_id_track', 'rid' => 'gro_id_round')); + $this->showList("rounds", array(MUtil_Model::REQUEST_ID => 'gro_id_track', 'rid' => 'gro_id_round'), 'row_class'); // explicitly translate $this->_('fields'); @@ -289,7 +339,7 @@ * @param string $mode * @param array $keys */ - private function showList($mode, array $keys) + private function showList($mode, array $keys, $rowclassField) { $action = $this->getRequest()->getActionName(); $this->getRequest()->setActionName($mode); @@ -302,6 +352,11 @@ $this->browseMode = 'track-' . $mode; $table = $this->getBrowseTable($baseurl); + if ($rowclassField) { + foreach ($table->tbody() as $tr) { + $tr->appendAttrib('class', $repeatable->$rowclassField); + } + } $table->setOnEmpty(sprintf($this->_('No %s found'), $this->_($mode))); $table->getOnEmpty()->class = 'centerAlign'; $table->setRepeater($repeatable); Modified: trunk/library/classes/Gems/Default/TrackRoundAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackRoundAction.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Default/TrackRoundAction.php 2012-07-20 16:33:41 UTC (rev 863) @@ -96,4 +96,15 @@ $this->addSnippets($trackEngine->getRoundEditSnippetNames(), 'roundId', $trackEngine->getFirstRoundId(), 'trackEngine', $trackEngine, 'trackId', $trackId); } + + /** + * Show a single round + */ + public function showAction() + { + $trackId = $this->_getIdParam(); + $this->_setParam(Gems_Model::ROUND_ID, $this->db->fetchOne("SELECT gro_id_round FROM gems__rounds WHERE gro_id_track = ? ORDER BY gro_id_order", $trackId)); + + parent::showAction(); + } } Modified: trunk/library/classes/Gems/Default/TrackRoundsAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackRoundsAction.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Default/TrackRoundsAction.php 2012-07-20 16:33:41 UTC (rev 863) @@ -54,6 +54,27 @@ public $sortKey = array('gro_id_order' => SORT_ASC); /** + * Adds columns from the model to the bridge that creates the browse table. + * + * Adds a button column to the model, if such a button exists in the model. + * + * @param MUtil_Model_TableBridge $bridge + * @param MUtil_Model_ModelAbstract $model + * @return void + */ + protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) + { + parent::addBrowseTableColumns($bridge, $model); + + $table = $bridge->getTable(); + $rep = $table->getRepeater(); + + foreach ($table->tbody() as $tr) { + $tr->appendAttrib('class', $bridge->row_class); + } + } + + /** * Returns a text element for autosearch. Can be overruled. * * The form / html elements to search on. Elements can be grouped by inserting null's between them. @@ -134,6 +155,42 @@ } /** + * Creates a form to delete a record + * + * Uses $this->getModel() + * $this->addFormElements() + */ + public function deleteAction() + { + $roundId = $this->_getParam(Gems_Model::ROUND_ID); + $used = $this->db->fetchOne("SELECT COUNT(*) FROM gems__tokens WHERE gto_id_round = ? AND gto_start_time IS NOT NULL", $roundId); + + if ($used) { + $title = $this->_('Deactivate %s'); + } else { + $title = $this->_('Delete %s'); + } + if ($this->isConfirmedItem($title)) { + if ($used) { + $deleted = $this->db->update('gems__rounds', array('gro_active' => 0), $this->db->quoteInto('gro_id_round = ?', $roundId)); + + $this->addMessage(sprintf($this->_('%2$u %1$s deactivated'), $this->getTopic($deleted), $deleted)); + $this->_reroute(array('action' => 'show', 'confirmed' => null), false); + } else { + $model = $this->getModel(); + $deleted = $model->delete(); + + $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted)); + $this->_reroute(array('action' => 'index', MUtil_Model::REQUEST_ID => $this->_getIdParam()), true); + } + } elseif ($used) { + $this->addMessage(sprintf($this->plural('This round has been completed %s time.', 'This round has been completed %s times.', $used), $used)); + $this->addMessage($this->_('This round cannot be deleted, only deactivated.')); + + } + } + + /** * Edit a single round */ public function editAction() @@ -162,6 +219,48 @@ return $this->_('Rounds'); } + public function isConfirmedItem($title, $question = null, $info = null) + { + $trackId = $this->_getIdParam(); + $roundId = $this->_getParam(Gems_Model::ROUND_ID); + + if (! $trackId) { + throw new Gems_Exception($this->_('Missing track identifier.')); + } + + if ($this->_getParam('confirmed')) { + return true; + } + + if (null === $question) { + $question = $this->_('Are you sure?'); + } + + $this->html->h3(sprintf($title, $this->getTopic())); + + if ($info) { + $this->html->pInfo($info); + } + + $menuSource = $this->menu->getParameterSource(); + $trackEngine = $this->loader->getTracker()->getTrackEngine($trackId); + $trackEngine->applyToMenuSource($menuSource); + $menuSource->setRequestId($trackId); // Tell the menu we're using track id as request id + + $this->html->p($question); + foreach ($trackEngine->getRoundShowSnippetNames() as $snippet) { + $this->html->append($this->getSnippet($snippet, 'roundId', $roundId, 'trackEngine', $trackEngine, 'trackId', $trackId, 'showMenu', false, 'showTitle', false)); + } + + $footer = $this->html->p($question, ' ', array('class' => 'centerAlign')); + $footer->actionLink(array('confirmed' => 1), $this->_('Yes')); + $footer->actionLink(array('action' => 'show'), $this->_('No')); + + $this->html->buttonDiv($this->createMenuLinks()); + + return false; + } + /** * Show a single round */ Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2012-07-20 16:33:41 UTC (rev 863) @@ -462,6 +462,7 @@ $fpage->addCreateAction('pr.track-maintenance.create')->addNamedParameters(MUtil_Model::REQUEST_ID, 'gtf_id_track'); $fpage->addShowAction()->addNamedParameters(MUtil_Model::REQUEST_ID, 'gtf_id_track', 'fid', 'gtf_id_field'); $fpage->addEditAction('pr.track-maintenance.edit')->addNamedParameters('fid', 'gtf_id_field', MUtil_Model::REQUEST_ID, 'gtf_id_track'); + $fpage->addDeleteAction('pr.track-maintenance.delete')->addNamedParameters('fid', 'gtf_id_field', MUtil_Model::REQUEST_ID, 'gtf_id_track'); // Standard tracks $fpage = $page->addPage($this->_('Rounds'), 'pr.track-maintenance', 'track-rounds') @@ -471,6 +472,9 @@ $fpage->addCreateAction('pr.track-maintenance.create')->addNamedParameters(MUtil_Model::REQUEST_ID, 'gro_id_track'); $fpage->addShowAction()->addNamedParameters(MUtil_Model::REQUEST_ID, 'gro_id_track', Gems_Model::ROUND_ID, 'gro_id_round'); $fpage->addEditAction('pr.track-maintenance.edit')->addNamedParameters(Gems_Model::ROUND_ID, 'gro_id_round', MUtil_Model::REQUEST_ID, 'gro_id_track'); + $fpage->addDeleteAction('pr.track-maintenance.delete') + ->addNamedParameters(Gems_Model::ROUND_ID, 'gro_id_round', MUtil_Model::REQUEST_ID, 'gro_id_track') + ->setParameterFilter('gtr_track_type', 'T'); // Single survey tracks $fpage = $page->addPage($this->_('Round'), 'pr.track-maintenance', 'track-round', 'show') Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-07-20 16:33:41 UTC (rev 863) @@ -741,6 +741,10 @@ $model->set('gro_changed_event', 'label', $this->_('After change'), 'multiOptions', $this->events->listRoundChangedEvents()); $model->set('gro_active', 'label', $this->_('Active'), 'multiOptions', $this->util->getTranslated()->getYesNo(), 'elementClass', 'checkbox'); + $model->addColumn( + "CASE WHEN gro_active = 1 THEN '' ELSE 'deleted' END", + 'row_class'); + switch ($action) { case 'create': $this->_ensureRounds(); Modified: trunk/library/classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php 2012-07-20 16:33:41 UTC (rev 863) @@ -76,6 +76,20 @@ protected $roundId; /** + * Show menu buttons below data + * + * @var boolean + */ + protected $showMenu = true; + + /** + * Show title above data + * + * @var boolean + */ + protected $showTitle = true; + + /** * Optional, required when creating or $trackId should be set * * @var Gems_Tracker_Engine_TrackEngineInterface @@ -128,14 +142,29 @@ if ($this->roundId) { $htmlDiv = MUtil_Html::div(); + if ($this->showTitle) { + $htmlDiv->h3(sprintf($this->_('%s round'), $this->trackEngine->getName())); + } - $htmlDiv->h3(sprintf($this->_('%s round'), $this->trackEngine->getName())); - $table = parent::getHtmlOutput($view); $this->applyHtmlAttributes($table); - $table->tfrow($this->getMenuList(), array('class' => 'centerAlign')); + // Make sure deactivated rounds are show as deleted + foreach ($table->tbody() as $tr) { + $skip = true; + foreach ($tr as $td) { + if ($skip) { + $skip = false; + } else { + $td->appendAttrib('class', $table->getRepeater()->row_class); + } + } + } + if ($this->showMenu) { + $table->tfrow($this->getMenuList(), array('class' => 'centerAlign')); + } + $htmlDiv[] = $table; return $htmlDiv; Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/classes/GemsEscort.php 2012-07-20 16:33:41 UTC (rev 863) @@ -430,7 +430,7 @@ */ protected function _initTranslate() { - $this->bootstrap('locale'); + $this->bootstrap('locale'); $language = $this->locale->getLanguage(); @@ -517,7 +517,7 @@ } /*protected function _initZFDebug() - { + { // if ((APPLICATION_ENV === 'development') && if ((APPLICATION_ENV !== 'production') && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') === FALSE)) { @@ -545,7 +545,7 @@ $this->bootstrap('frontController'); $frontController = $this->getResource('frontController'); $frontController->registerPlugin($debug); - } + } }// */ /** @@ -887,10 +887,11 @@ // Organization switcher $orgSwitch = MUtil_Html::create('div', array('id' => 'organizations')); $currentId = $user->getCurrentOrganizationId(); - $params = $this->request->getQuery(); //Use only get params, not post + $params = $this->request->getParams(); //Use only get params, not post unset($params['error_handler']); // If present, this is an object and causes a warning unset($params[Gems_Util_RequestCache::RESET_PARAM]); $currentUri = $this->view->url($params, null, true); + // MUtil_Echo::track($currentUri, $this->request->getParams()); $url = $this->view->url(array('controller' => 'organization', 'action' => 'change-ui'), null, true); Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/configs/db/patches.sql 2012-07-20 16:33:41 UTC (rev 863) @@ -417,3 +417,6 @@ -- PATCH: Add code field to surveys ALTER TABLE `gems__surveys` ADD gsu_code varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' NULL AFTER gsu_duration; + +-- PATCH: Assign deletion of track parts to super role +UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges,',pr.track-maintenance.delete') WHERE grl_privileges NOT LIKE '%pr.track-maintenance.edit%' AND grl_privileges NOT LIKE '%pr.track-maintenance.delete%'; Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/languages/default-en.po 2012-07-20 16:33:41 UTC (rev 863) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-20 13:42+0100\n" +"POT-Creation-Date: 2012-07-20 18:30+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -41,58 +41,58 @@ msgid "You are not logged in" msgstr "You are not logged in" -#: classes/GemsEscort.php:980 +#: classes/GemsEscort.php:981 #, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:1005 +#: classes/GemsEscort.php:1006 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1451 +#: classes/GemsEscort.php:1452 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -#: classes/GemsEscort.php:1580 +#: classes/GemsEscort.php:1581 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1582 -#: classes/GemsEscort.php:1586 +#: classes/GemsEscort.php:1583 #: classes/GemsEscort.php:1587 +#: classes/GemsEscort.php:1588 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1597 +#: classes/GemsEscort.php:1598 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1599 -#: classes/GemsEscort.php:1642 +#: classes/GemsEscort.php:1600 +#: classes/GemsEscort.php:1643 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1615 +#: classes/GemsEscort.php:1616 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1617 +#: classes/GemsEscort.php:1618 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "Access to this page is not allowed for current role: %s." -#: classes/GemsEscort.php:1627 -#: classes/GemsEscort.php:1640 +#: classes/GemsEscort.php:1628 +#: classes/GemsEscort.php:1641 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1628 +#: classes/GemsEscort.php:1629 msgid "You must login to access this page." msgstr "You must login to access this page." -#: classes/GemsEscort.php:1769 -#: classes/GemsEscort.php:1771 +#: classes/GemsEscort.php:1770 +#: classes/GemsEscort.php:1772 #, php-format msgid "%d survey" msgid_plural "%d surveys" @@ -462,94 +462,94 @@ msgid "Trying upgrade for %s to level %s: %s" msgstr "Trying upgrade for %s to level %s: %s" -#: classes/Gems/Controller/BrowseEditAction.php:356 +#: classes/Gems/Controller/BrowseEditAction.php:358 #, php-format msgid "New %s..." msgstr "New %s..." -#: classes/Gems/Controller/BrowseEditAction.php:389 +#: classes/Gems/Controller/BrowseEditAction.php:391 #, php-format msgid "Delete %s" msgstr "Delete %s" -#: classes/Gems/Controller/BrowseEditAction.php:393 +#: classes/Gems/Controller/BrowseEditAction.php:395 #, php-format msgid "%2$u %1$s deleted" msgstr "%2$u %1$s deleted" -#: classes/Gems/Controller/BrowseEditAction.php:410 +#: classes/Gems/Controller/BrowseEditAction.php:412 #, php-format msgid "Edit %s %s" msgstr "Edit %s %s" -#: classes/Gems/Controller/BrowseEditAction.php:412 +#: classes/Gems/Controller/BrowseEditAction.php:414 #, php-format msgid "Edit %s" msgstr "Edit %s" -#: classes/Gems/Controller/BrowseEditAction.php:513 +#: classes/Gems/Controller/BrowseEditAction.php:515 msgid "Free search text" msgstr "Free search text" -#: classes/Gems/Controller/BrowseEditAction.php:584 +#: classes/Gems/Controller/BrowseEditAction.php:586 msgid "Search" msgstr "Search" -#: classes/Gems/Controller/BrowseEditAction.php:600 +#: classes/Gems/Controller/BrowseEditAction.php:602 #, php-format msgid "No %s found" msgstr "No %s found" -#: classes/Gems/Controller/BrowseEditAction.php:684 +#: classes/Gems/Controller/BrowseEditAction.php:686 #, php-format msgid "No %s found." msgstr "No %s found." -#: classes/Gems/Controller/BrowseEditAction.php:802 +#: classes/Gems/Controller/BrowseEditAction.php:804 msgid "Are you sure?" msgstr "Are you sure?" -#: classes/Gems/Controller/BrowseEditAction.php:818 +#: classes/Gems/Controller/BrowseEditAction.php:820 msgid "Yes" msgstr "Yes" -#: classes/Gems/Controller/BrowseEditAction.php:819 +#: classes/Gems/Controller/BrowseEditAction.php:821 msgid "No" msgstr "No" -#: classes/Gems/Controller/BrowseEditAction.php:872 +#: classes/Gems/Controller/BrowseEditAction.php:874 #, php-format msgid "Unknown %s requested" msgstr "Unknown %s requested" -#: classes/Gems/Controller/BrowseEditAction.php:895 +#: classes/Gems/Controller/BrowseEditAction.php:897 #, php-format msgid "New %1$s..." msgstr "New %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:903 +#: classes/Gems/Controller/BrowseEditAction.php:905 msgid "Save" msgstr "Save" -#: classes/Gems/Controller/BrowseEditAction.php:939 +#: classes/Gems/Controller/BrowseEditAction.php:941 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s saved" -#: classes/Gems/Controller/BrowseEditAction.php:942 +#: classes/Gems/Controller/BrowseEditAction.php:944 msgid "No changes to save." msgstr "No changes to save." -#: classes/Gems/Controller/BrowseEditAction.php:951 +#: classes/Gems/Controller/BrowseEditAction.php:953 msgid "Input error! No changes saved!" msgstr "Input error! No changes saved!" -#: classes/Gems/Controller/BrowseEditAction.php:979 +#: classes/Gems/Controller/BrowseEditAction.php:981 #, php-format msgid "Show %s" msgstr "Show %s" -#: classes/Gems/Controller/BrowseEditAction.php:986 +#: classes/Gems/Controller/BrowseEditAction.php:988 #, php-format msgid "Unknown %s." msgstr "Unknown %s." @@ -2633,43 +2633,57 @@ msgid "Check this box if this field is always set by code instead of the user." msgstr "Check this box if this field is always set by code instead of the user." -#: classes/Gems/Default/TrackFieldsAction.php:110 +#: classes/Gems/Default/TrackFieldsAction.php:99 +#, php-format +msgid "Field also deleted from %s assigned track." +msgid_plural "Field also deleted from %s assigned tracks." +msgstr[0] "Field also deleted from %s assigned track." +msgstr[1] "Field also deleted from %s assigned tracks." + +#: classes/Gems/Default/TrackFieldsAction.php:105 +#, php-format +msgid "This field will be deleted from %s assigned track." +msgid_plural "This field will be deleted from %s assigned tracks." +msgstr[0] "This field will be deleted from %s assigned track." +msgstr[1] "This field will be deleted from %s assigned tracks." + +#: classes/Gems/Default/TrackFieldsAction.php:141 msgid "Select one" msgstr "Select one" -#: classes/Gems/Default/TrackFieldsAction.php:110 +#: classes/Gems/Default/TrackFieldsAction.php:141 msgid "Select multiple" msgstr "Select multiple" -#: classes/Gems/Default/TrackFieldsAction.php:110 +#: classes/Gems/Default/TrackFieldsAction.php:141 msgid "Free text" msgstr "Free text" -#: classes/Gems/Default/TrackFieldsAction.php:118 +#: classes/Gems/Default/TrackFieldsAction.php:149 msgid "Code Name" msgstr "Code Name" -#: classes/Gems/Default/TrackFieldsAction.php:121 +#: classes/Gems/Default/TrackFieldsAction.php:152 #: classes/Gems/Default/TrackMaintenanceAction.php:227 msgid "Values" msgstr "Values" -#: classes/Gems/Default/TrackFieldsAction.php:123 +#: classes/Gems/Default/TrackFieldsAction.php:154 #: classes/Gems/Default/TrackMaintenanceAction.php:229 msgid "Required" msgstr "Required" -#: classes/Gems/Default/TrackFieldsAction.php:125 +#: classes/Gems/Default/TrackFieldsAction.php:156 msgid "Readonly" msgstr "Readonly" -#: classes/Gems/Default/TrackFieldsAction.php:139 +#: classes/Gems/Default/TrackFieldsAction.php:170 msgid "field" msgid_plural "fields" msgstr[0] "field" msgstr[1] "fields" -#: classes/Gems/Default/TrackFieldsAction.php:144 +#: classes/Gems/Default/TrackFieldsAction.php:175 msgid "Fields" msgstr "Fields" @@ -2714,34 +2728,64 @@ msgid "Checking round assignments for track '%s'." msgstr "Checking round assignments for track '%s'." -#: classes/Gems/Default/TrackMaintenanceAction.php:282 +#: classes/Gems/Default/TrackMaintenanceAction.php:272 +msgid "(all track engines)" +msgstr "(all track engines)" + +#: classes/Gems/Default/TrackMaintenanceAction.php:276 +msgid "(both)" +msgstr "(both)" + +#: classes/Gems/Default/TrackMaintenanceAction.php:332 msgid "fields" msgstr "fields" -#: classes/Gems/Default/TrackMaintenanceAction.php:283 +#: classes/Gems/Default/TrackMaintenanceAction.php:333 msgid "rounds" msgstr "rounds" -#: classes/Gems/Default/TrackMaintenanceAction.php:309 +#: classes/Gems/Default/TrackMaintenanceAction.php:364 #, php-format msgid "%s in track" msgstr "%s in track" #: classes/Gems/Default/TrackRoundAction.php:89 -#: classes/Gems/Default/TrackRoundsAction.php:82 -#: classes/Gems/Default/TrackRoundsAction.php:109 -#: classes/Gems/Default/TrackRoundsAction.php:144 -#: classes/Gems/Default/TrackRoundsAction.php:173 +#: classes/Gems/Default/TrackRoundsAction.php:103 +#: classes/Gems/Default/TrackRoundsAction.php:130 +#: classes/Gems/Default/TrackRoundsAction.php:201 +#: classes/Gems/Default/TrackRoundsAction.php:228 +#: classes/Gems/Default/TrackRoundsAction.php:272 msgid "Missing track identifier." msgstr "Missing track identifier." -#: classes/Gems/Default/TrackRoundsAction.php:157 +#: classes/Gems/Default/TrackRoundsAction.php:169 +#, php-format +msgid "Deactivate %s" +msgstr "Deactivate %s" + +#: classes/Gems/Default/TrackRoundsAction.php:177 +#, php-format +msgid "%2$u %1$s deactivated" +msgstr "%2$u %1$s deactivated" + +#: classes/Gems/Default/TrackRoundsAction.php:187 +#, php-format +msgid "This round has been completed %s time." +msgid_plural "This round has been completed %s times." +msgstr[0] "This round has been completed %s time." +msgstr[1] "This round has been completed %s times." + +#: classes/Gems/Default/TrackRoundsAction.php:188 +msgid "This round cannot be deleted, only deactivated." +msgstr "This round cannot be deleted, only deactivated." + +#: classes/Gems/Default/TrackRoundsAction.php:214 msgid "round" msgid_plural "rounds" msgstr[0] "round" msgstr[1] "rounds" -#: classes/Gems/Default/TrackRoundsAction.php:162 +#: classes/Gems/Default/TrackRoundsAction.php:219 msgid "Rounds" msgstr "Rounds" @@ -3025,11 +3069,11 @@ msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:482 +#: classes/Gems/Menu/MenuAbstract.php:486 msgid "Check assignments" msgstr "Check assignments" -#: classes/Gems/Menu/MenuAbstract.php:485 +#: classes/Gems/Menu/MenuAbstract.php:489 msgid "Check all assignments" msgstr "Check all assignments" @@ -3576,20 +3620,20 @@ msgid "Add new track" msgstr "Add new track" -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:132 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:146 #, php-format msgid "%s round" msgstr "%s round" -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:144 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:173 msgid "No round specified." msgstr "No round specified." -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:163 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:192 msgid "< Previous" msgstr "< Previous" -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:168 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:197 msgid "Next >" msgstr "Next >" @@ -4617,9 +4661,6 @@ #~ "b], please click on this link:\n" #~ "{reset_url}" -#~ msgid "This token cannot be used (any more)." -#~ msgstr "This token cannot be used (any more)." - #~ msgid "%s not correct." #~ msgstr "%s not correct." Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-07-20 12:07:25 UTC (rev 862) +++ trunk/library/languages/default-nl.po 2012-07-20 16:33:41 UTC (rev 863) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-20 13:43+0100\n" +"POT-Creation-Date: 2012-07-20 18:24+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -41,58 +41,58 @@ msgid "You are not logged in" msgstr "U bent niet ingelogd" -#: classes/GemsEscort.php:980 +#: classes/GemsEscort.php:981 #, php-format msgid "User: %s" msgstr "Login: %s" -#: classes/GemsEscort.php:1005 +#: classes/GemsEscort.php:1006 msgid "version" msgstr "versie" -#: classes/GemsEscort.php:1451 +#: classes/GemsEscort.php:1452 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." -#: classes/GemsEscort.php:1580 +#: classes/GemsEscort.php:1581 msgid "Please check back later." msgstr "Probeer het later opnieuw." -#: classes/GemsEscort.php:1582 -#: classes/GemsEscort.php:1586 +#: classes/GemsEscort.php:1583 #: classes/GemsEscort.php:1587 +#: classes/GemsEscort.php:1588 msgid "System is in maintenance mode" msgstr "Systeem is in onderhoudsmodus" -#: classes/GemsEscort.php:1597 +#: classes/GemsEscort.php:1598 msgid "No access to site." msgstr "Geen toegang tot website." -#: classes/GemsEscort.php:1599 -#: classes/GemsEscort.php:1642 +#: classes/GemsEscort.php:1600 +#: classes/GemsEscort.php:1643 msgid "You have no access to this site." msgstr "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1615 +#: classes/GemsEscort.php:1616 msgid "No access to page" msgstr "Geen toegang tot pagina" -#: classes/GemsEscort.php:1617 +#: classes/GemsEscort.php:1618 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." -#: classes/GemsEscort.php:1627 -#: classes/GemsEscort.php:1640 +#: classes/GemsEscort.php:1628 +#: classes/GemsEscort.php:1641 msgid "You are no longer logged in." msgstr "U bent niet meer ingelogd." -#: classes/GemsEscort.php:1628 +#: classes/GemsEscort.php:1629 msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." -#: classes/GemsEscort.php:1769 -#: classes/GemsEscort.php:1771 +#: classes/GemsEscort.php:1770 +#: classes/GemsEscort.php:1772 #, php-format msgid "%d survey" msgid_plural "%d surveys" @@ -462,94 +462,94 @@ msgid "Trying upgrade for %s to level %s: %s" msgstr "Probeert upgrade voor %s naar niveau %s: %s" -#: classes/Gems/Controller/BrowseEditAction.php:356 +#: classes/Gems/Controller/BrowseEditAction.php:358 #, php-format msgid "New %s..." msgstr "Nieuwe %s..." -#: classes/Gems/Controller/BrowseEditAction.php:389 +#: classes/Gems/Controller/BrowseEditAction.php:391 #, php-format msgid "Delete %s" msgstr "Verwijder %s" -#: classes/Gems/Controller/BrowseEditAction.php:393 +#: classes/Gems/Controller/BrowseEditAction.php:395 #, php-format msgid "%2$u %1$s deleted" msgstr "%2$u %1$s verwijderd" -#: classes/Gems/Controller/BrowseEditAction.php:410 +#: classes/Gems/Controller/BrowseEditAction.php:412 #, php-format msgid "Edit %s %s" msgstr "Bewerk %s %s" -#: classes/Gems/Controller/BrowseEditAction.php:412 +#: classes/Gems/Controller/BrowseEditAction.php:414 #, php-format msgid "Edit %s" msgstr "Bewerk %s" -#: classes/Gems/Controller/BrowseEditAction.php:513 +#: classes/Gems/Controller/BrowseEditAction.php:515 msgid "Free search text" msgstr "Vrije zoek tekst" -#: classes/Gems/Controller/BrowseEditAction.php:584 +#: classes/Gems/Controller/BrowseEditAction.php:586 msgid "Search" msgstr "Zoeken" -#: classes/Gems/Controller/BrowseEditAction.php:600 +#: classes/Gems/Controller/BrowseEditAction.php:602 #, php-format msgid "No %s found" msgstr "Geen %s gevonden" -#: classes/Gems/Controller/BrowseEditAction.php:684 +#: classes/Gems/Controller/BrowseEditAction.php:686 #, php-format msgid "No %s found." msgstr "Geen %s gevonden." -#: classes/Gems/Controller/BrowseEditAction.php:802 +#: classes/Gems/Controller/BrowseEditAction.php:804 msgid "Are you sure?" msgstr "Weet u het zeker?" -#: classes/Gems/Controller/BrowseEditAction.php:818 +#: classes/Gems/Controller/BrowseEditAction.php:820 msgid "Yes" msgstr "Ja" -#: classes/Gems/Controller/BrowseEditAction.php:819 +#: classes/Gems/Controller/BrowseEditAction.php:821 msgid "No" msgstr "Nee" -#: classes/Gems/Controller/BrowseEditAction.php:872 +#: classes/Gems/Controller/BrowseEditAction.php:874 #, php-format msgid "Unknown %s requested" msgstr "Onjuist %s verzoek" -#: classes/Gems/Controller/BrowseEditAction.php:895 +#: classes/Gems/Controller/BrowseEditAction.php:897 #, php-format msgid "New %1$s..." msgstr "Nieuwe %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:903 +#: classes/Gems/Controller/BrowseEditAction.php:905 msgid "Save" msgstr "Opslaan" -#: classes/Gems/Controller/BrowseEditAction.php:939 +#: classes/Gems/Controller/BrowseEditAction.php:941 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s opgeslagen" -#: classes/Gems/Controller/BrowseEditAction.php:942 +#: classes/Gems/Controller/BrowseEditAction.php:944 msgid "No changes to save." msgstr "Geen verandering om op te slaan." -#: classes/Gems/Controller/BrowseEditAction.php:951 +#: classes/Gems/Controller/BrowseEditAction.php:953 msgid "Input error! No changes saved!" msgstr "Invoer fout! Veranderingen niet opgeslagen!" -#: classes/Gems/Controller/BrowseEditAction.php:979 +#: classes/Gems/Controller/BrowseEditAction.php:981 #, php-format msgid "Show %s" msgstr "Toon %s" -#: classes/Gems/Controller/BrowseEditAction.php:986 +#: classes/Gems/Controller/BrowseEditAction.php:988 #, php-format msgid "Unknown %s." msgstr "%s is onbekend." @@ -1585,7 +1585,7 @@ #: classes/Gems/Default/OrganizationAction.php:180 msgid "User Definition" -msgstr "User Definition" +msgstr "Gebruikers definitie" #: classes/Gems/Default/OrganizationAction.php:210 msgid "Participating organizations" @@ -2633,43 +2633,57 @@ msgid "Check this box if this field is always set by code instead of the user." msgstr "Vink aan als dit veld altijd vanuit de code ingesteld wordt, in plaats van door gebruikers." -#: classes/Gems/Default/TrackFieldsAction.php:110 +#: classes/Gems/Default/TrackFieldsAction.php:99 +#, php-format +msgid "Field also deleted from %s assigned track." +msgid_plural "Field also deleted from %s assigned tracks." +msgstr[0] "Veld ook verwijderd bij %s toegewezen traject." +msgstr[1] "Veld ook verwijderd bij %s toegewezen trajecten." + +#: classes/Gems/Default/TrackFieldsAction.php:105 +#, php-format +msgid "This field will be deleted from %s assigned track." +msgid_plural "This field will be deleted from %s assigned tracks." +msgstr[0] "Dit veld wordt bij %s toegewezen traject gebruikt en zal daar ook verwijderd worden." +msgstr[1] "Dit veld wordt bij %s toegewezen trajecten gebruikt en zal daar ook verwijderd worden." + +#: classes/Gems/Default/TrackFieldsAction.php:141 msgid "Select one" msgstr "Kies één" -#: classes/Gems/Default/TrackFieldsAction.php:110 +#: classes/Gems/Default/TrackFieldsAction.php:141 msgid "Select multiple" msgstr "Meerkeuze vraag" -#: classes/Gems/Default/TrackFieldsAction.php:110 +#: classes/Gems/Default/TrackFieldsAction.php:141 msgid "Free text" msgstr "Vrije tekst" -#: classes/Gems/Default/TrackFieldsAction.php:118 +#: classes/Gems/Default/TrackFieldsAction.php:149 msgid "Code Name" msgstr "Code Naam" -#: classes/Gems/Default/TrackFieldsAction.php:121 +#: classes/Gems/Default/TrackFieldsAction.php:152 #: classes/Gems/Default/TrackMaintenanceAction.php:227 msgid "Values" msgstr "Waarden" -#: classes/Gems/Default/TrackFieldsAction.php:123 +#: classes/Gems/Default/TrackFieldsAction.php:154 #: classes/Gems/Default/TrackMaintenanceAction.php:229 msgid "Required" msgstr "Verplicht" -#: classes/Gems/Default/TrackFieldsAction.php:125 +#: classes/Gems/Default/TrackFieldsAction.php:156 msgid "Readonly" msgstr "Alleen lezen" -#: classes/Gems/Default/TrackFieldsAction.php:139 +#: classes/Gems/Default/TrackFieldsAction.php:170 msgid "field" msgid_plural "fields" msgstr[0] "veld" msgstr[1] "velden" -#: classes/Gems/Default/TrackFieldsAction.php:144 +#: classes/Gems/Default/TrackFieldsAction.php:175 msgid "Fields" msgstr "Velden" @@ -2714,34 +2728,64 @@ msgid "Checking round assignments for track '%s'." msgstr "Controleren ronde toewijzing voor traject '%s'." -#: classes/Gems/Default/TrackMaintenanceAction.php:282 +#: classes/Gems/Default/TrackMaintenanceAction.php:272 +msgid "(all track engines)" +msgstr "(alle traject types)" + +#: classes/Gems/Default/TrackMaintenanceAction.php:276 +msgid "(both)" +msgstr "(beide)" + +#: classes/Gems/Default/TrackMaintenanceAction.php:332 msgid "fields" msgstr "velden" -#: classes/Gems/Default/TrackMaintenanceAction.php:283 +#: classes/Gems/Default/TrackMaintenanceAction.php:333 msgid "rounds" msgstr "rondes" -#: classes/Gems/Default/TrackMaintenanceAction.php:309 +#: classes/Gems/Default/TrackMaintenanceAction.php:364 #, php-format msgid "%s in track" msgstr "%s in traject" #: classes/Gems/Default/TrackRoundAction.php:89 -#: classes/Gems/Default/TrackRoundsAction.php:82 -#: classes/Gems/Default/TrackRoundsAction.php:109 -#: classes/Gems/Default/TrackRoundsAction.php:144 -#: classes/Gems/Default/TrackRoundsAction.php:173 +#: classes/Gems/Default/TrackRoundsAction.php:103 +#: classes/Gems/Default/TrackRoundsAction.php:130 +#: classes/Gems/Default/TrackRoundsAction.php:201 +#: classes/Gems/Default/TrackRoundsAction.php:228 +#: classes/Gems/Default/TrackRoundsAction.php:267 msgid "Missing track identifier." msgstr "Ontbrekende traject identificatie." -#: classes/Gems/Default/TrackRoundsAction.php:157 +#: classes/Gems/Default/TrackRoundsAction.php:169 +#, php-format +msgid "Deactivate %s" +msgstr "Deactiveer %s" + +#: classes/Gems/Default/TrackRoundsAction.php:177 +#, php-format +msgid "%2$u %1$s deactivated" +msgstr "%2$u %1$s gedeactiveerd" + +#: classes/Gems/Default/TrackRoundsAction.php:187 +#, php-format +msgid "This round has been completed %s time." +msgid_plural "This round has been completed %s times." +msgstr[0] "Deze ronde is al %s keer afgerond." +msgstr[1] "Deze ronde is al %s keren afgerond." + +#: classes/Gems/Default/TrackRoundsAction.php:188 +msgid "This round cannot be deleted, only deactivated." +msgstr "Dit kenmerk kan niet (meer) verwijderd worden, alleen gedeactiveerd." + +#: classes/Gems/Default/TrackRoundsAction.php:251 msgid "round" msgid_plural "rounds" msgstr[0] "ronde" msgstr[1] "rondes" -#: classes/Gems/Default/TrackRoundsAction.php:162 +#: classes/Gems/Default/TrackRoundsAction.php:256 msgid "Rounds" msgstr "Rondes" @@ -3025,11 +3069,11 @@ msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:482 +#: classes/Gems/Menu/MenuAbstract.php:486 msgid "Check assignments" msgstr "Controleer toewijzingen" -#: classes/Gems/Menu/MenuAbstract.php:485 +#: classes/Gems/Menu/MenuAbstract.php:489 msgid "Check all assignments" msgstr "Controleer alle toewijzingen" @@ -3576,20 +3620,20 @@ msgid "Add new track" msgstr "Voeg traject toe" -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:132 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:146 #, php-format msgid "%s round" msgstr "%s ronde" -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:144 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:173 msgid "No round specified." msgstr "Geen ronde opgegeven." -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:163 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:192 msgid "< Previous" msgstr "< Terug" -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:168 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:197 msgid "Next >" msgstr "Verder >" @@ -4622,9 +4666,6 @@ #~ "[b]{project}[/b], klik op deze link:\n" #~ "{reset_url}" -#~ msgid "This token cannot be used (any more)." -#~ msgstr "Dit kenmerk kan niet (meer) gebruikt worden." - #~ msgid "" #~ "Please enter the organization and username/e-mail address belonging to " #~ "this request." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-09-11 13:10:42
|
Revision: 937 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=937&view=rev Author: matijsdejong Date: 2012-09-11 13:10:36 +0000 (Tue, 11 Sep 2012) Log Message: ----------- #566: added rounds fields and updated field length Modified Paths: -------------- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__rounds.40.sql trunk/library/configs/db/tables/gems__surveys.30.sql trunk/library/configs/db/tables/gems__tracks.30.sql Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-09-07 11:29:53 UTC (rev 936) +++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-09-11 13:10:36 UTC (rev 937) @@ -734,12 +734,13 @@ $model->set('gro_id_track', 'label', $this->_('Track'), 'elementClass', 'exhibitor', 'multiOptions', MUtil_Lazy::call($this->util->getTrackData()->getAllTracks)); } - $model->set('gro_id_survey', 'label', $this->_('Survey'), 'multiOptions', $this->util->getTrackData()->getAllSurveysAndDescriptions()); + $model->set('gro_id_survey', 'label', $this->_('Survey'), 'multiOptions', $this->util->getTrackData()->getAllSurveysAndDescriptions()); $model->set('gro_icon_file', 'label', $this->_('Icon')); - $model->set('gro_id_order', 'label', $this->_('Order'), 'default', 10, 'validators[]', $model->createUniqueValidator(array('gro_id_order', 'gro_id_track'))); - $model->set('gro_round_description', 'label', $this->_('Description'), 'size', '30'); //, 'minlength', 4, 'required', true); - $model->set('gro_changed_event', 'label', $this->_('After change'), 'multiOptions', $this->events->listRoundChangedEvents()); - $model->set('gro_active', 'label', $this->_('Active'), 'multiOptions', $this->util->getTranslated()->getYesNo(), 'elementClass', 'checkbox'); + $model->set('gro_id_order', 'label', $this->_('Order'), 'default', 10, 'validators[]', $model->createUniqueValidator(array('gro_id_order', 'gro_id_track'))); + $model->set('gro_round_description', 'label', $this->_('Description'), 'size', '30'); //, 'minlength', 4, 'required', true); + $model->set('gro_changed_event', 'label', $this->_('After change'), 'multiOptions', $this->events->listRoundChangedEvents()); + $model->set('gro_display_event', 'label', $this->_('Answer display'), 'multiOptions', $this->events->listSurveyDisplayEvents()); + $model->set('gro_active', 'label', $this->_('Active'), 'multiOptions', $this->util->getTranslated()->getYesNo(), 'elementClass', 'checkbox'); $model->addColumn( "CASE WHEN gro_active = 1 THEN '' ELSE 'deleted' END", Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-09-07 11:29:53 UTC (rev 936) +++ trunk/library/configs/db/patches.sql 2012-09-11 13:10:36 UTC (rev 937) @@ -429,5 +429,13 @@ ALTER TABLE `gems__tokens` ADD INDEX ( `gto_completion_time` ); ALTER TABLE `gems__tracks` ADD INDEX ( `gtr_track_name` ); --- PATCH: Add snippet class to gems -ALTER TABLE `gems__surveys` ADD gsu_display_event varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' AFTER gsu_completed_event; +-- PATCH: Add answer display snippets to gems, lengthen class name space +ALTER TABLE `gems__surveys` CHANGE gsu_survey_pdf gsu_survey_pdf varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; +ALTER TABLE `gems__surveys` CHANGE gsu_beforeanswering_event gsu_beforeanswering_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; +ALTER TABLE `gems__surveys` CHANGE gsu_completed_event gsu_completed_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; +ALTER TABLE `gems__surveys` ADD gsu_display_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' NULL AFTER gsu_completed_event; + +ALTER TABLE `gems__rounds` CHANGE gro_changed_event gro_changed_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; +ALTER TABLE `gems__rounds` ADD gro_display_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' NULL AFTER gro_changed_event; + +ALTER TABLE `gems__tracks` CHANGE gtr_completed_event gtr_completed_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; Modified: trunk/library/configs/db/tables/gems__rounds.40.sql =================================================================== --- trunk/library/configs/db/tables/gems__rounds.40.sql 2012-09-07 11:29:53 UTC (rev 936) +++ trunk/library/configs/db/tables/gems__rounds.40.sql 2012-09-11 13:10:36 UTC (rev 937) @@ -13,7 +13,8 @@ gro_round_description varchar(100) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, gro_icon_file VARCHAR(100) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gro_changed_event varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gro_changed_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gro_display_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, -- depreciated gro_valid_after char(6) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', Modified: trunk/library/configs/db/tables/gems__surveys.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__surveys.30.sql 2012-09-07 11:29:53 UTC (rev 936) +++ trunk/library/configs/db/tables/gems__surveys.30.sql 2012-09-11 13:10:36 UTC (rev 937) @@ -12,10 +12,10 @@ gsu_token_table varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', -- end depreciated - gsu_survey_pdf varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', - gsu_beforeanswering_event varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', - gsu_completed_event varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', - gsu_display_event varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + gsu_survey_pdf varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + gsu_beforeanswering_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + gsu_completed_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + gsu_display_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', gsu_id_source int unsigned not null references gems__sources (gso_id_source), Modified: trunk/library/configs/db/tables/gems__tracks.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__tracks.30.sql 2012-09-07 11:29:53 UTC (rev 936) +++ trunk/library/configs/db/tables/gems__tracks.30.sql 2012-09-11 13:10:36 UTC (rev 937) @@ -17,7 +17,8 @@ gtr_track_model varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'TrackModel', -- end depreciated - gtr_track_class varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, + gtr_track_class varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, + gtr_completed_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', -- Yes, quick and dirty, will correct later (probably) gtr_organizations varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-09-26 12:49:08
|
Revision: 959 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=959&view=rev Author: matijsdejong Date: 2012-09-26 12:48:58 +0000 (Wed, 26 Sep 2012) Log Message: ----------- Bug where ModelTableSnippetAbstract.php would result in a different query from the request cache than from the request. Made generic version of AutosearchFormSnippet.php for ease of inheritance Modified Paths: -------------- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php trunk/library/classes/Gems/Util/DbLookup.php trunk/library/snippets/Generic/AutosearchFormSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-09-26 10:50:29 UTC (rev 958) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-09-26 12:48:58 UTC (rev 959) @@ -104,7 +104,7 @@ * * @var mixed String or array of snippets name */ - protected $indexStartSnippets = array('Generic_ContentTitleSnippet', 'Generic_AutosearchFormSnippet'); + protected $indexStartSnippets = array('Generic_ContentTitleSnippet', 'AutosearchFormSnippet'); /** * The snippets used for the index action, after those in autofilter Added: trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2012-09-26 12:48:58 UTC (rev 959) @@ -0,0 +1,269 @@ +<?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 Gems + * @subpackage Snippets\Generic + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + */ + +/** + * Display a search form that selects on typed text only + * + * @package Gems + * @subpackage Snippets\Generic + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.6 + */ +class Gems_Snippets_AutosearchFormSnippet extends MUtil_Snippets_SnippetAbstract +{ + /** + * + * @var Zend_Db_Adapter_Abstract + */ + protected $db; + + /** + * + * @var string The id of a div that contains target that should be replaced. + */ + protected $containingId; + + /** + * + * @var MUtil_Model_ModelAbstract + */ + protected $model; + + /** + * + * @var Zend_Controller_Request_Abstract + */ + protected $request; + + /** + * Optional, otherwise created from $util + * + * @var Gems_Util_RequestCache + */ + public $requestCache; + + /** + * + * @var Gems_Util + */ + protected $util; + + /** + * + * @var string Id for auto search button + */ + protected $searchButtonId = 'AUTO_SEARCH_TEXT_BUTTON'; + + + /** + * Creates a Zend_Form_Element_Select + * + * If $options is a string it is assumed to contain an SQL statement. + * + * @param string $name Name of the select element + * @param string|array $options Can be a SQL select string or key/value array of options + * @param string $empty Text to display for the empty selector + * @return Zend_Form_Element_Select + */ + protected function _createSelectElement($name, $options, $empty = null) + { + if ($options instanceof MUtil_Model_ModelAbstract) { + $options = $options->get($name, 'multiOptions'); + } elseif (is_string($options)) { + $options = $this->db->fetchPairs($options); + natsort($options); + } + if ($options || null !== $empty) + { + if (null !== $empty) { + $options = array('' => $empty) + $options; + } + $element = new Zend_Form_Element_Select($name, array('multiOptions' => $options)); + + return $element; + } + } + + /** + * Should be called after answering the request to allow the Target + * to check if all required registry values have been set correctly. + * + * @return boolean False if required are missing. + */ + public function checkRegistryRequestsAnswers() + { + if ($this->util && (! $this->requestCache)) { + $this->requestCache = $this->util->getRequestCache(); + } + if ($this->requestCache) { + // Do not store searchButtonId + $this->requestCache->removeParams($this->searchButtonId); + } + + return parent::checkRegistryRequestsAnswers(); + } + + /** + * Creates the form itself + * + * @param array $options + * @return Gems_Form + */ + protected function createForm($options = null) + { + $form = new Gems_Form($options); + + return $form; + } + + /** + * Returns a text element for autosearch. Can be overruled. + * + * The form / html elements to search on. Elements can be grouped by inserting null's between them. + * That creates a distinct group of elements + * + * @param array $data The $form field values (can be usefull, but no need to set them) + * @return array Of Zend_Form_Element's or static tekst to add to the html or null for group breaks. + */ + protected function getAutoSearchElements(array $data) + { + // Search text + $element = new Zend_Form_Element_Text($this->model->getTextFilter(), array('label' => $this->_('Free search text'), 'size' => 20, 'maxlength' => 30)); + + return array($element); + } + + /** + * Creates an autosearch form for indexAction. + * + * @return Gems_Form|null + */ + protected function getAutoSearchForm() + { + $data = $this->getSearchData(); + + $elements = $this->getAutoSearchElements($data); + + if ($elements) { + $form = $this->createForm(array('name' => 'autosubmit')); // Assign a name so autosubmit will only work on this form (when there are others) + $form->setHtml('div'); + + $div = $form->getHtml(); + $div->class = 'search'; + + $span = $div->div(array('class' => 'inputgroup')); + + $elements[] = $this->getAutoSearchSubmit(); + + foreach ($elements as $element) { + if ($element instanceof Zend_Form_Element) { + if ($element->getLabel()) { + $span->label($element); + } + $span->input($element); + // TODO: Elementen automatisch toevoegen in MUtil_Form + $form->addElement($element); + } elseif (null === $element) { + $span = $div->div(array('class' => 'inputgroup')); + } else { + $span[] = $element; + } + } + + if ($this->request->isPost()) { + if (! $form->isValid($data)) { + $this->addMessage($form->getErrorMessages()); + $this->addMessage($form->getMessages()); + } + } else { + $form->populate($data); + } + + $href = $this->getAutoSearchHref(); + $form->setAutoSubmit($href, $this->containingId); + + return $form; + } + } + + /** + * + * @return string Href attribute for type as you go autofilter + */ + protected function getAutoSearchHref() + { + return MUtil_Html::attrib('href', array('action' => 'autofilter', $this->model->getTextFilter() => null, 'RouteReset' => true)); + } + + /** + * Creates a submit button + * + * @param MUtil_Form $form + * @return Zend_Form_Element_Submit + */ + protected function getAutoSearchSubmit() + { + return new Zend_Form_Element_Submit($this->searchButtonId, array('label' => $this->_('Search'), 'class' => 'button small')); + } + + /** + * Create the snippets content + * + * This is a stub function either override getHtmlOutput() or override render() + * + * @param Zend_View_Abstract $view Just in case it is needed here + * @return MUtil_Html_HtmlInterface Something that can be rendered + */ + public function getHtmlOutput(Zend_View_Abstract $view) + { + return $this->getAutoSearchForm(); + } + + /** + * + * @return array The data to fill the form with + */ + protected function getSearchData() + { + if ($this->requestCache) { + return $this->requestCache->getProgramParams(); + } else { + return $this->request->getParams(); + } + } +} Modified: trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php 2012-09-26 10:50:29 UTC (rev 958) +++ trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php 2012-09-26 12:48:58 UTC (rev 959) @@ -275,6 +275,9 @@ if ($this->requestCache) { $data = $this->requestCache->getProgramParams(); + // Remove all empty values (but not arrays) from the filter + $data = array_filter($data, function($i) { return is_array($i) || strlen($i); }); + $model->applyParameters($data); } else { Modified: trunk/library/classes/Gems/Util/DbLookup.php =================================================================== --- trunk/library/classes/Gems/Util/DbLookup.php 2012-09-26 10:50:29 UTC (rev 958) +++ trunk/library/classes/Gems/Util/DbLookup.php 2012-09-26 12:48:58 UTC (rev 959) @@ -92,6 +92,7 @@ return $organizations; } + /** * Return key/value pairs of all active staff members * Modified: trunk/library/snippets/Generic/AutosearchFormSnippet.php =================================================================== --- trunk/library/snippets/Generic/AutosearchFormSnippet.php 2012-09-26 10:50:29 UTC (rev 958) +++ trunk/library/snippets/Generic/AutosearchFormSnippet.php 2012-09-26 12:48:58 UTC (rev 959) @@ -41,197 +41,12 @@ * * Long description for class (if any)... * + * @deprecated No longer needed with new snippet loader * @package Gems * @subpackage Snippets\Generic * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4.2 */ -class Generic_AutosearchFormSnippet extends MUtil_Snippets_SnippetAbstract -{ - /** - * - * @var string The id of a div that contains target that should be replaced. - */ - protected $containingId; - - /** - * - * @var MUtil_Model_ModelAbstract - */ - protected $model; - - /** - * - * @var Zend_Controller_Request_Abstract - */ - protected $request; - - /** - * Optional, otherwise created from $util - * - * @var Gems_Util_RequestCache - */ - public $requestCache; - - /** - * - * @var Gems_Util - */ - protected $util; - - /** - * - * @var string Id for auto search button - */ - protected $searchButtonId = 'AUTO_SEARCH_TEXT_BUTTON'; - - - /** - * Should be called after answering the request to allow the Target - * to check if all required registry values have been set correctly. - * - * @return boolean False if required are missing. - */ - public function checkRegistryRequestsAnswers() - { - if ($this->util && (! $this->requestCache)) { - $this->requestCache = $this->util->getRequestCache(); - } - if ($this->requestCache) { - // Do not store searchButtonId - $this->requestCache->removeParams($this->searchButtonId); - } - - return parent::checkRegistryRequestsAnswers(); - } - - /** - * Creates the form itself - * - * @param array $options - * @return Gems_Form - */ - protected function createForm($options = null) - { - $form = new Gems_Form($options); - - return $form; - } - - /** - * Returns a text element for autosearch. Can be overruled. - * - * The form / html elements to search on. Elements can be grouped by inserting null's between them. - * That creates a distinct group of elements - * - * @param array $data The $form field values (can be usefull, but no need to set them) - * @return array Of Zend_Form_Element's or static tekst to add to the html or null for group breaks. - */ - protected function getAutoSearchElements(array $data) - { - // Search text - $element = new Zend_Form_Element_Text($this->model->getTextFilter(), array('label' => $this->_('Free search text'), 'size' => 20, 'maxlength' => 30)); - - return array($element); - } - - /** - * Creates an autosearch form for indexAction. - * - * @return Gems_Form|null - */ - protected function getAutoSearchForm() - { - $data = $this->getSearchData(); - - $elements = $this->getAutoSearchElements($data); - - if ($elements) { - $form = $this->createForm(array('name' => 'autosubmit')); // Assign a name so autosubmit will only work on this form (when there are others) - $form->setHtml('div'); - - $div = $form->getHtml(); - $div->class = 'search'; - - $span = $div->div(array('class' => 'inputgroup')); - - $elements[] = $this->getAutoSearchSubmit(); - - foreach ($elements as $element) { - if ($element instanceof Zend_Form_Element) { - if ($element->getLabel()) { - $span->label($element); - } - $span->input($element); - // TODO: Elementen automatisch toevoegen in MUtil_Form - $form->addElement($element); - } elseif (null === $element) { - $span = $div->div(array('class' => 'inputgroup')); - } else { - $span[] = $element; - } - } - - if ($this->request->isPost()) { - if (! $form->isValid($data)) { - $this->addMessage($form->getErrorMessages()); - $this->addMessage($form->getMessages()); - } - } else { - $form->populate($data); - } - - $href = $this->getAutoSearchHref(); - $form->setAutoSubmit($href, $this->containingId); - - return $form; - } - } - - /** - * - * @return string Href attribute for type as you go autofilter - */ - protected function getAutoSearchHref() - { - return MUtil_Html::attrib('href', array('action' => 'autofilter', $this->model->getTextFilter() => null, 'RouteReset' => true)); - } - - /** - * Creates a submit button - * - * @param MUtil_Form $form - * @return Zend_Form_Element_Submit - */ - protected function getAutoSearchSubmit() - { - return new Zend_Form_Element_Submit($this->searchButtonId, array('label' => $this->_('Search'), 'class' => 'button small')); - } - - /** - * Create the snippets content - * - * This is a stub function either override getHtmlOutput() or override render() - * - * @param Zend_View_Abstract $view Just in case it is needed here - * @return MUtil_Html_HtmlInterface Something that can be rendered - */ - public function getHtmlOutput(Zend_View_Abstract $view) - { - return $this->getAutoSearchForm(); - } - - /** - * - * @return array The data to fill the form with - */ - protected function getSearchData() - { - if ($this->requestCache) { - return $this->requestCache->getProgramParams(); - } else { - return $this->request->getParams(); - } - } -} +class Generic_AutosearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet +{ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <gem...@li...> - 2012-10-11 16:07:23
|
Revision: 980 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=980&view=rev Author: matijsdejong Date: 2012-10-11 16:07:14 +0000 (Thu, 11 Oct 2012) Log Message: ----------- Fix for Pulse bug #560: project level validators are loaded again Fix for Pulse bug #550: Show respondent name in track overview screen (and on many other places) Modified Paths: -------------- trunk/library/classes/Gems/Default/SurveyAction.php trunk/library/classes/Gems/Default/TrackAction.php trunk/library/classes/Gems/Default/TrackActionAbstract.php trunk/library/classes/Gems/Form.php trunk/library/classes/Gems/Tracker/RespondentTrack.php trunk/library/classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php trunk/library/snippets/BrowseSingleSurveyTokenSnippet.php trunk/library/snippets/ShowTrackUsageSnippet.php Modified: trunk/library/classes/Gems/Default/SurveyAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyAction.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/classes/Gems/Default/SurveyAction.php 2012-10-11 16:07:14 UTC (rev 980) @@ -75,8 +75,8 @@ case 'No tracks found': return $this->translate->_('No surveys found', $locale); - case 'Overview of %s track for respondent %s': - return $this->translate->_('Overview of %s survey for respondent %s', $locale); + case 'Overview of %s track for respondent %s: %s': + return $this->translate->_('Overview of %s survey for respondent %s: %s', $locale); case 'This track is currently not assigned to this respondent.': return $this->translate->_('This survey has not been assigned to this respondent.', $locale); @@ -141,11 +141,13 @@ $result = $this->db->fetchOne('SELECT gto_id_token FROM gems__tokens WHERE gto_id_respondent = ? AND gto_id_survey = ?', $data); if ($result) { - $this->html->h3(sprintf($this->_('Assignments of this survey to %s'), $respId)); + $this->html->h3(sprintf($this->_('Assignments of this survey to %s: %s'), $respId, $this->getRespondentName())); + MUtil_Echo::track($result); + // Make sure request cache object is loaded. $this->getCachedRequestData(); - $this->addSnippet('BrowseSingleSurveyTokenSnippet', 'baseUrl', $baseUrl); + $this->addSnippet('BrowseSingleSurveyTokenSnippet', 'baseUrl', $baseUrl, 'filter', $data); } return (boolean) $result; @@ -209,6 +211,9 @@ public function getTopicTitle() { - return $this->_('Assigned surveys'); + return sprintf($this->_('Surveys assigned to %s: %s'), + $this->_getParam(MUtil_Model::REQUEST_ID1), + $this->getRespondentName() + ); } } Modified: trunk/library/classes/Gems/Default/TrackAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackAction.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/classes/Gems/Default/TrackAction.php 2012-10-11 16:07:14 UTC (rev 980) @@ -169,7 +169,7 @@ $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); } - $this->html->h3(sprintf($this->_('Assignments of this track to %s'), $respId)); + $this->html->h3(sprintf($this->_('Assignments of this track to %s: %s'), $respId, $this->getRespondentName())); $this->html[] = $bridge->getTable(); return true; @@ -458,7 +458,10 @@ if ($this->getModel() instanceof Gems_Tracker_Model_StandardTokenModel) { return $this->_('Token'); } else { - return $this->_('Assigned tracks'); + return sprintf($this->_('Tracks assigned to %s: %s'), + $this->_getParam(MUtil_Model::REQUEST_ID1), + $this->getRespondentName() + ); } } @@ -474,7 +477,7 @@ if ($data = $model->applyRequest($request)->loadFirst()) { $this->setMenuParameters($data); - + MUtil_Echo::track($data); if ($data['grc_description']) { $model->set('grc_description', 'label', $this->_('Rejection code'), 'formatFunction', array($this->translate, '_')); } @@ -483,7 +486,10 @@ $this->_setParam(Gems_Model::RESPONDENT_TRACK, $data['gr2t_id_respondent_track']); - $this->html->h2(sprintf($this->_('%s track for respondent nr %s'), $data['gtr_track_name'], $this->_getParam(MUtil_Model::REQUEST_ID1))); + $this->html->h2(sprintf($this->_('%s track for respondent nr %s: %s'), + $data['gtr_track_name'], + $this->_getParam(MUtil_Model::REQUEST_ID1), + $this->getRespondentName($data))); if (! $this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) { $table = parent::getShowTable(); Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2012-10-11 16:07:14 UTC (rev 980) @@ -56,15 +56,28 @@ /** * + * @var Zend_Db_Adaptor_Abstract + */ + public $db; + + /** + * * @var Gems_Menu */ public $menu; + /** + * Storage for respondents name + * + * @var string + */ + protected $respondentName; + + public $summarizedActions = array('index', 'autofilter', 'create'); + // Set when this controller should only showe results from a single tracktype. public $trackType = null; - public $summarizedActions = array('index', 'autofilter', 'create'); - protected function _createTable() { $result[] = parent::_createTable(); @@ -190,7 +203,10 @@ $source->setPatient($patientId, $orgId); $engine->applyToMenuSource($source); - $this->html->h2(sprintf($this->_('Adding the %s track to respondent %s'), $engine->getTrackName(), $patientId)); + $this->html->h2(sprintf($this->_('Adding the %s track to respondent %s: %s'), + $engine->getTrackName(), + $patientId, + $this->getRespondentName())); $this->addSnippets($engine->getTrackCreateSnippetNames(), 'trackEngine', $engine, 'patientId', $patientId, 'organizationId', $orgId); } @@ -345,6 +361,39 @@ return $elements; } + /** + * Get a display version of the patient name + * + * @param array $data Already loaded data. If the correct data is not supplied, then the function will retrieve it + * @return string + */ + protected function getRespondentName(array $data = array()) + { + if ($this->respondentName) { + return $this->respondentName; + } + + if (! ($data && isset($data['grs_first_name'], $data['grs_surname_prefix'], $data['grs_last_name']))) { + list($patientId, $orgId) = $this->_getPatientAndOrganisationParam(); + + $select = $this->db->select(); + $select->from('gems__respondents') + ->joinInner('gems__respondent2org', 'grs_id_user = gr2o_id_user', array()) + ->where('gr2o_patient_nr = ?', $patientId) + ->where('gr2o_id_organization = ?', $orgId); + + $data = $this->db->fetchRow($select); + + if (! $data) { + return ''; + } + } + + $this->respondentName = trim($data['grs_first_name'] . ' ' . $data['grs_surname_prefix']) . ' ' . $data['grs_last_name']; + + return $this->respondentName; + } + public function indexAction() { $this->initFilter(); @@ -482,7 +531,7 @@ $engine->applyToMenuSource($source); if ($trackData = $this->db->fetchRow('SELECT * FROM gems__tracks WHERE gtr_id_track = ? ', $trackId)) { - $this->html->h2(sprintf($this->_('Overview of %s track for respondent %s'), $trackData['gtr_track_name'], $patientId)); + $this->html->h2(sprintf($this->_('Overview of %s track for respondent %s: %s'), $trackData['gtr_track_name'], $patientId, $this->getRespondentName($trackData))); $this->addSnippet('TrackUsageTextDetailsSnippet', 'trackData', $trackData); if (! $this->addTrackUsage($patientId, $orgId, $trackId, array())) { Modified: trunk/library/classes/Gems/Form.php =================================================================== --- trunk/library/classes/Gems/Form.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/classes/Gems/Form.php 2012-10-11 16:07:14 UTC (rev 980) @@ -75,12 +75,14 @@ */ public function __construct($options = null) { + parent::__construct($options); + // $this->addPrefixPath(GEMS_PROJECT_NAME_UC . '_Form_Decorator', GEMS_PROJECT_NAME_UC . '/Form/Decorator/', Zend_Form::DECORATOR); // $this->addPrefixPath(GEMS_PROJECT_NAME_UC . '_Form_Element', GEMS_PROJECT_NAME_UC . '/Form/Element/', Zend_Form::ELEMENT); - parent::__construct($options); + $this->addPrefixPath('Gems_Form_Decorator', 'Gems/Form/Decorator/', Zend_Form::DECORATOR); + $this->addPrefixPath('Gems_Form_Element', 'Gems/Form/Element/', Zend_Form::ELEMENT); - $this->addPrefixPath('Gems_Form_Decorator', 'Gems/Form/Decorator', Zend_Form::DECORATOR); - + $this->addElementPrefixPath(GEMS_PROJECT_NAME_UC . '_Validate', GEMS_PROJECT_NAME_UC . '/Validate/', Zend_Form_Element::VALIDATE); $this->addElementPrefixPath('Gems_Form_Decorator', 'Gems/Form/Decorator/', Zend_Form_Element::DECORATOR); $this->addElementPrefixPath('Gems_Filter', 'Gems/Filter/', Zend_Form_Element::FILTER); $this->addElementPrefixPath('Gems_Validate', 'Gems/Validate/', Zend_Form_Element::VALIDATE); @@ -142,7 +144,7 @@ */ public function afterRegistry() { } - + public function getScripts() { return $this->_scripts; } Modified: trunk/library/classes/Gems/Tracker/RespondentTrack.php =================================================================== --- trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-10-11 16:07:14 UTC (rev 980) @@ -511,7 +511,21 @@ } /** + * Return the name of the respondent * + * @return string The respondents name + */ + public function getRespondentName() + { + if (! isset($this->_respTrackData['grs_first_name'], $this->_respTrackData['grs_surname_prefix'], $this->_respTrackData['grs_last_name'])) { + $this->_ensureRespondentData(); + } + + return trim($this->_respTrackData['grs_first_name'] . ' ' . $this->_respTrackData['grs_surname_prefix']) . ' ' . $this->_respTrackData['grs_last_name']; + } + + /** + * * @return int The respondent2track id */ public function getRespondentTrackId() Modified: trunk/library/classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php 2012-10-11 16:07:14 UTC (rev 980) @@ -178,6 +178,32 @@ return $seq; } + /** + * Get a display version of the patient name + * + * @return string + */ + protected function getRespondentName() + { + if ($this->respondentTrack instanceof Gems_Tracker_RespondentTrack) { + return $this->respondentTrack->getRespondentName(); + } else { + $select = $this->db->select(); + $select->from('gems__respondents') + ->joinInner('gems__respondent2org', 'grs_id_user = gr2o_id_user', array()) + ->where('gr2o_patient_nr = ?', $this->patientId) + ->where('gr2o_id_organization = ?', $this->organizationId); + + $data = $this->db->fetchRow($select); + + if ($data) { + return trim($data['grs_first_name'] . ' ' . $data['grs_surname_prefix']) . ' ' . $data['grs_last_name']; + } + } + + return ''; + } + abstract protected function getTitle(); /** Modified: trunk/library/snippets/BrowseSingleSurveyTokenSnippet.php =================================================================== --- trunk/library/snippets/BrowseSingleSurveyTokenSnippet.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/snippets/BrowseSingleSurveyTokenSnippet.php 2012-10-11 16:07:14 UTC (rev 980) @@ -26,7 +26,7 @@ * (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 Snippets * @author Matijs de Jong <mj...@ma...> @@ -65,6 +65,12 @@ /** * + * @var array Token filter + */ + protected $filter = array(); + + /** + * * @var array */ public $_fixedSort = array( @@ -122,16 +128,7 @@ $bridge->addSortable('calc_used_date', null, $HTML->if($bridge->is_completed, 'disabled date', 'enabled date')); // */ - if ($menuItem = $this->findMenuItem('track', 'show-track')) { - $href = $menuItem->toHRefAttribute($this->request, $bridge); - $track1 = $HTML->if($bridge->calc_track_name, $HTML->a($href, $bridge->calc_track_name)); - } else { - $track1 = $bridge->calc_track_name; - } - $track[] = array($track1, $HTML->if($bridge->calc_track_info, $HTML->small(' [', $bridge->calc_track_info, ']'))); - $track[] = array($bridge->createSortLink('calc_track_name'), $HTML->small(' [', $bridge->createSortLink('calc_track_info'), ']')); - - $bridge->addMultiSort($track); + $bridge->addMultiSort('gtr_track_name'); $bridge->addMultiSort('calc_round_description'); $bridge->addSortable('ggp_name'); $bridge->addSortable('calc_used_date', null, $HTML->if($bridge->is_completed, 'disabled date', 'enabled date')); @@ -179,16 +176,19 @@ */ protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) { - $respId = $this->request->getParam(MUtil_Model::REQUEST_ID); - $orgId = $model->getCurrentOrganization(); - $trackId = $this->request->getParam(Gems_Model::TRACK_ID); + if (true || ! $this->filter) { + $patientId = $this->request->getParam(MUtil_Model::REQUEST_ID1); + $orgId = $this->request->getParam(MUtil_Model::REQUEST_ID2); + $trackId = $this->request->getParam(Gems_Model::TRACK_ID); - $data['grs_id_user'] = $this->db->fetchOne('SELECT gr2o_id_user FROM gems__respondent2org WHERE gr2o_patient_nr = ? AND gr2o_id_organization = ?', array($respId, $orgId)); - $data['gsu_id_survey'] = $this->db->fetchOne('SELECT gro_id_survey FROM gems__rounds WHERE gro_id_track = ?', $trackId); - // $data['gr2o_patient_nr'] = $this->request->getParam(MUtil_Model::REQUEST_ID); - // $data['gro_id_track'] = $this->request->getParam(Gems_Model::TRACK_ID); - $model->addFilter($data); + $this->filter['gr2o_patient_nr'] = $patientId; + $this->filter['gr2o_id_organization'] = $orgId; + $this->filter['gro_id_track'] = $trackId; + // MUtil_Echo::track($this->filter); + } + $model->addFilter($this->filter); + $this->processSortOnly($model); } } Modified: trunk/library/snippets/ShowTrackUsageSnippet.php =================================================================== --- trunk/library/snippets/ShowTrackUsageSnippet.php 2012-10-11 14:17:37 UTC (rev 979) +++ trunk/library/snippets/ShowTrackUsageSnippet.php 2012-10-11 16:07:14 UTC (rev 980) @@ -4,7 +4,7 @@ /** * 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 @@ -15,7 +15,7 @@ * * 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 @@ -65,23 +65,23 @@ $bridge->gr2t_id_respondent_track; $bridge->gr2o_patient_nr; $bridge->can_edit; - + $controller = $this->request->getControllerName(); - + $menuList = $this->menu->getMenuList(); - + $menuList->addByController($controller, 'show-track') ->addByController($controller, 'edit-track') ->addParameterSources($bridge) ->setLowerCase()->showDisabled(); - + $bridge->setOnEmpty($this->_('No other assignments of this track.')); - + // If we have a track Id and is not excluded: mark it! if ($this->respondentTrackId && (! $this->excludeCurrent)) { $bridge->tr()->appendAttrib('class', MUtil_Lazy::iff(MUtil_Lazy::comp($bridge->gr2t_id_respondent_track, '==', $this->respondentTrackId), 'currentRow', null)); } - + // Add show-track button if allowed, otherwise show, again if allowed $bridge->addItemLink($menuList->getActionLink($controller, 'show-track')); @@ -90,7 +90,7 @@ // Add edit-track button if allowed (and not current $bridge->addItemLink($menuList->getActionLink($controller, 'edit-track')); } - + /** * Creates the model * @@ -99,19 +99,19 @@ protected function createModel() { $model = parent::createModel(); - + $model->addColumn('CONCAT(gr2t_completed, \'' . $this->_(' of ') . '\', gr2t_count)', 'progress'); $model->set('progress', 'label', $this->_('Progress'), 'tdClass', 'rightAlign', 'thClass', 'rightAlign'); - + return $model; - } - + } + protected function getTitle() { if ($this->excludeCurrent) { - return sprintf($this->_('Other assignments of this track to %s'), $this->patientId); + return sprintf($this->_('Other assignments of this track to %s: %s'), $this->patientId, $this->getRespondentName()); } else { - return sprintf($this->_('Assignments of this track to %s'), $this->patientId); + return sprintf($this->_('Assignments of this track to %s: %s'), $this->patientId, $this->getRespondentName()); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-10-16 13:41:52
|
Revision: 987 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=987&view=rev Author: matijsdejong Date: 2012-10-16 13:41:46 +0000 (Tue, 16 Oct 2012) Log Message: ----------- Final fix for org-switch/setParam() problem Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php Property Changed: ---------------- trunk/library/ Property changes on: trunk/library ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/library:306-344,346,467 /branches/1.5.x/library:426-455,458-472,475-481 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 /tags/1.5.1/library:485,489,509-510,534 /tags/1.5.3-rc2/library:612,614,616,618 + /branches/1.5.0-pulse/library:306-344,346,467 /branches/1.5.x/library:426-455,458-472,475-481 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 /tags/1.5.1/library:485,489,509-510,534 /tags/1.5.3-rc2/library:612,614,616,618 /tags/1.5.6-pulse20121012/library:986 Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-10-16 13:15:50 UTC (rev 986) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-10-16 13:41:46 UTC (rev 987) @@ -82,14 +82,15 @@ $user->setCurrentOrganization($orgId); if ($origUrl) { - if (strpos($origUrl, '/index/') === false) { - $correctUrl = $origUrl; - } else { + // Check for organisation id in url, but not when a patient id is stated + if (strpos($origUrl, '/' . MUtil_Model::REQUEST_ID1 . '/') === false) { foreach ($user->possibleOrgIds as $key) { $finds[] = '/' . $key. '/' . $oldOrg; $replaces[] = '/' . $key. '/' . $orgId; } $correctUrl = str_replace($finds, $replaces, $origUrl); + } else { + $correctUrl = $origUrl; } // MUtil_Echo::track($origUrl, $correctUrl); $this->getResponse()->setRedirect($correctUrl); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-10-25 11:54:43
|
Revision: 994 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=994&view=rev Author: matijsdejong Date: 2012-10-25 11:54:36 +0000 (Thu, 25 Oct 2012) Log Message: ----------- Version set to 1.5.7 - 50 Gems DatePicker will now work in auto submit forms Added documentation and extra utility functions Modified Paths: -------------- trunk/library/classes/Gems/Form.php trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php trunk/library/classes/Gems/Tracker/Token.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/Util/DatabasePatcher.php trunk/library/classes/Gems/Versions.php trunk/library/classes/MUtil/Form.php trunk/library/classes/MUtil/String.php trunk/library/classes/MUtil/Version.php trunk/library/configs/db/patches.sql Added Paths: ----------- trunk/library/classes/Gems/Form/AutosubmitElementInterface.php trunk/library/classes/Gems/JQuery/Form/Element/DatePicker.php Added: trunk/library/classes/Gems/Form/AutosubmitElementInterface.php =================================================================== --- trunk/library/classes/Gems/Form/AutosubmitElementInterface.php (rev 0) +++ trunk/library/classes/Gems/Form/AutosubmitElementInterface.php 2012-10-25 11:54:36 UTC (rev 994) @@ -0,0 +1,56 @@ +<?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 <COPYRIGHT HOLDER> 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 Form + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * Interface for elements that need to change settings on an autosubmit form. + * + * @package Gems + * @subpackage Form + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +interface Gems_Form_AutosubmitElementInterface +{ + /** + * Change the form into an autosubmit form + * + * @see Gems_Form setAutoSubmit + * @param array $autoSubmitArgs Array containing submitUrl and targetId + */ + public function enableAutoSubmit(array $autoSubmitArgs); +} Modified: trunk/library/classes/Gems/Form.php =================================================================== --- trunk/library/classes/Gems/Form.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/Gems/Form.php 2012-10-25 11:54:36 UTC (rev 994) @@ -77,8 +77,8 @@ { parent::__construct($options); - // $this->addPrefixPath(GEMS_PROJECT_NAME_UC . '_Form_Decorator', GEMS_PROJECT_NAME_UC . '/Form/Decorator/', Zend_Form::DECORATOR); - // $this->addPrefixPath(GEMS_PROJECT_NAME_UC . '_Form_Element', GEMS_PROJECT_NAME_UC . '/Form/Element/', Zend_Form::ELEMENT); + $this->addPrefixPath(GEMS_PROJECT_NAME_UC . '_Form_Decorator', GEMS_PROJECT_NAME_UC . '/Form/Decorator/', Zend_Form::DECORATOR); + $this->addPrefixPath(GEMS_PROJECT_NAME_UC . '_Form_Element', GEMS_PROJECT_NAME_UC . '/Form/Element/', Zend_Form::ELEMENT); $this->addPrefixPath('Gems_Form_Decorator', 'Gems/Form/Decorator/', Zend_Form::DECORATOR); $this->addPrefixPath('Gems_Form_Element', 'Gems/Form/Element/', Zend_Form::ELEMENT); @@ -110,6 +110,24 @@ } } + /** + * Change all elements into an autosubmit element + * + * Call only when $_autoSubmit is set + * + * @param mixed $element + */ + private function _enableAutoSubmitElement($element) + { + if ($element instanceof Zend_Form || $element instanceof Zend_Form_DisplayGroup) { + foreach ($element->getElements() as $sub) { + $this->_enableAutoSubmitElement($sub); + } + } elseif ($element instanceof Gems_Form_AutosubmitElementInterface) { + $element->enableAutoSubmit($this->_autosubmit); + } + } + public function activateJQuery() { if ($this->_no_jquery) { @@ -126,6 +144,49 @@ } /** + * Attach a css file to the form with form-specific css + * + * Optional media parameter can be used to determine media-type (print, screen etc) + * + * @param string $file + * @param string $media + */ + public function addCss($file, $media = '') { + $this->_css[$file] = $media; + } + + /** + * Add a new element + * + * $element may be either a string element type, or an object of type + * Zend_Form_Element. If a string element type is provided, $name must be + * provided, and $options may be optionally provided for configuring the + * element. + * + * If a Zend_Form_Element is provided, $name may be optionally provided, + * and any provided $options will be ignored. + * + * @param string|Zend_Form_Element $element + * @param string $name + * @param array|Zend_Config $options + * @throws Zend_Form_Exception on invalid element + * @return Zend_Form (continuation pattern) + */ + public function addElement($element, $name = null, $options = null) + { + parent::addElement($element, $name, $options); + + if ($this->isAutoSubmit()) { + if (null !== $name) { + $element = $this->getElement($name); + } + $this->_enableAutoSubmitElement($element); + } + + return $this; + } + + /** * Add a script to the head * * @param sring $script name of script, located in baseurl/js/ @@ -150,18 +211,6 @@ } /** - * Attach a css file to the form with form-specific css - * - * Optional media parameter can be used to determine media-type (print, screen etc) - * - * @param string $file - * @param string $media - */ - public function addCss($file, $media = '') { - $this->_css[$file] = $media; - } - - /** * Allows the loader to set resources. * * @param string $name Name of resource to set @@ -204,14 +253,14 @@ return '_' !== $name[0]; } - public function getCss() + public function getAutoSubmit() { - return $this->_css; + return $this->_autosubmit; } - public function getAutoSubmit() + public function getCss() { - return $this->_autosubmit; + return $this->_css; } /** @@ -239,9 +288,10 @@ } /** + * Change the form into an autosubmit form * - * @param type $submitUrl - * @param type $targetId + * @param mixed $submitUrl Url as MUtil_Html_UrlArrayAttribute, array or string + * @param mixed $targetId Id of html element whose content is replaced by the submit result: MUtil_Html_ElementInterface or string */ public function setAutoSubmit($submitUrl, $targetId) { // Filter out elements passed by type @@ -257,6 +307,7 @@ $args['targetId'] = '#' . $args['targetId']; } $this->_autosubmit = $args; + $this->_enableAutoSubmitElement($this); $this->activateJQuery(); } } \ No newline at end of file Added: trunk/library/classes/Gems/JQuery/Form/Element/DatePicker.php =================================================================== --- trunk/library/classes/Gems/JQuery/Form/Element/DatePicker.php (rev 0) +++ trunk/library/classes/Gems/JQuery/Form/Element/DatePicker.php 2012-10-25 11:54:36 UTC (rev 994) @@ -0,0 +1,59 @@ +<?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 <COPYRIGHT HOLDER> 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 JQuery + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * DatePicker extended with autosubmit + * + * @package Gems + * @subpackage JQuery + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_JQuery_Form_Element_DatePicker extends MUtil_JQuery_Form_Element_DatePicker implements Gems_Form_AutosubmitElementInterface +{ + /** + * Change the form into an autosubmit form + * + * @see Gems_Form setAutoSubmit + * @param array $autoSubmitArgs Array containing submitUrl and targetId + */ + public function enableAutoSubmit(array $autoSubmitArgs) + { + $this->setJQueryParam('onSelect', new Zend_Json_Expr('function(dateText, inst) {jQuery(this).trigger(jQuery.Event("keyup"));}')); + } +} Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-10-25 11:54:36 UTC (rev 994) @@ -544,7 +544,7 @@ $options = array(); MUtil_Model_FormBridge::applyFixedOptions('date', $options); - $element = new MUtil_JQuery_Form_Element_DatePicker($name, $options); + $element = new Gems_JQuery_Form_Element_DatePicker($name, $options); $element->setStorageFormat('yyyy-MM-dd'); break; Modified: trunk/library/classes/Gems/Tracker/Token.php =================================================================== --- trunk/library/classes/Gems/Tracker/Token.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/Gems/Tracker/Token.php 2012-10-25 11:54:36 UTC (rev 994) @@ -626,7 +626,18 @@ } /** + * Returns the staff or respondent id of the person + * who created this token. * + * @return int + */ + public function getCreatedBy() + { + return $this->_gemsData['gto_created_by']; + } + + /** + * * @param string $fieldName * @return MUtil_Date */ Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/Gems/User/User.php 2012-10-25 11:54:36 UTC (rev 994) @@ -1186,7 +1186,7 @@ $formData = Zend_Registry::get(MUtil_Model_FormBridge::REGISTRY_KEY); $label = $this->translate->_('Your birthday'); - $birthdayElem = new MUtil_JQuery_Form_Element_DatePicker('birthday'); + $birthdayElem = new Gems_JQuery_Form_Element_DatePicker('birthday'); $birthdayElem->setLabel($label); if (isset($formData['date'])) { $birthdayElem->setOptions($formData['date']); Modified: trunk/library/classes/Gems/Util/DatabasePatcher.php =================================================================== --- trunk/library/classes/Gems/Util/DatabasePatcher.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/Gems/Util/DatabasePatcher.php 2012-10-25 11:54:36 UTC (rev 994) @@ -176,8 +176,16 @@ $data['gpa_completed'] = 1; } catch (Zend_Db_Statement_Exception $e) { - $data['gpa_result'] = substr($e->getMessage(), 0, 254); - $data['gpa_completed'] = $patch['gpa_completed'] ? $patch['gpa_completed'] : 0; + $message = $e->getMessage(); + + // Make sure these do not remain uncompleted + if (MUtil_String::contains($message, 'Duplicate column name')) { + $data['gpa_result'] = 'Column exists in table'; + $data['gpa_completed'] = 1; + } else { + $data['gpa_result'] = substr($message, 0, 254); + $data['gpa_completed'] = $patch['gpa_completed'] ? $patch['gpa_completed'] : 0; + } } $this->db->update('gems__patches', $data, $this->db->quoteInto('gpa_id_patch = ?', $patch['gpa_id_patch'])); Modified: trunk/library/classes/Gems/Versions.php =================================================================== --- trunk/library/classes/Gems/Versions.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/Gems/Versions.php 2012-10-25 11:54:36 UTC (rev 994) @@ -59,7 +59,7 @@ * This means that future patches for the current level * will be loaded, but that previous patches are ignored. */ - return 49; + return 50; } /** @@ -69,7 +69,7 @@ */ public final function getGemsVersion() { - return '1.5.6'; + return '1.5.7'; } /** Modified: trunk/library/classes/MUtil/Form.php =================================================================== --- trunk/library/classes/MUtil/Form.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/MUtil/Form.php 2012-10-25 11:54:36 UTC (rev 994) @@ -35,7 +35,12 @@ */ /** + * Extends a Zend_Form with automatic Dojo and JQuery activation, + * MUtil_Html rendering integration and non-css stylesheet per + * form (possibly automatically calculated) fixed label widths. * + * @see MUtil_Html + * * @package MUtil * @subpackage Form * @copyright Copyright (c) 2011 Erasmus MC @@ -44,6 +49,12 @@ */ class MUtil_Form extends Zend_Form { + /** + * The order in which the element parts should be displayed + * when using a fixed or dynamic label width. + * + * @var array + */ protected $_displayOrder = array('element', 'errors', 'description'); /** @@ -139,6 +150,23 @@ } } + /** + * Add a new element + * + * $element may be either a string element type, or an object of type + * Zend_Form_Element. If a string element type is provided, $name must be + * provided, and $options may be optionally provided for configuring the + * element. + * + * If a Zend_Form_Element is provided, $name may be optionally provided, + * and any provided $options will be ignored. + * + * @param string|Zend_Form_Element $element + * @param string $name + * @param array|Zend_Config $options + * @throws Zend_Form_Exception on invalid element + * @return Zend_Form (continuation pattern) + */ public function addElement($element, $name = null, $options = null) { parent::addElement($element, $name, $options); @@ -162,6 +190,14 @@ return $this; } + /** + * The order in which the element parts should be displayed + * when using a fixed or dynamic label width. + * + * @see setLabelWidth + * + * @return array Array containing element parts like 'element', 'errors' and 'description' + */ public function getDisplayOrder() { return $this->_displayOrder; @@ -232,7 +268,7 @@ $this->setDisableTranslator($disableTranslateValidators); } } - + $valid = parent::isValid($data); if (isset($oldTranslations)) { @@ -284,6 +320,15 @@ return $this; } + /** + * The order in which the element parts should be displayed + * when using a fixed or dynamic label width. + * + * @see setLabelWidth + * + * @param array $order Array containing element parts like 'element', 'errors' and 'description' + * @return MUtil_Form (continuation pattern) + */ public function setDisplayOrder(array $order) { $this->_displayOrder = $order; Modified: trunk/library/classes/MUtil/String.php =================================================================== --- trunk/library/classes/MUtil/String.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/MUtil/String.php 2012-10-25 11:54:36 UTC (rev 994) @@ -69,6 +69,18 @@ } /** + * Returns true if needle is anywhere in haystack + * + * @param string $haystack The string to search in + * @param string $needle The string to search for + * @return boolean + */ + public static function contains($haystack, $needle) + { + return strpos($haystack, $needle) !== false; + } + + /** * Return the part after $input and $filter stopped being the same * * stripStringLeft('abcdef', 'abcx') => 'def' Modified: trunk/library/classes/MUtil/Version.php =================================================================== --- trunk/library/classes/MUtil/Version.php 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/classes/MUtil/Version.php 2012-10-25 11:54:36 UTC (rev 994) @@ -25,16 +25,30 @@ * 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 Version + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** - * @package MUtil + * MUtil version info + * + * @package MUtil + * @subpackage Util + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 */ class MUtil_Version { const MAJOR = 1; const MINOR = 1; - const BUILD = 33; + const BUILD = 34; public static function get() { Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-10-24 15:30:17 UTC (rev 993) +++ trunk/library/configs/db/patches.sql 2012-10-25 11:54:36 UTC (rev 994) @@ -439,3 +439,5 @@ ALTER TABLE `gems__rounds` ADD gro_display_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' NULL AFTER gro_changed_event; ALTER TABLE `gems__tracks` CHANGE gtr_completed_event gtr_completed_event varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; + +-- GEMS VERSION: 50 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-11-16 16:47:12
|
Revision: 1022 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1022&view=rev Author: matijsdejong Date: 2012-11-16 16:47:05 +0000 (Fri, 16 Nov 2012) Log Message: ----------- Moved AddTrack storage to cache and clear the cache after Track or Survey update Modified Paths: -------------- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/Gems/Default/TrackMaintenanceAction.php trunk/library/snippets/AddTracksSnippet.php Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2012-11-16 11:12:14 UTC (rev 1021) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2012-11-16 16:47:05 UTC (rev 1022) @@ -48,6 +48,12 @@ { public $autoFilter = true; + /** + * + * @var Zend_Cache_Core + */ + public $cache; + public $menuEditIncludeLevel = 100; public $menuShowIncludeLevel = 100; @@ -232,7 +238,23 @@ } /** + * Hook to perform action after a record (with changes) was saved * + * As the data was already saved, it can NOT be changed anymore + * + * @param array $data + * @param boolean $isNew + * @return boolean True when you want to display the default 'saved' messages + */ + public function afterSave(array $data, $isNew) + { + $this->cache->clean('matchTags', array('surveys', 'tracks')); + + return true; + } + + /** + * * @param array $data The data that will be saved. * @param boolean $isNew * $param Zend_Form $form Modified: trunk/library/classes/Gems/Default/TrackMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-11-16 11:12:14 UTC (rev 1021) +++ trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-11-16 16:47:05 UTC (rev 1022) @@ -52,6 +52,12 @@ */ protected $browseMode; + /** + * + * @var Zend_Cache_Core + */ + public $cache; + public $sortKey = array('gtr_track_name' => SORT_ASC); public $summarizedActions = array('index', 'autofilter', 'check-all'); @@ -145,7 +151,23 @@ } /** + * Hook to perform action after a record (with changes) was saved * + * As the data was already saved, it can NOT be changed anymore + * + * @param array $data + * @param boolean $isNew + * @return boolean True when you want to display the default 'saved' messages + */ + public function afterSave(array $data, $isNew) + { + $this->cache->clean('matchTags', array('surveys', 'tracks')); + + return true; + } + + /** + * * @param array $data The data that will be saved. * @param boolean $isNew * $param Zend_Form $form Modified: trunk/library/snippets/AddTracksSnippet.php =================================================================== --- trunk/library/snippets/AddTracksSnippet.php 2012-11-16 11:12:14 UTC (rev 1021) +++ trunk/library/snippets/AddTracksSnippet.php 2012-11-16 16:47:05 UTC (rev 1022) @@ -55,6 +55,12 @@ { /** * + * @var Zend_Cache_Core + */ + protected $cache; + + /** + * * @var Zend_Db_Adapter_Abstract */ public $db; @@ -85,12 +91,6 @@ protected $request; /** - * - * @var Zend_Session - */ - public $session; - - /** * Switch to set display of respondent dropdown on or off * * @var mixed When string, string is used for display, when false, nothing is displayed @@ -137,13 +137,11 @@ throw new exception('Invalid track type requested.'); } - $organization_id = intval($this->request->getParam(MUtil_Model::REQUEST_ID2)); - $trackTypeCache = $trackType . '_' . $organization_id; - $trackTypeTime = $trackType . '_time'; + $orgId = intval($this->request->getParam(MUtil_Model::REQUEST_ID2)); + $cacheId = __CLASS__ . '_' . $trackType . '_' . $orgId; + $tracks = $this->cache->load($cacheId); - if (isset($this->session->$trackTypeCache, $this->session->$trackTypeTime) && (time() < $this->session->$trackTypeTime)) { - $tracks = $this->session->$trackTypeCache; - } else { + if (! $tracks) { switch ($trackType) { case 'T': $sql = "SELECT gtr_id_track, gtr_track_name @@ -152,7 +150,7 @@ (gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND gtr_active = 1 AND gtr_track_type = 'T' AND - gtr_organizations LIKE '%|$organization_id|%' + gtr_organizations LIKE '%|$orgId|%' ORDER BY gtr_track_name"; break; case 'S': @@ -166,7 +164,7 @@ gtr_active = 1 AND gtr_track_type = 'S' AND ggp_respondent_members = 1 AND - gtr_organizations LIKE '%|$organization_id|%' + gtr_organizations LIKE '%|$orgId|%' ORDER BY gtr_track_name"; break; case 'M': @@ -180,7 +178,7 @@ gtr_active = 1 AND gtr_track_type = 'S' AND ggp_respondent_members = 0 AND - gtr_organizations LIKE '%|$organization_id|%' + gtr_organizations LIKE '%|$orgId|%' ORDER BY gtr_track_name"; break; // default: @@ -188,8 +186,7 @@ } $tracks = $this->db->fetchPairs($sql); - $this->session->$trackTypeCache = $tracks; - $this->session->$trackTypeTime = time() + 600; + $this->cache->save($tracks, $cacheId, array('surveys', 'tracks')); } $div = MUtil_Html::create()->div(array('class' => 'toolbox')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-11-28 16:18:12
|
Revision: 1045 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1045&view=rev Author: matijsdejong Date: 2012-11-28 16:18:00 +0000 (Wed, 28 Nov 2012) Log Message: ----------- New answer display filters that show all of survey for respondent or all single survey for respondent Extended SnippetLoader.php to search in Tracker/Snippets directory as well Modified Paths: -------------- trunk/library/classes/Gems/Event/Survey/Display/ByValue.php trunk/library/classes/Gems/Event/Survey/Display/Reverse.php trunk/library/classes/Gems/Event/Survey/Display/YesOnTop.php trunk/library/classes/Gems/Snippets/SnippetLoader.php trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po trunk/library/snippets/AnswerModelSnippet.php trunk/library/snippets/TrackAnswersModelSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php Added: trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php (rev 0) +++ trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,75 @@ +<?php + +/** + * Copyright (c) 2012, 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 Events + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: AllOfSurvey.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Put the highest value first + * + * @package Gems + * @subpackage Events + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Event_Survey_Display_AllOfSurvey extends Gems_Registry_TargetAbstract implements Gems_Event_SurveyDisplayEventInterface +{ + /** + * + * @var Zend_Translate + */ + protected $translate; + + /** + * Function that returns the snippets to use for this display. + * + * @param Gems_Tracker_Token $token The token to get the snippets for + * @return array of Snippet names or nothing + */ + public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) + { + return 'SurveyAnswersModelSnippet'; + } + + /** + * A pretty name for use in dropdown selection boxes. + * + * @return string Name + */ + public function getEventName() + { + return $this->translate->_('Show all answers for this survey type'); + } +} Added: trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php (rev 0) +++ trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,75 @@ +<?php + +/** + * Copyright (c) 2012, 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 Events + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: AllSingleSurvey.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Put the highest value first + * + * @package Gems + * @subpackage Events + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Event_Survey_Display_AllSingleSurvey extends Gems_Registry_TargetAbstract implements Gems_Event_SurveyDisplayEventInterface +{ + /** + * + * @var Zend_Translate + */ + protected $translate; + + /** + * Function that returns the snippets to use for this display. + * + * @param Gems_Tracker_Token $token The token to get the snippets for + * @return array of Snippet names or nothing + */ + public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) + { + return 'SingleSurveyAnswersModelSnippet'; + } + + /** + * A pretty name for use in dropdown selection boxes. + * + * @return string Name + */ + public function getEventName() + { + return $this->translate->_('Show all stand alone surveys for this type'); + } +} Modified: trunk/library/classes/Gems/Event/Survey/Display/ByValue.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/ByValue.php 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/classes/Gems/Event/Survey/Display/ByValue.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2012 Erasmus MC * @license New BSD License - * @version $id: OnlyAnswered.php 203 2012-01-01t 12:51:32Z matijs $ + * @version $id: ByValue.php 203 2012-01-01t 12:51:32Z matijs $ */ /** Modified: trunk/library/classes/Gems/Event/Survey/Display/Reverse.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/Reverse.php 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/classes/Gems/Event/Survey/Display/Reverse.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2012 Erasmus MC * @license New BSD License - * @version $id: OnlyAnswered.php 203 2012-01-01t 12:51:32Z matijs $ + * @version $id: Reverse.php 203 2012-01-01t 12:51:32Z matijs $ */ /** Added: trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php (rev 0) +++ trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,75 @@ +<?php + +/** + * Copyright (c) 2012, 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 Events + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: TokenOnly.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Put the highest value first + * + * @package Gems + * @subpackage Events + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Event_Survey_Display_TokenOnly extends Gems_Registry_TargetAbstract implements Gems_Event_SurveyDisplayEventInterface +{ + /** + * + * @var Zend_Translate + */ + protected $translate; + + /** + * Function that returns the snippets to use for this display. + * + * @param Gems_Tracker_Token $token The token to get the snippets for + * @return array of Snippet names or nothing + */ + public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) + { + return 'SingleTokenAnswerModelSnippet'; + } + + /** + * A pretty name for use in dropdown selection boxes. + * + * @return string Name + */ + public function getEventName() + { + return $this->translate->_('Show answers for this token only'); + } +} Added: trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php (rev 0) +++ trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,75 @@ +<?php + +/** + * Copyright (c) 2012, 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 Events + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: TrackOnly.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Put the highest value first + * + * @package Gems + * @subpackage Events + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Event_Survey_Display_TrackOnly extends Gems_Registry_TargetAbstract implements Gems_Event_SurveyDisplayEventInterface +{ + /** + * + * @var Zend_Translate + */ + protected $translate; + + /** + * Function that returns the snippets to use for this display. + * + * @param Gems_Tracker_Token $token The token to get the snippets for + * @return array of Snippet names or nothing + */ + public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) + { + return 'TrackAnswersModelSnippet'; + } + + /** + * A pretty name for use in dropdown selection boxes. + * + * @return string Name + */ + public function getEventName() + { + return $this->translate->_('Show all tokens for this survey in the track'); + } +} Modified: trunk/library/classes/Gems/Event/Survey/Display/YesOnTop.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/YesOnTop.php 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/classes/Gems/Event/Survey/Display/YesOnTop.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2012 Erasmus MC * @license New BSD License - * @version $id: OnlyAnswered.php 203 2012-01-01t 12:51:32Z matijs $ + * @version $id: YesOnTop.php 203 2012-01-01t 12:51:32Z matijs $ */ /** Modified: trunk/library/classes/Gems/Snippets/SnippetLoader.php =================================================================== --- trunk/library/classes/Gems/Snippets/SnippetLoader.php 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/classes/Gems/Snippets/SnippetLoader.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -2,7 +2,7 @@ /** * 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 @@ -13,7 +13,7 @@ * * 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 @@ -24,7 +24,7 @@ * 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. - * + * * Gems specific version of the snippet loader * * @package Gems @@ -49,6 +49,11 @@ */ class Gems_Snippets_SnippetLoader extends Gems_Loader_TargetLoaderAbstract implements MUtil_Snippets_SnippetLoaderInterface { + /** + * Allows sub classes of Gems_Loader_LoaderAbstract to specify the subdirectory where to look for. + * + * @var string $cascade An optional subdirectory where this subclass always loads from. + */ protected $cascade = 'Snippets'; protected $loader; @@ -64,8 +69,13 @@ * @param mixed $container A container acting as source for MUtil_Registry_Source * @param array $dirs The directories where to look for requested classes */ - public function __construct($container = null, $dirs = array()) { + public function __construct($container = null, $dirs = array()) + { + // Add tracker snippets directory + $dirs['Gems_Tracker'] = realpath(__DIR__ . '/../..'); + parent::__construct($container, $dirs); + $this->backup = new MUtil_Snippets_SnippetLoader($this); $this->addDirectory(GEMS_LIBRARY_DIR . '/classes/MUtil/Snippets/Standard'); } Modified: trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -104,7 +104,7 @@ */ public function getAnswerSnippetNames() { - return array('AnswerModelSnippet'); + return array('SingleTokenAnswerModelSnippet'); } /** Added: trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,80 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: SingleSurveyModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ + */ + +/** + * Show answers for all standalone surveys of this survey type + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ +class Gems_Tracker_Snippets_SingleSurveyAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Use compact view and show all tokens of the same surveyId in + * one view. Property used by respondent export + * + * @var boolean + */ + public $grouped = true; + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + if ($this->grouped) { + $filter['gto_id_track'] = $this->token->getTrackId(); + $filter['gto_id_respondent'] = $this->token->getRespondentId(); + $filter['gto_id_organization'] = $this->token->getOrganizationId(); + $filter['gto_id_survey'] = $this->token->getSurveyId(); + } else { + $filter['gto_id_token'] = $this->token->getTokenId(); + } + + $model->setFilter($filter); + } + } +} Added: trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,62 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: SingleTokenAnswerModelSnippet.php 685 2012-05-16 15:11:59Z michieltcs $ + */ + +/** + * Displays answers to a survey. + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Tracker_Snippets_SingleTokenAnswerModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + $model->setFilter(array('gto_id_token' => $this->token->getTokenId())); + } + } +} Added: trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,79 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: SurveyAnswersModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ + */ + +/** + * Show all tokens of a certain survey type + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Tracker_Snippets_SurveyAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Use compact view and show all tokens of the same surveyId in + * one view. Property used by respondent export + * + * @var boolean + */ + public $grouped = true; + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + if ($this->grouped) { + $filter['gto_id_respondent'] = $this->token->getRespondentId(); + $filter['gto_id_organization'] = $this->token->getOrganizationId(); + $filter['gto_id_survey'] = $this->token->getSurveyId(); + } else { + $filter['gto_id_token'] = $this->token->getTokenId(); + } + + $model->setFilter($filter); + } + } +} Added: trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -0,0 +1,78 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: TrackAnswersModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ + */ + +/** + * Class description of TrackAnswersModelSnippet + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ +class Gems_Tracker_Snippets_TrackAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Use compact view and show all tokens of the same surveyId in + * one view. Property used by respondent export + * + * @var boolean + */ + public $grouped = true; + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + if ($this->grouped) { + $filter['gto_id_respondent_track'] = $this->token->getRespondentTrackId(); + $filter['gto_id_survey'] = $this->token->getSurveyId(); + } else { + $filter['gto_id_token'] = $this->token->getTokenId(); + } + + $model->setFilter($filter); + } + } +} Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/languages/default-en.po 2012-11-28 16:18:00 UTC (rev 1045) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-27 12:11+0100\n" +"POT-Creation-Date: 2012-11-28 16:25+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Menno Dekker <men...@er...>\n" +"Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "Language: en_GB\n" "MIME-Version: 1.0\n" @@ -1816,7 +1816,7 @@ msgstr "Can the organization be used?" #: classes/Gems/Default/OrganizationAction.php:152 -#: classes/Gems/User/Form/LoginForm.php:151 views/scripts/index/login.phtml:7 +#: classes/Gems/User/Form/LoginForm.php:151 msgid "Login" msgstr "Login" @@ -3435,6 +3435,14 @@ msgid "Previous Version Answers Lookup" msgstr "Previous Version Answers Lookup" +#: classes/Gems/Event/Survey/Display/AllOfSurvey.php:73 +msgid "Show all answers for this survey type" +msgstr "Show all answers for this survey type" + +#: classes/Gems/Event/Survey/Display/AllSingleSurvey.php:73 +msgid "Show all stand alone surveys for this type" +msgstr "Show all stand alone surveys for this type" + #: classes/Gems/Event/Survey/Display/ByValue.php:87 msgid "Show the highest answer first." msgstr "Show the highest answer first." @@ -3447,6 +3455,14 @@ msgid "Reverse the question order." msgstr "Reverse the question order." +#: classes/Gems/Event/Survey/Display/TokenOnly.php:73 +msgid "Show answers for this token only" +msgstr "Show answers for this token only" + +#: classes/Gems/Event/Survey/Display/TrackOnly.php:73 +msgid "Show all tokens for this survey in the track" +msgstr "Show all tokens for this survey in the track" + #: classes/Gems/Event/Survey/Display/YesOnTop.php:102 msgid "Yes answers on top." msgstr "Yes answers on top." @@ -3555,7 +3571,6 @@ msgstr "Clean cache" #: classes/Gems/Menu/MenuAbstract.php:421 -#: views/scripts/index/resetpassword.phtml:1 msgid "Reset password" msgstr "Reset password" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/languages/default-nl.po 2012-11-28 16:18:00 UTC (rev 1045) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-27 12:09+0100\n" +"POT-Creation-Date: 2012-11-28 16:25+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Menno Dekker <men...@er...>\n" +"Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "Language: nl_NL\n" "MIME-Version: 1.0\n" @@ -1826,7 +1826,7 @@ msgstr "Is de organisatie in gebruik?" #: classes/Gems/Default/OrganizationAction.php:152 -#: classes/Gems/User/Form/LoginForm.php:151 views/scripts/index/login.phtml:7 +#: classes/Gems/User/Form/LoginForm.php:151 msgid "Login" msgstr "Inloggen" @@ -3462,6 +3462,14 @@ msgid "Previous Version Answers Lookup" msgstr "Antwoorden overnemen van vorige keer" +#: classes/Gems/Event/Survey/Display/AllOfSurvey.php:73 +msgid "Show all answers for this survey type" +msgstr "Toon alle antwoorden voor deze vragenlijst" + +#: classes/Gems/Event/Survey/Display/AllSingleSurvey.php:73 +msgid "Show all stand alone surveys for this type" +msgstr "Toon alle antwoorden voor deze losse vragenlijst" + #: classes/Gems/Event/Survey/Display/ByValue.php:87 msgid "Show the highest answer first." msgstr "Toon het hoogste antwoord eerst." @@ -3474,6 +3482,14 @@ msgid "Reverse the question order." msgstr "Draai de vraag volgorde om." +#: classes/Gems/Event/Survey/Display/TokenOnly.php:73 +msgid "Show answers for this token only" +msgstr "Toon alleen de antwoorden voor dit kenmerk" + +#: classes/Gems/Event/Survey/Display/TrackOnly.php:73 +msgid "Show all tokens for this survey in the track" +msgstr "Toon alle antwoorden voor deze vragenlijst in dit traject" + #: classes/Gems/Event/Survey/Display/YesOnTop.php:102 msgid "Yes answers on top." msgstr "Ja antwoorden bovenaan." @@ -3583,7 +3599,6 @@ msgstr "Cache opruimen" #: classes/Gems/Menu/MenuAbstract.php:421 -#: views/scripts/index/resetpassword.phtml:1 msgid "Reset password" msgstr "Reset wachtwoord" Modified: trunk/library/snippets/AnswerModelSnippet.php =================================================================== --- trunk/library/snippets/AnswerModelSnippet.php 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/snippets/AnswerModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -38,25 +38,13 @@ /** * Displays answers to a survey. * + * @deprecated * @package Gems * @subpackage Tracker * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4 */ -class AnswerModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +class AnswerModelSnippet extends Gems_Tracker_Snippets_SingleTokenAnswerModelSnippet { - /** - * Overrule to implement snippet specific filtering and sorting. - * - * @param MUtil_Model_ModelAbstract $model - */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) - { - if ($this->request) { - $this->processSortOnly($model); - - $model->setFilter(array('gto_id_token' => $this->token->getTokenId())); - } - } } Modified: trunk/library/snippets/TrackAnswersModelSnippet.php =================================================================== --- trunk/library/snippets/TrackAnswersModelSnippet.php 2012-11-27 11:13:04 UTC (rev 1044) +++ trunk/library/snippets/TrackAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) @@ -39,40 +39,13 @@ /** * Class description of TrackAnswersModelSnippet * + * @deprecated * @package Gems * @subpackage Tracker * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4 */ -class TrackAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +class TrackAnswersModelSnippet extends Gems_Tracker_Snippets_TrackAnswersModelSnippet { - /** - * Use compact view and show all tokens of the same surveyId in - * one view. Property used by respondent export - * - * @var boolean - */ - public $grouped = true; - - /** - * Overrule to implement snippet specific filtering and sorting. - * - * @param MUtil_Model_ModelAbstract $model - */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) - { - if ($this->request) { - $this->processSortOnly($model); - - if ($this->grouped) { - $filter['gto_id_respondent_track'] = $this->token->getRespondentTrackId(); - $filter['gto_id_survey'] = $this->token->getSurveyId(); - } else { - $filter['gto_id_token'] = $this->token->getTokenId(); - } - - $model->setFilter($filter); - } - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-11-29 11:06:36
|
Revision: 1046 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1046&view=rev Author: matijsdejong Date: 2012-11-29 11:06:23 +0000 (Thu, 29 Nov 2012) Log Message: ----------- Moved tracker snippets to snippet directory Improvbed naming Modified Paths: -------------- trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php trunk/library/classes/Gems/Snippets/SnippetLoader.php trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po trunk/library/snippets/AnswerModelSnippet.php trunk/library/snippets/TrackAnswersModelSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php trunk/library/classes/Gems/Snippets/Tracker/ trunk/library/classes/Gems/Snippets/Tracker/Answers/ trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTokenAnswerModelSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTrackAnswersModelSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Answers/TrackAnswersModelSnippet.php Removed Paths: ------------- trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php Modified: trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Event/Survey/Display/AllOfSurvey.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -60,7 +60,7 @@ */ public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) { - return 'SurveyAnswersModelSnippet'; + return 'Tracker_Answers_SurveyAnswersModelSnippet'; } /** Deleted: trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Event/Survey/Display/AllSingleSurvey.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -1,75 +0,0 @@ -<?php - -/** - * Copyright (c) 2012, 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 Events - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2012 Erasmus MC - * @license New BSD License - * @version $id: AllSingleSurvey.php 203 2012-01-01t 12:51:32Z matijs $ - */ - -/** - * Put the highest value first - * - * @package Gems - * @subpackage Events - * @copyright Copyright (c) 2012 Erasmus MC - * @license New BSD License - * @since Class available since version 1.5.7 - */ -class Gems_Event_Survey_Display_AllSingleSurvey extends Gems_Registry_TargetAbstract implements Gems_Event_SurveyDisplayEventInterface -{ - /** - * - * @var Zend_Translate - */ - protected $translate; - - /** - * Function that returns the snippets to use for this display. - * - * @param Gems_Tracker_Token $token The token to get the snippets for - * @return array of Snippet names or nothing - */ - public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) - { - return 'SingleSurveyAnswersModelSnippet'; - } - - /** - * A pretty name for use in dropdown selection boxes. - * - * @return string Name - */ - public function getEventName() - { - return $this->translate->_('Show all stand alone surveys for this type'); - } -} Added: trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php (rev 0) +++ trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -0,0 +1,75 @@ +<?php + +/** + * Copyright (c) 2012, 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 Events + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: AllSingleSurvey.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Put the highest value first + * + * @package Gems + * @subpackage Events + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Event_Survey_Display_AllSingleTrack extends Gems_Registry_TargetAbstract implements Gems_Event_SurveyDisplayEventInterface +{ + /** + * + * @var Zend_Translate + */ + protected $translate; + + /** + * Function that returns the snippets to use for this display. + * + * @param Gems_Tracker_Token $token The token to get the snippets for + * @return array of Snippet names or nothing + */ + public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) + { + return 'Tracker_Answers_SingleTrackAnswersModelSnippet'; + } + + /** + * A pretty name for use in dropdown selection boxes. + * + * @return string Name + */ + public function getEventName() + { + return $this->translate->_('Show all tokens for this survey in this track type'); + } +} Modified: trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Event/Survey/Display/TokenOnly.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -60,7 +60,7 @@ */ public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) { - return 'SingleTokenAnswerModelSnippet'; + return 'Tracker_Answers_SingleTokenAnswerModelSnippet'; } /** Modified: trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php =================================================================== --- trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Event/Survey/Display/TrackOnly.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -60,7 +60,7 @@ */ public function getAnswerDisplaySnippets(Gems_Tracker_Token $token) { - return 'TrackAnswersModelSnippet'; + return 'Tracker_Answers_TrackAnswersModelSnippet'; } /** Modified: trunk/library/classes/Gems/Snippets/SnippetLoader.php =================================================================== --- trunk/library/classes/Gems/Snippets/SnippetLoader.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Snippets/SnippetLoader.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -1,4 +1,5 @@ <?php + /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -71,9 +72,6 @@ */ public function __construct($container = null, $dirs = array()) { - // Add tracker snippets directory - $dirs['Gems_Tracker'] = realpath(__DIR__ . '/../..'); - parent::__construct($container, $dirs); $this->backup = new MUtil_Snippets_SnippetLoader($this); Added: trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTokenAnswerModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTokenAnswerModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTokenAnswerModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -0,0 +1,62 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: SingleTokenAnswerModelSnippet.php 685 2012-05-16 15:11:59Z michieltcs $ + */ + +/** + * Displays answers from a single token to a survey. + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Snippets_Tracker_Answers_SingleTokenAnswerModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + $model->setFilter(array('gto_id_token' => $this->token->getTokenId())); + } + } +} Added: trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTrackAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTrackAnswersModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Answers/SingleTrackAnswersModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -0,0 +1,80 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: SingleSurveyModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ + */ + +/** + * Show answers for all standalone surveys of this survey type + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ +class Gems_Snippets_Tracker_Answers_SingleTrackAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Use compact view and show all tokens of the same surveyId in + * one view. Property used by respondent export + * + * @var boolean + */ + public $grouped = true; + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + if ($this->grouped) { + $filter['gto_id_track'] = $this->token->getTrackId(); + $filter['gto_id_respondent'] = $this->token->getRespondentId(); + $filter['gto_id_organization'] = $this->token->getOrganizationId(); + $filter['gto_id_survey'] = $this->token->getSurveyId(); + } else { + $filter['gto_id_token'] = $this->token->getTokenId(); + } + + $model->setFilter($filter); + } + } +} Added: trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -0,0 +1,78 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: SurveyAnswersModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ + */ + +/** + * Show all tokens of a certain survey type + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.7 + */ +class Gems_Snippets_Tracker_Answers_SurveyAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Use compact view and show all tokens of the same surveyId in + * one view. Property used by respondent export + * + * @var boolean + */ + public $grouped = true; + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + if ($this->grouped) { + $filter['gto_id_respondent'] = $this->token->getRespondentId(); + $filter['gto_id_organization'] = $this->token->getOrganizationId(); + $filter['gto_id_survey'] = $this->token->getSurveyId(); + } else { + $filter['gto_id_token'] = $this->token->getTokenId(); + } + + $model->setFilter($filter); + } + } +} Added: trunk/library/classes/Gems/Snippets/Tracker/Answers/TrackAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Answers/TrackAnswersModelSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Answers/TrackAnswersModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -0,0 +1,77 @@ +<?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 Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: TrackAnswersModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ + */ + +/** + * Show all answers for one survey within a track + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ +class Gems_Snippets_Tracker_Answers_TrackAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric +{ + /** + * Use compact view and show all tokens of the same surveyId in + * one view. Property used by respondent export + * + * @var boolean + */ + public $grouped = true; + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + if ($this->grouped) { + $filter['gto_id_respondent_track'] = $this->token->getRespondentTrackId(); + $filter['gto_id_survey'] = $this->token->getSurveyId(); + } else { + $filter['gto_id_token'] = $this->token->getTokenId(); + } + + $model->setFilter($filter); + } + } +} Modified: trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Tracker/Engine/SingleSurveyEngine.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -104,7 +104,7 @@ */ public function getAnswerSnippetNames() { - return array('SingleTokenAnswerModelSnippet'); + return array('Tracker_Answers_SingleTokenAnswerModelSnippet'); } /** Modified: trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -339,7 +339,7 @@ */ public function getAnswerSnippetNames() { - return array('TrackAnswersModelSnippet'); + return array('Tracker_Answers_TrackAnswersModelSnippet'); } /** Deleted: trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Tracker/Snippets/SingleSurveyAnswersModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -1,80 +0,0 @@ -<?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 Gems - * @subpackage Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id: SingleSurveyModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ - */ - -/** - * Show answers for all standalone surveys of this survey type - * - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class Gems_Tracker_Snippets_SingleSurveyAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric -{ - /** - * Use compact view and show all tokens of the same surveyId in - * one view. Property used by respondent export - * - * @var boolean - */ - public $grouped = true; - - /** - * Overrule to implement snippet specific filtering and sorting. - * - * @param MUtil_Model_ModelAbstract $model - */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) - { - if ($this->request) { - $this->processSortOnly($model); - - if ($this->grouped) { - $filter['gto_id_track'] = $this->token->getTrackId(); - $filter['gto_id_respondent'] = $this->token->getRespondentId(); - $filter['gto_id_organization'] = $this->token->getOrganizationId(); - $filter['gto_id_survey'] = $this->token->getSurveyId(); - } else { - $filter['gto_id_token'] = $this->token->getTokenId(); - } - - $model->setFilter($filter); - } - } -} Deleted: trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Tracker/Snippets/SingleTokenAnswerModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -1,62 +0,0 @@ -<?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 Gems - * @subpackage Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id: SingleTokenAnswerModelSnippet.php 685 2012-05-16 15:11:59Z michieltcs $ - */ - -/** - * Displays answers to a survey. - * - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.5.7 - */ -class Gems_Tracker_Snippets_SingleTokenAnswerModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric -{ - /** - * Overrule to implement snippet specific filtering and sorting. - * - * @param MUtil_Model_ModelAbstract $model - */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) - { - if ($this->request) { - $this->processSortOnly($model); - - $model->setFilter(array('gto_id_token' => $this->token->getTokenId())); - } - } -} Deleted: trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Tracker/Snippets/SurveyAnswersModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -1,79 +0,0 @@ -<?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 Gems - * @subpackage Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id: SurveyAnswersModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ - */ - -/** - * Show all tokens of a certain survey type - * - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.5.7 - */ -class Gems_Tracker_Snippets_SurveyAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric -{ - /** - * Use compact view and show all tokens of the same surveyId in - * one view. Property used by respondent export - * - * @var boolean - */ - public $grouped = true; - - /** - * Overrule to implement snippet specific filtering and sorting. - * - * @param MUtil_Model_ModelAbstract $model - */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) - { - if ($this->request) { - $this->processSortOnly($model); - - if ($this->grouped) { - $filter['gto_id_respondent'] = $this->token->getRespondentId(); - $filter['gto_id_organization'] = $this->token->getOrganizationId(); - $filter['gto_id_survey'] = $this->token->getSurveyId(); - } else { - $filter['gto_id_token'] = $this->token->getTokenId(); - } - - $model->setFilter($filter); - } - } -} Deleted: trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/classes/Gems/Tracker/Snippets/TrackAnswersModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -1,78 +0,0 @@ -<?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 Gems - * @subpackage Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id: TrackAnswersModelSnippet.php 946 2012-09-19 13:08:21Z mennodekker $ - */ - -/** - * Class description of TrackAnswersModelSnippet - * - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class Gems_Tracker_Snippets_TrackAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric -{ - /** - * Use compact view and show all tokens of the same surveyId in - * one view. Property used by respondent export - * - * @var boolean - */ - public $grouped = true; - - /** - * Overrule to implement snippet specific filtering and sorting. - * - * @param MUtil_Model_ModelAbstract $model - */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) - { - if ($this->request) { - $this->processSortOnly($model); - - if ($this->grouped) { - $filter['gto_id_respondent_track'] = $this->token->getRespondentTrackId(); - $filter['gto_id_survey'] = $this->token->getSurveyId(); - } else { - $filter['gto_id_token'] = $this->token->getTokenId(); - } - - $model->setFilter($filter); - } - } -} Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/languages/default-en.po 2012-11-29 11:06:23 UTC (rev 1046) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-28 16:25+0100\n" +"POT-Creation-Date: 2012-11-29 12:04+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -3439,9 +3439,9 @@ msgid "Show all answers for this survey type" msgstr "Show all answers for this survey type" -#: classes/Gems/Event/Survey/Display/AllSingleSurvey.php:73 -msgid "Show all stand alone surveys for this type" -msgstr "Show all stand alone surveys for this type" +#: classes/Gems/Event/Survey/Display/AllSingleTrack.php:73 +msgid "Show all tokens for this survey in this track type" +msgstr "Show all tokens for this survey in this track type" #: classes/Gems/Event/Survey/Display/ByValue.php:87 msgid "Show the highest answer first." @@ -5176,6 +5176,9 @@ msgstr[1] "" "After this survey there are another %d surveys we would like you to answer." +#~ msgid "Show all stand alone surveys for this type" +#~ msgstr "Show all stand alone surveys for this type" + #~ msgid "Gems project path" #~ msgstr "Gems project path" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/languages/default-nl.po 2012-11-29 11:06:23 UTC (rev 1046) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-28 16:25+0100\n" +"POT-Creation-Date: 2012-11-29 12:04+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -3466,9 +3466,9 @@ msgid "Show all answers for this survey type" msgstr "Toon alle antwoorden voor deze vragenlijst" -#: classes/Gems/Event/Survey/Display/AllSingleSurvey.php:73 -msgid "Show all stand alone surveys for this type" -msgstr "Toon alle antwoorden voor deze losse vragenlijst" +#: classes/Gems/Event/Survey/Display/AllSingleTrack.php:73 +msgid "Show all tokens for this survey in this track type" +msgstr "Toon alle antwoorden voor deze vragenlijst in dit traject type" #: classes/Gems/Event/Survey/Display/ByValue.php:87 msgid "Show the highest answer first." @@ -5232,6 +5232,9 @@ msgstr[0] "Na deze vragenlijst hebben we nog één andere vragenlijst voor u." msgstr[1] "Na deze vragenlijst hebben we nog %d andere vragenlijsten voor u." +#~ msgid "Show all stand alone surveys for this type" +#~ msgstr "Toon alle antwoorden voor deze losse vragenlijst" + #~ msgid "Gems project path" #~ msgstr "Gems project folder" Modified: trunk/library/snippets/AnswerModelSnippet.php =================================================================== --- trunk/library/snippets/AnswerModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/snippets/AnswerModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -45,6 +45,6 @@ * @license New BSD License * @since Class available since version 1.4 */ -class AnswerModelSnippet extends Gems_Tracker_Snippets_SingleTokenAnswerModelSnippet +class AnswerModelSnippet extends Gems_Snippets_Tracker_Answers_SingleTokenAnswerModelSnippet { } Modified: trunk/library/snippets/TrackAnswersModelSnippet.php =================================================================== --- trunk/library/snippets/TrackAnswersModelSnippet.php 2012-11-28 16:18:00 UTC (rev 1045) +++ trunk/library/snippets/TrackAnswersModelSnippet.php 2012-11-29 11:06:23 UTC (rev 1046) @@ -46,6 +46,6 @@ * @license New BSD License * @since Class available since version 1.4 */ -class TrackAnswersModelSnippet extends Gems_Tracker_Snippets_TrackAnswersModelSnippet +class TrackAnswersModelSnippet extends Gems_Snippets_Tracker_Answers_TrackAnswersModelSnippet { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-12-13 14:55:36
|
Revision: 1061 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1061&view=rev Author: matijsdejong Date: 2012-12-13 14:55:27 +0000 (Thu, 13 Dec 2012) Log Message: ----------- Updated version numbers Modified Paths: -------------- trunk/library/classes/Gems/Versions.php trunk/library/classes/MUtil/Version.php trunk/library/configs/db/tables/gems__patch_levels.10.sql Modified: trunk/library/classes/Gems/Versions.php =================================================================== --- trunk/library/classes/Gems/Versions.php 2012-12-13 14:42:39 UTC (rev 1060) +++ trunk/library/classes/Gems/Versions.php 2012-12-13 14:55:27 UTC (rev 1061) @@ -51,15 +51,15 @@ public final function getBuild() { /** - * DO NOT FORGET !!! to update gems__patch_levels: + * DO NOT FORGET !!! to update GEMS__PATCH_LEVELS: * * For new installations the initial patch level should - * be THIS LEVEL. + * be THIS LEVEL plus one. * - * This means that future patches for the current level - * will be loaded, but that previous patches are ignored. + * This means that future patches for will be loaded, + * but that previous patches are ignored. */ - return 50; + return 51; } /** @@ -69,7 +69,7 @@ */ public final function getGemsVersion() { - return '1.5.7'; + return '1.5.8'; } /** Modified: trunk/library/classes/MUtil/Version.php =================================================================== --- trunk/library/classes/MUtil/Version.php 2012-12-13 14:42:39 UTC (rev 1060) +++ trunk/library/classes/MUtil/Version.php 2012-12-13 14:55:27 UTC (rev 1061) @@ -48,7 +48,7 @@ { const MAJOR = 1; const MINOR = 1; - const BUILD = 35; + const BUILD = 36; public static function get() { Modified: trunk/library/configs/db/tables/gems__patch_levels.10.sql =================================================================== --- trunk/library/configs/db/tables/gems__patch_levels.10.sql 2012-12-13 14:42:39 UTC (rev 1060) +++ trunk/library/configs/db/tables/gems__patch_levels.10.sql 2012-12-13 14:55:27 UTC (rev 1061) @@ -11,4 +11,4 @@ INSERT INTO gems__patch_levels (gpl_level, gpl_created) VALUES - (51, CURRENT_TIMESTAMP); + (52, CURRENT_TIMESTAMP); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-12-30 18:23:53
|
Revision: 1081 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1081&view=rev Author: matijsdejong Date: 2012-12-30 18:23:40 +0000 (Sun, 30 Dec 2012) Log Message: ----------- Cleaned up dead code Moved date_default_timezone_set to index.php Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Loader/LoaderAbstract.php trunk/library/classes/MUtil/Lazy.php trunk/library/pre_bootstrap.php Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2012-12-29 19:36:44 UTC (rev 1080) +++ trunk/library/changelog.txt 2012-12-30 18:23:40 UTC (rev 1081) @@ -1,3 +1,8 @@ +Important changes from 1.5.7 => 1.6 +============================================================ +Defined constant GEMS_PROJECT_PATH removed from code +Moved date_default_timezone_set to index.php (can generate warnings) + Important changes from 1.5.6 => 1.5.7 ============================================================ In LimeSurvey tokenanswerpersistence must be set to true for all surveys Modified: trunk/library/classes/Gems/Loader/LoaderAbstract.php =================================================================== --- trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-12-29 19:36:44 UTC (rev 1080) +++ trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-12-30 18:23:40 UTC (rev 1081) @@ -37,7 +37,7 @@ /** * LoaderAbstract is used for classes that chain from Gems_Loader and that thus allow - * projects to overrule the origingal implementation. + * projects to overrule the original implementation. * * I.e if you create a class <Project_name>_Model or <Project_name>_Util, that class is loaded * automatically instead of Gems_Model or Gems_Util. <Project_name>_Model should be a subclass Modified: trunk/library/classes/MUtil/Lazy.php =================================================================== --- trunk/library/classes/MUtil/Lazy.php 2012-12-29 19:36:44 UTC (rev 1080) +++ trunk/library/classes/MUtil/Lazy.php 2012-12-30 18:23:40 UTC (rev 1081) @@ -253,26 +253,3 @@ return new MUtil_Lazy_Stack_EmptyStack($source); } } - -if (defined('MUTIL_LAZY_FUNCTIONS')) { - - function iff($if, $then, $else = null) - { - return MUtil_Lazy::iff($if, $then, $else = null); - } - - function iif($if, $then, $else = null) - { - return MUtil_Lazy::iif($if, $then, $else = null); - } - - function L($var) - { - return MUtil_Lazy::L($var); - } - - function lazy($var) - { - return MUtil_Lazy::L($var); - } - } Modified: trunk/library/pre_bootstrap.php =================================================================== --- trunk/library/pre_bootstrap.php 2012-12-29 19:36:44 UTC (rev 1080) +++ trunk/library/pre_bootstrap.php 2012-12-30 18:23:40 UTC (rev 1081) @@ -38,15 +38,11 @@ * @subpackage Project */ -// GENERAL PHP SETUP +// PHP ENCODING SETUP +defined('APPLICATION_ENCODING') || define('APPLICATION_ENCODING', 'UTF-8'); -// Needed for strict on >= PHP 5.1.2 -if (version_compare(phpversion(), '5.1.2') > 0) { - date_default_timezone_set('Europe/Amsterdam'); -} +mb_internal_encoding(APPLICATION_ENCODING); -mb_internal_encoding('UTF-8'); - // ZEND FRAMEWORK STARTS HERE /** @@ -55,18 +51,13 @@ defined('APPLICATION_PATH') || define('APPLICATION_PATH', GEMS_ROOT_DIR . '/application'); /** - * Compatibility, remove in 1.6 - */ -define('GEMS_PROJECT_PATH', APPLICATION_PATH); - -/** * Set path to Zend Framework * then to project directory * then to Gems application directory */ set_include_path( - GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR . APPLICATION_PATH . '/classes' . PATH_SEPARATOR . + GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR . get_include_path() //. PATH_SEPARATOR . GEMS_ROOT_DIR . '/library' //Shouldn't be needed, uncomment when neccessary ); @@ -76,10 +67,6 @@ 'Gems' => GEMS_LIBRARY_DIR . '/classes' ); -// Make sure Lazy is loaded -// defined('MUTIL_LAZY_FUNCTIONS') || define('MUTIL_LAZY_FUNCTIONS', 1); -require_once 'MUtil/Lazy.php'; - // Zend_Application: loads the autoloader require_once 'Zend/Application.php'; @@ -89,15 +76,12 @@ APPLICATION_PATH . '/configs/application.ini' ); -// Set up autoload. -// require_once "Zend/Loader/Autoloader.php"; +// Set up autoload (included by Zend_Application). $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('MUtil_'); $autoloader->registerNamespace('Gems_'); $autoloader->registerNamespace(GEMS_PROJECT_NAME_UC . '_'); -// Zend_Date::setOptions(array('format_type' => 'php')); - // MUtil_Model::$verbose = true; $application->bootstrap() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-10 16:43:46
|
Revision: 1092 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1092&view=rev Author: matijsdejong Date: 2013-01-10 16:43:36 +0000 (Thu, 10 Jan 2013) Log Message: ----------- ZFDebug now set from application.ini and JQuery local aware $GEMS_DIRS no longer used (except as backup) new SnippetLoaderInterface using pluginsLoader Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Events.php trunk/library/classes/Gems/Loader/LoaderAbstract.php trunk/library/classes/Gems/Project/ProjectSettings.php trunk/library/classes/Gems/Snippets/SnippetLoader.php trunk/library/classes/GemsEscort.php trunk/library/classes/MUtil/Loader/CachedLoader.php trunk/library/classes/MUtil/Snippets/SnippetLoader.php trunk/library/classes/MUtil/Snippets/SnippetLoaderInterface.php trunk/library/classes/ZFDebug/Controller/Plugin/Debug.php trunk/library/pre_bootstrap.php Added Paths: ----------- trunk/library/classes/MUtil/Loader/PluginLoader.php Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/changelog.txt 2013-01-10 16:43:36 UTC (rev 1092) @@ -2,6 +2,8 @@ ============================================================ Defined constant GEMS_PROJECT_PATH removed from code (update at least your application.ini and use APPLICATION_PATH instead) Moved date_default_timezone_set to index.php (can generate warnings) +The global variable $GEMS_DIRS is deprecated, redefine it the application.ini using loaderDirs.Gems = .... (see NewProject) +ZFDebug is now activated in the application.ini using: zfdebug.activate = 1 Important changes from 1.5.6 => 1.5.7 ============================================================ Modified: trunk/library/classes/Gems/Events.php =================================================================== --- trunk/library/classes/Gems/Events.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/Gems/Events.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -46,8 +46,6 @@ */ class Gems_Events extends Gems_Loader_TargetLoaderAbstract { - const EVENTS_DIR = 'Event'; - const TRACK_COMPLETION_EVENT = 'Track/Completed'; const ROUND_CHANGED_EVENT = 'Round/Changed'; const SURVEY_BEFORE_ANSWERING_EVENT = 'Survey/BeforeAnswering'; @@ -96,22 +94,19 @@ /** * - * @global array $GEMS_DIRS An array of directories that specify where to look for code. * @param string $eventType An event subdirectory (may contain multiple levels split by '/' * @return array An array of type prefix => classname */ protected function _getEventDirs($eventType) { - global $GEMS_DIRS; - $eventClass = str_replace('/', '_', $eventType); - foreach ($GEMS_DIRS as $name => $dir) { - $prefix = $name . '_' . self::EVENTS_DIR . '_' . $eventClass . '_'; - $paths[$prefix] = $dir . '/' . $name . '/' . self::EVENTS_DIR . '/' . $eventType; + foreach ($this->_dirs as $name => $dir) { + $prefix = $name . '_' . $eventClass . '_'; + $paths[$prefix] = $dir . DIRECTORY_SEPARATOR . $eventType; } - $paths[''] = APPLICATION_PATH . '/' . strtolower(self::EVENTS_DIR . 's/' . $eventType); - // MUtil_Echo::track($paths); + $paths[''] = APPLICATION_PATH . '/events/' . strtolower($eventType); + MUtil_Echo::track($paths); return $paths; } @@ -182,7 +177,7 @@ if (! class_exists($eventName, true)) { // Autoload is used for Zend standard defined classnames, // so if the class is not autoloaded, define the path here. - $filename = APPLICATION_PATH . '/' . strtolower(self::EVENTS_DIR . 's/' . $eventType) . '/' . $eventName . '.php'; + $filename = APPLICATION_PATH . '/events/' . strtolower($eventType) . '/' . $eventName . '.php'; if (! file_exists($filename)) { throw new Gems_Exception_Coding("The event '$eventName' of type '$eventType' does not exist at location: $filename."); Modified: trunk/library/classes/Gems/Loader/LoaderAbstract.php =================================================================== --- trunk/library/classes/Gems/Loader/LoaderAbstract.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/Gems/Loader/LoaderAbstract.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -76,20 +76,12 @@ protected $_dirs; /** - * This array holds a cache of requested class -> resulting classname pairs so we don't have - * to check all prefixes and paths over and over again * - * @var array classname->resulting class + * @var MUtil_Loader_PluginLoader */ - private $_loaded = array(); + protected $_loader; /** - * - * @var Zend_Loader_PluginLoader_Interface - */ - private $_loader; - - /** * Allows sub classes of Gems_Loader_LoaderAbstract to specify the subdirectory where to look for. * * @var string $cascade An optional subdirectory where this subclass always loads from. @@ -109,22 +101,13 @@ if ($this->cascade) { foreach ($dirs as $prefix => $path) { - $newdirs[$prefix . '_' . $this->cascade] = $path; - // $newdirs[$prefix . '_' . $this->cascade] = $path . '/' . str_replace('_', '/', $this->cascade); + $newdirs[$prefix . '_' . $this->cascade] = $path . '/' . strtr($this->cascade, '_', '/'); } $this->_dirs = $newdirs; } - //$this->_loader = new Zend_Loader_PluginLoader($this->_dirs); - //* - // Set the directories to the used cascade pattern - $this->_loader = new Zend_Loader_PluginLoader(); - foreach (array_reverse($this->_dirs) as $prefix => $path) { - $this->_loader->addPrefixPath($prefix, $path . '/' . str_replace('_', '/', $prefix)); - } - // */ + $this->_loader = new MUtil_Loader_PluginLoader($this->_dirs); - if (MUtil_Registry_Source::$verbose) { MUtil_Echo::r($this->_dirs, '$this->_dirs in ' . get_class($this) . '->' . __FUNCTION__ . '():'); } @@ -174,180 +157,30 @@ */ protected function _loadClass($name, $create = false, array $arguments = array()) { - /* $className = $this->_loader->load($name); // MUtil_Echo::track($className); if (is_subclass_of($className, __CLASS__)) { $create = true; - // error_log($className); $arguments = array($this->_containers[0], $this->_dirs); } elseif (is_subclass_of($className, 'MUtil_Registry_TargetInterface')) { $create = true; } - if ($create) { - switch (count($arguments)) { - case 0: - $obj = new $className(); - break; - - case 1: - $obj = new $className($arguments[0]); - break; - - case 2: - $obj = new $className($arguments[0], $arguments[1]); - break; - - case 3: - $obj = new $className($arguments[0], $arguments[1], $arguments[2]); - break; - - default: - throw new Gems_Exception_Coding(__CLASS__ . '->' . __FUNCTION__ . ' cannot create class with ' . count($arguments) . ' parameters.'); - } - } else { - $obj = new MUtil_Lazy_StaticCall($className); + if (! $create) { + return new MUtil_Lazy_StaticCall($className); } + $obj = $this->_loader->createClass($className, $arguments); + if ($obj instanceof MUtil_Registry_TargetInterface) { - // error_log(get_class($obj)); if ((! $this->applySource($obj)) && parent::$verbose) { MUtil_Echo::track("Source apply to object of type $name failed."); } } return $obj; - // */ - - // echo $name . ($create ? ' create' : ' not created') . "<br/>\n"; - - $cname = trim(str_replace('/', '_', ucfirst($name)), '_'); - $cfile = str_replace('_', '/', $cname) . '.php'; - - $found = false; - - /** - * First check if the class was already loaded - * If so, we don't have to try loading from the other paths - **/ - if (array_key_exists($cname, $this->_loaded) && $obj = $this->_loadClassPath('', $this->_loaded[$cname], $create, $arguments)) { - $found = true; - } - - if (!$found) { - foreach ($this->_dirs as $prefix => $paths) { - if (!empty($prefix)) { - $fprefix = '/' . str_replace('_', '/', $prefix); - $prefix .= '_'; - } else { - $fprefix = ''; - } - - if (!is_array($paths)) { - $paths = array($paths); - } - foreach ($paths as $path) { - /* - $className = $prefix . $cname; - - if ($this->_loader->loadClass($className, $path . $fprefix . '/' . $cfile)) { - if (is_subclass_of($className, __CLASS__)) { - $create = true; - $arguments = array($this->_containers[0], $this->_dirs); - - } elseif (is_subclass_of($className, 'MUtil_Registry_TargetInterface')) { - $create = true; - } - - - if ($create) { - $obj = $this->_loader->createClass($className, $arguments); - } else { - $obj = new MUtil_Lazy_StaticCall($className); - } - - $found = true; - $this->_loaded[$cname] = get_class($obj); - break 2; - } // */ - - //* - if ($obj = $this->_loadClassPath($path . $fprefix . '/' . $cfile, $prefix . $cname, $create, $arguments)) { - MUtil_Echo::track($prefix . $cname); - $found = true; - $this->_loaded[$cname] = get_class($obj); - break 2; - } // */ - } - } - } - - if ($found) { - if ($obj instanceof MUtil_Registry_TargetInterface) { - // error_log(get_class($obj)); - if ((! $this->applySource($obj)) && parent::$verbose) { - MUtil_Echo::track("Source apply to object of type $name failed."); - } - } - - return $obj; - } - - // Throw exception when not found - throw new Gems_Exception_Coding(__CLASS__ . '->' . __FUNCTION__ . ' cannot find class with name ' .$name . ' in ' . print_r($this->_dirs, true)); } - - /** - * Try the actual loading of the class. - * - * @param string $filepath The full path to the class - * @param string $classname The full class name. - * @param boolean $create Create the object, or only when an MUtil_Registry_TargetInterface instance. - * @param array $arguments Class initialization arguments. - * @return mixed Null or object of type $classname or MUtil_Lazy_StaticCall - */ - private function _loadClassPath($filepath, $classname, $create, array $arguments) - { - // echo '_loadClassPath: ' . $this->cascade . '-' . $classname . '-' . ($create ? 1 : 0) . "<br/>\n"; - // debug_print_backtrace(); - // MUtil_Echo::track($filepath, $classname, $this->cascade); - - if (! class_exists($classname, false)) { - if (file_exists($filepath)) { - // echo $classname . ' :: ' . $filepath . "<br/>\n"; - include_once($filepath); - } else { - return; - } - } - - if (is_subclass_of($classname, __CLASS__)) { - return new $classname($this->_containers[0], $this->_dirs); - - } elseif ($create || is_subclass_of($classname, 'MUtil_Registry_TargetInterface')) { - switch (count($arguments)) { - case 0: - return new $classname(); - - case 1: - return new $classname($arguments[0]); - - case 2: - return new $classname($arguments[0], $arguments[1]); - - case 3: - return new $classname($arguments[0], $arguments[1], $arguments[2]); - - default: - throw new Gems_Exception_Coding(__CLASS__ . '->' . __FUNCTION__ . ' cannot create class with ' . count($arguments) . ' parameters.'); - } - - } else { - return new MUtil_Lazy_StaticCall($classname); - } - } } \ No newline at end of file Modified: trunk/library/classes/Gems/Project/ProjectSettings.php =================================================================== --- trunk/library/classes/Gems/Project/ProjectSettings.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/Gems/Project/ProjectSettings.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -533,4 +533,14 @@ { return isset($this['jquery'], $this['jquery']['local']); } + + /** + * Is this project use a multi locale project + * + * @return boolean + */ + public function isMultiLocale() + { + return (boolean) (isset($this['multiLocale']) && $this['multiLocale']); + } } \ No newline at end of file Modified: trunk/library/classes/Gems/Snippets/SnippetLoader.php =================================================================== --- trunk/library/classes/Gems/Snippets/SnippetLoader.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/Gems/Snippets/SnippetLoader.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -57,66 +57,45 @@ */ protected $cascade = 'Snippets'; - protected $loader; - /** - * @var MUtil_Snippets_SnippetLoader - */ - protected $backup; - - /** - * Initialize the snippetloader (Gems style) + * Sets the source of variables and the first directory for snippets * - * @param mixed $container A container acting as source for MUtil_Registry_Source - * @param array $dirs The directories where to look for requested classes + * @param mixed $source Something that is or can be made into MUtil_Registry_SourceInterface, otheriwse Zend_Registry is used. + * @param array $dirs prefix => pathname The inital paths to load from */ - public function __construct($container = null, $dirs = array()) + public function __construct($source = null, array $dirs = array()) { - parent::__construct($container, $dirs); + parent::__construct($source, $dirs); - $this->backup = new MUtil_Snippets_SnippetLoader($this); - $this->addDirectory(GEMS_LIBRARY_DIR . '/classes/MUtil/Snippets/Standard'); - } - - - /** - * Add a directory to the front of the list of places where snippets are loaded from. - * - * @param string $dir - * @return MUtil_Snippets_SnippetLoader - */ - public function addDirectory($dir) - { - if (!array_key_exists('', $this->_dirs)) { - $this->_dirs[''] = array(); + $noPrefixDirs = array( + GEMS_LIBRARY_DIR . '/classes/MUtil/Snippets/Standard', + GEMS_LIBRARY_DIR . '/snippets', + GEMS_ROOT_DIR . '/application/snippets', + ); + foreach ($noPrefixDirs as $dir) { + if (file_exists($dir)) { + $this->_loader->addPrefixPath('', $dir); + } } - array_unshift($this->_dirs[''], $dir); - return $this->backup->addDirectory($dir); + // $this->_loader->addPrefixPath('MUtil_Snippets', GEMS_LIBRARY_DIR . '/classes/MUtil/Snippets/Standard'); } /** - * Add parameter values to the source for snippets. + * Add prefixed paths to the registry of paths * - * @param mixed $container_or_pairs This function can be called with either a single container or a list of name/value pairs. - * @return MUtil_Snippets_SnippetLoader + * @param string $prefix + * @param string $path + * @return MUtil_Snippets_SnippetLoaderInterface */ - public function addSource($container_or_pairs) + public function addPrefixPath($prefix, $path) { - return $this->backup->addSource($container_or_pairs); - } + $this->_loader->addPrefixPath($prefix, $path); - /** - * Returns the directories where snippets are loaded from. - * - * @param array $dirs - * @return array - */ - public function getDirectories() - { - return $this->backup->getDirectories(); + return $this; } + /** * Searches and loads a .php snippet file. * @@ -133,8 +112,6 @@ } catch (Exception $exc) { MUtil_Echo::track($exc->getMessage()); throw $exc; - //Class loading failed, now defer - //$snippet = $this->backup->getSnippet($filename, $extraSourceParameters); } return $snippet; @@ -147,18 +124,21 @@ */ public function getSource() { - return $this->backup->getSource(); + return $this; } /** - * Set the directories where snippets are loaded from. + * Remove a prefix (or prefixed-path) from the registry * - * @param array $dirs - * @return MUtil_Snippets_SnippetLoader (continuation pattern) + * @param string $prefix + * @param string $path OPTIONAL + * @return MUtil_Snippets_SnippetLoaderInterface */ - public function setDirectories(array $dirs) + public function removePrefixPath($prefix, $path = null) { - return $this->backup->setDirectories($dirs); + $this->_loader->removePrefixPath($prefix, $path); + + return $this; } /** @@ -169,6 +149,6 @@ */ public function setSource(MUtil_Registry_SourceInterface $source) { - return $this->backup->setSource($source); + throw new Gems_Exception_Coding('Cannot set source for ' . __CLASS__); } } \ No newline at end of file Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/GemsEscort.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -51,41 +51,54 @@ */ class GemsEscort extends MUtil_Application_Escort { + /** + * Default reception code value + */ const RECEPTION_OK = 'OK'; + /** + * Static instance + * + * @var self + */ private static $_instanceOfSelf; + /** + * Targets for _updateVariable + * + * @var array + */ private $_copyDestinations; - private $_startFirebird; /** - * The menu variable + * The prefix / directory paths where the Gems Loaders should look * - * @var Gems_Menu + * @var array prefix => path */ - public $menu; + private $_loaderDirs; /** - * Copy from Zend_Translate_Adapter + * The project loader * - * Translates the given string - * returns the translation + * @var MUtil_Loader_PluginLoader + */ + private $_projectLoader; + + /** + * Is firebird logging on (set by constructor from application.ini) * - * @param string $text Translation string - * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale - * identifier, @see Zend_Locale for more information - * @return string + * @var boolean */ - public function _($text, $locale = null) - { - if (! isset($this->request)) { - // Locale is fixed by request. - $this->setException(new Gems_Exception_Coding('Requested translation before request was made available.')); - } - return $this->translate->getAdapter()->_($text, $locale); - } + private $_startFirebird; /** + * The menu variable + * + * @var Gems_Menu + */ + public $menu; + + /** * Constructor * * @param Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application @@ -97,18 +110,73 @@ self::$_instanceOfSelf = $this; + // DIRECTORIES USED BY LOADER + $dirs = $this->getOption('loaderDirs'); + if (! $dirs) { + global $GEMS_DIRS; + + // Use $GEMS_DIRS if defined + if (isset($GEMS_DIRS)) { + $dirs = array(); + + foreach ($GEMS_DIRS as $prefix => $dir) { + $dirs[$prefix] = $dir . '/' . strtr($prefix, '_', '/'); + } + } else { + // Default setting + $dirs = array( + GEMS_PROJECT_NAME_UC => APPLICATION_PATH . '/classes/' .GEMS_PROJECT_NAME_UC, + 'Gems' => GEMS_LIBRARY_DIR . '/classes/Gems' + ); + } + } + // MUtil_Echo::track($dirs); + $this->_loaderDirs = array_reverse($dirs); + + // NAMESPACES + $autoloader = Zend_Loader_Autoloader::getInstance(); + foreach ($this->_loaderDirs as $prefix => $path) { + if ($prefix) { + $autoloader->registerNamespace($prefix . '_'); + } + } + + // PROJECT LOADER + $this->_projectLoader = new MUtil_Loader_PluginLoader($this->_loaderDirs); + + // FIRE BUG $firebug = $application->getOption('firebug'); $this->_startFirebird = $firebug['log']; + // START SESSIE $sessionOptions['name'] = GEMS_PROJECT_NAME_UC . '_' . md5(APPLICATION_PATH) . '_SESSID'; $sessionOptions['cookie_path'] = strtr(dirname($_SERVER['SCRIPT_NAME']), '\\', '/'); $sessionOptions['cookie_httponly'] = true; $sessionOptions['cookie_secure'] = (APPLICATION_ENV == 'production'); - Zend_Session::start($sessionOptions); } /** + * Copy from Zend_Translate_Adapter + * + * Translates the given string + * returns the translation + * + * @param string $text Translation string + * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale + * identifier, @see Zend_Locale for more information + * @return string + */ + public function _($text, $locale = null) + { + if (! isset($this->request)) { + // Locale is fixed by request. + $this->setException(new Gems_Exception_Coding('Requested translation before request was made available.')); + } + return $this->translate->getAdapter()->_($text, $locale); + } + + /** * Function to maintain uniformity of access to variables from the bootstrap object. * Copies all variables to the target object. * @@ -310,25 +378,7 @@ */ protected function _initLoader() { - global $GEMS_DIRS; - - /* - $dirs = $this->getOption('loaderDirs'); - - if (! $dirs) { - - $dirs = array(); - - foreach ($GEMS_DIRS as $prefix => $dir) { - $dirs[$prefix] = $dir . '/' . str_replace('_', '/', $prefix); - } - } - - MUtil_Echo::track($dirs); - - return $this->createProjectClass('Loader', $this->getContainer(), array_reverse($dirs)); - // */ - return $this->createProjectClass('Loader', $this->getContainer(), $GEMS_DIRS); + return $this->createProjectClass('Loader', $this->getContainer(), $this->_loaderDirs); } /** @@ -552,40 +602,47 @@ * Add ZFDebug info to the page output. * * @return void - * / + */ protected function _initZFDebug() { - // if ((APPLICATION_ENV === 'development') && - if ((APPLICATION_ENV !== 'production') && - (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') === FALSE)) { + if ((APPLICATION_ENV === 'production') && + (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.'))) { + // Never on on production systems, never for IE 6 + return; + } - $autoloader = Zend_Loader_Autoloader::getInstance(); - $autoloader->registerNamespace('ZFDebug'); + $debug = $this->getOption('zfdebug'); + if (! isset($debug['activate']) || ('1' !== $debug['activate'])) { + // Only turn on when activated + return; + } - $options = array( - 'plugins' => array('Variables', - 'File' => array('base_path' => '/path/to/project'), - 'Memory', - 'Time', - 'Registry', - 'Exception'), - // 'jquery_path' => not yet initialized - ); + $autoloader = Zend_Loader_Autoloader::getInstance(); + $autoloader->registerNamespace('ZFDebug'); - # Instantiate the database adapter and setup the plugin. - # Alternatively just add the plugin like above and rely on the autodiscovery feature. - $this->bootstrap('db'); - $db = $this->getPluginResource('db'); - $options['plugins']['Database']['adapter'] = $db->getDbAdapter(); + $options = array( + 'plugins' => array('Variables', + 'File' => array('base_path' => '/path/to/project'), + 'Memory', + 'Time', + 'Registry', + 'Exception'), + // 'jquery_path' => not yet initialized + ); - $debug = new ZFDebug_Controller_Plugin_Debug($options); + # Instantiate the database adapter and setup the plugin. + # Alternatively just add the plugin like above and rely on the autodiscovery feature. + $this->bootstrap('db'); + $db = $this->getPluginResource('db'); + $options['plugins']['Database']['adapter'] = $db->getDbAdapter(); - $this->bootstrap('frontController'); - $frontController = $this->getResource('frontController'); - $frontController->registerPlugin($debug); - } - }// */ + $debug = new ZFDebug_Controller_Plugin_Debug($options); + $this->bootstrap('frontController'); + $frontController = $this->getResource('frontController'); + $frontController->registerPlugin($debug); + } + /** * Function called if specified in the Project.ini layoutPrepare section before * the layout is drawn, but after the rest of the program has run it's course. @@ -1126,14 +1183,6 @@ { $this->_copyVariables($actionController ? $actionController : $this->controllerAfterAction); - // Ste the directories where the snippets are/ - if ($actionController instanceof MUtil_Controller_Action) { - $snippetLoader = $actionController->getSnippetLoader(); - $snippetLoader->addDirectory(GEMS_ROOT_DIR . '/library/Gems/snippets'); - $snippetLoader->addDirectory(APPLICATION_PATH . '/snippets'); - // MUtil_Echo::track($snippetLoader->getDirectories()); - } - $this->prepareController(); // Now set some defaults @@ -1151,32 +1200,20 @@ Zend_Registry::set(MUtil_Model_FormBridge::REGISTRY_KEY, array('date' => $dateFormOptions)); } + /** + * Creates an object of the specified className seareching the loader dirs path + * + * @param string $className + * @param mixed $paramOne Optional + * @param mixed $paramTwo Optional + * @return object + */ protected function createProjectClass($className, $paramOne = null, $paramTwo = null) { - $filename = APPLICATION_PATH . '/classes/' . GEMS_PROJECT_NAME_UC . '/'; - $filename .= str_replace('_', '/', $className) . '.php'; - if (file_exists($filename)) { - $className = GEMS_PROJECT_NAME_UC . '_' . $className; - } else { - $className = 'Gems_' . $className; - } + $arguments = func_get_args(); + array_shift($arguments); - switch (func_num_args()) - { - case 1: - return new $className(); - - case 2: - return new $className($paramOne); - - case 3: - return new $className($paramOne, $paramTwo); - - default: - throw new Gems_Exception_Coding( - __CLASS__ . '->' . __FUNCTION__ . '() called with more parameters than possible.' - ); - } + return $this->_projectLoader->createClass($className, $arguments); } /** @@ -1564,7 +1601,7 @@ */ public function requestChanged(Zend_Controller_Request_Abstract $request) { - if ($this->project->multiLocale) { + if ($this->project->isMultiLocale()) { // Get the choosen language $localeId = Gems_Cookies::getLocale($request); Modified: trunk/library/classes/MUtil/Loader/CachedLoader.php =================================================================== --- trunk/library/classes/MUtil/Loader/CachedLoader.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/MUtil/Loader/CachedLoader.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -44,7 +44,7 @@ * @license New BSD License * @since Class available since MUtil version 1.2 */ -class MUtil_Loader_CachedLoader +class MUtil_Loader_CachedLoader implements Zend_Loader_Autoloader_Interface { /** * @@ -241,6 +241,46 @@ } /** + * Autoload a class + * + * @abstract + * @param string $class + * @return mixed + * False [if unable to load $class] + * get_class($class) [if $class is successfully loaded] + */ + public function autoload($class) + { + $className = ltrim($class, '\\'); + $file = ''; + $namespace = ''; + if ($lastNsPos = strripos($className, '\\')) { + $namespace = substr($className, 0, $lastNsPos); + $className = substr($className, $lastNsPos + 1); + $file = strtr($namespace, '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + } + $file .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php'; + + if (isset($this->_cacheClassArray[$class])) { + if ($this->_cacheClassArray[$class]) { + return (boolean) $this->includeFile($this->_cacheClassArray[$class]); + } + } else { + $dirs = $this->_includeDirs; + + foreach ($dirs as $dir) { + // error_log($dir . $file); + if ($this->includeFile($dir . $file)) { + $this->_cacheClassArray[$class] = $dir . $file; + $this->_cacheChanged = true; + return true; + } + } + } + return false; + } + + /** * Create a new instance of a class * * @param string $className The name of the class @@ -341,13 +381,14 @@ * Include a file with cached existence check * * @param string $file The full path to the file + * @return mixed The load return value if available, "1" if loaded without return, false otherwise */ public function includeFile($file) { if (file_exists($file)) { $result = include $file; - return $result ? $result : true; + return $result ? $result : false; } return false; @@ -431,9 +472,9 @@ if ($lastNsPos = strripos($className, '\\')) { $namespace = substr($className, 0, $lastNsPos); $className = substr($className, $lastNsPos + 1); - $file = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; + $file = strtr($namespace, '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } - $file .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; + $file .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php'; if (isset($this->_cacheClassArray[$class])) { if ($this->_cacheClassArray[$class]) { Added: trunk/library/classes/MUtil/Loader/PluginLoader.php =================================================================== --- trunk/library/classes/MUtil/Loader/PluginLoader.php (rev 0) +++ trunk/library/classes/MUtil/Loader/PluginLoader.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -0,0 +1,128 @@ +<?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 <COPYRIGHT HOLDER> 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 Loader + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: PluginLoader.php$ + */ + +/** + * Extension of PluginLoader with class instantiation + * + * @package MUtil + * @subpackage Loader + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.2 + */ +class MUtil_Loader_PluginLoader extends Zend_Loader_PluginLoader +{ + /** + * Instantiate a new class using the arguments array for initiation + * + * @param string $className + * @param array $arguments Instanciation arguments + * @return className + */ + public function createClass($className, array $arguments = array()) + { + if (!class_exists($className)) { + $className = $this->load($className); + } + + switch (count($arguments)) { + case 0: + return new $className(); + + case 1: + return new $className( + $arguments[0] + ); + + case 2: + return new $className( + $arguments[0], $arguments[1] + ); + + case 3: + return new $className( + $arguments[0], $arguments[1], $arguments[2] + ); + + case 4: + return new $className( + $arguments[0], $arguments[1], $arguments[2], $arguments[3] + ); + + case 5: + return new $className( + $arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4] + ); + + case 6: + return new $className( + $arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4], + $arguments[5] + ); + + case 7: + return new $className( + $arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4], + $arguments[5], $arguments[6] + ); + + case 8: + return new $className( + $arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4], + $arguments[5], $arguments[6], $arguments[7] + ); + + case 9: + return new $className( + $arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4], + $arguments[5], $arguments[6], $arguments[7], $arguments[8] + ); + + case 10: + return new $className( + $arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4], + $arguments[5], $arguments[6], $arguments[7], $arguments[8], $arguments[9] + ); + + default: + throw new Zend_Exception( + 'MUtil Plugin Loader cannot create a class with ' . + count($arguments) . ' parameters.' + ); + } + } +} Modified: trunk/library/classes/MUtil/Snippets/SnippetLoader.php =================================================================== --- trunk/library/classes/MUtil/Snippets/SnippetLoader.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/MUtil/Snippets/SnippetLoader.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -48,6 +48,12 @@ class MUtil_Snippets_SnippetLoader implements MUtil_Snippets_SnippetLoaderInterface { /** + * + * @var MUtil_Loader_PluginLoader + */ + protected $loader; + + /** * The file locations where to look for snippets. * * Can be overruled in descendants @@ -67,118 +73,65 @@ * Sets the source of variables and the first directory for snippets * * @param mixed $source Something that is or can be made into MUtil_Registry_SourceInterface, otheriwse Zend_Registry is used. + * @param array $dirs prefix => pathname The inital paths to load from */ - public function __construct($source = null) + public function __construct($source = null, array $dirs = array()) { if (! $source instanceof MUtil_Registry_Source) { $source = new MUtil_Registry_Source($source); } $this->setSource($source); - $this->setDirectories(array(dirname(__FILE__) . '/Standard')); + $this->loader = new MUtil_Loader_PluginLoader($dirs); + $this->loader->addPrefixPath('', dirname(__FILE__) . '/Standard'); } /** - * Add a directory to the front of the list of places where snippets are loaded from. + * Add prefixed paths to the registry of paths * - * @param string $dir - * @return MUtil_Snippets_SnippetLoader + * @param string $prefix + * @param string $path + * @return MUtil_Snippets_SnippetLoaderInterface */ - public function addDirectory($dir) + public function addPrefixPath($prefix, $path) { - if (! in_array($dir, $this->snippetsDirectories)) { - if (file_exists($dir)) { - array_unshift($this->snippetsDirectories, $dir); - } - } + $this->loader->addPrefixPath($prefix, $path); return $this; } /** - * Add parameter values to the source for snippets. - * - * @param mixed $container_or_pairs This function can be called with either a single container or a list of name/value pairs. - * @return MUtil_Snippets_SnippetLoader - */ - public function addSource($container_or_pairs) - { - if (1 == func_num_args()) { - $container = $container_or_pairs; - } else { - $container = MUtil_Ra::pairs(func_get_args()); - } - - $source = $this->getSnippetsSource(); - $source->addRegistryContainer($container); - - return $this; - } - - /** - * Returns the directories where snippets are loaded from. - * - * @param array $dirs - * @return array - */ - public function getDirectories() - { - return $this->snippetsDirectories; - } - - /** * Searches and loads a .php snippet file. * - * @param string $filename The name of the snippet + * @param string $className The name of the snippet * @param array $extraSourceParameters name/value pairs to add to the source for this snippet * @return MUtil_Snippets_SnippetInterface The snippet */ - public function getSnippet($filename, array $extraSourceParameters = null) + public function getSnippet($className, array $extraSourceParameters = null) { - $source = $this->getSource(); + $className = $this->loader->load($className); - // Add extra parameters when specified - if ($extraSourceParameters) { - $extraSourceName = __CLASS__ . '->' . __FUNCTION__; - $source->addRegistryContainer($extraSourceParameters, $extraSourceName); - } + $snippet = new $className(); - $dirs = $this->getDirectories(); + if ($snippet instanceof MUtil_Snippets_SnippetInterface) { + // Add extra parameters when specified + if ($extraSourceParameters) { + $this->snippetsSource->addRegistryContainer($extraSourceParameters, 'tmpContainer'); + } - $classname = $filename; - if (strpos($filename, '_') === false) { - $filename = $filename . '.php'; - } else { - $filename = str_replace('_', '/', $filename) . '.php'; - } + if ($this->snippetsSource->applySource($snippet)) { + if ($extraSourceParameters) { + // Can remove now, it was applied + $this->snippetsSource->removeRegistryContainer('tmpContainer'); + } - foreach ($dirs as $dir) { - $filepath = $dir . '/' . $filename; + return $snippet; - // MUtil_Echo::r($filepath); - if (file_exists($filepath)) { - require_once($filepath); - - $snippet = new $classname(); - - if ($snippet instanceof MUtil_Snippets_SnippetInterface) { - if ($source->applySource($snippet)) { - if ($extraSourceParameters) { - // Can remove now, it was applied - $source->removeRegistryContainer($extraSourceName); - } - - return $snippet; - - } else { - throw new Zend_Exception("Not all parameters set for html snippet: '$filepath'. \n\nRequested variables were: " . implode(", ", $snippet->getRegistryRequests())); - } - } else { - throw new Zend_Exception("The snippet: '$filepath' does not implement the MUtil_Snippets_SnippetInterface interface."); - } + } else { + throw new Zend_Exception("Not all parameters set for html snippet: '$className'. \n\nRequested variables were: " . implode(", ", $snippet->getRegistryRequests())); } + } else { + throw new Zend_Exception("The snippet: '$className' does not implement the MUtil_Snippets_SnippetInterface interface."); } - - throw new Zend_Exception("Call for non existing html snippet: '$filename'. \n\nLooking in directories: " . implode(", ", $dirs)); } /** @@ -192,14 +145,15 @@ } /** - * Set the directories where snippets are loaded from. + * Remove a prefix (or prefixed-path) from the registry * - * @param array $dirs - * @return MUtil_Snippets_SnippetLoader (continuation pattern) + * @param string $prefix + * @param string $path OPTIONAL + * @return MUtil_Snippets_SnippetLoaderInterface */ - public function setDirectories(array $dirs) + public function removePrefixPath($prefix, $path = null) { - $this->snippetsDirectories = array_reverse($dirs); + $this->loader->removePrefixPath($prefix, $path); return $this; } Modified: trunk/library/classes/MUtil/Snippets/SnippetLoaderInterface.php =================================================================== --- trunk/library/classes/MUtil/Snippets/SnippetLoaderInterface.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/MUtil/Snippets/SnippetLoaderInterface.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -2,7 +2,7 @@ /** * 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 @@ -13,7 +13,7 @@ * * 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 @@ -47,41 +47,27 @@ * Sets the source of variables and the first directory for snippets * * @param mixed $source Something that is or can be made into MUtil_Registry_SourceInterface, otheriwse Zend_Registry is used. + * @param array $dirs prefix => pathname The inital paths to load from */ - public function __construct($source = null); + public function __construct($source = null, array $dirs = array()); /** - * Add a directory to the front of the list of places where snippets are loaded from. + * Add prefixed paths to the registry of paths * - * @param string $dir + * @param string $prefix + * @param string $path * @return MUtil_Snippets_SnippetLoaderInterface */ - public function addDirectory($dir); + public function addPrefixPath($prefix, $path); /** - * Add parameter values to the source for snippets. - * - * @param mixed $container_or_pairs This function can be called with either a single container or a list of name/value pairs. - * @return MUtil_Snippets_SnippetLoaderInterface - */ - public function addSource($container_or_pairs); - - /** - * Returns the directories where snippets are loaded from. - * - * @param array $dirs - * @return array - */ - public function getDirectories(); - - /** * Searches and loads a .php snippet file. * - * @param string $filename The name of the snippet + * @param string $className The name of the snippet * @param array $extraSourceParameters name/value pairs to add to the source for this snippet * @return MUtil_Snippets_SnippetInterface The snippet */ - public function getSnippet($filename, array $extraSourceParameters = null); + public function getSnippet($className, array $extraSourceParameters = null); /** * Returns a source of values for snippets. @@ -91,18 +77,19 @@ public function getSource(); /** - * Set the directories where snippets are loaded from. + * Remove a prefix (or prefixed-path) from the registry * - * @param array $dirs - * @return MUtil_Snippets_SnippetLoaderInterface (continuation pattern) + * @param string $prefix + * @param string $path OPTIONAL + * @return MUtil_Snippets_SnippetLoaderInterface */ - public function setDirectories(array $dirs); + public function removePrefixPath($prefix, $path = null); /** * Sets the source of variables for snippets * * @param MUtil_Registry_SourceInterface $source - * @return MUtil_Snippets_SnippetLoaderInterface (continuation pattern) + * @return MUtil_Snippets_SnippetLoader (continuation pattern) */ public function setSource(MUtil_Registry_SourceInterface $source); } \ No newline at end of file Modified: trunk/library/classes/ZFDebug/Controller/Plugin/Debug.php =================================================================== --- trunk/library/classes/ZFDebug/Controller/Plugin/Debug.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/classes/ZFDebug/Controller/Plugin/Debug.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -410,6 +410,11 @@ protected function _headerOutput() { $collapsed = isset($_COOKIE['ZFDebugCollapsed']) ? $_COOKIE['ZFDebugCollapsed'] : 0; + $jquery = MUtil_JQuery::jQuery(); + if ($jquery->useLocalPath()) { + $this->_options['jquery_path'] = $jquery->getLocalPath(); + } + return (' <style type="text/css" media="screen"> #ZFDebug_debug { font: 11px/1.4em Lucida Grande, Lucida Sans Unicode, sans-serif; position:fixed; bottom:5px; left:5px; color:#000; z-index: ' . $this->_options['z-index'] . ';} Modified: trunk/library/pre_bootstrap.php =================================================================== --- trunk/library/pre_bootstrap.php 2013-01-09 17:30:52 UTC (rev 1091) +++ trunk/library/pre_bootstrap.php 2013-01-10 16:43:36 UTC (rev 1092) @@ -59,25 +59,16 @@ APPLICATION_PATH . '/classes' . PATH_SEPARATOR . GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR . get_include_path() - //. PATH_SEPARATOR . GEMS_ROOT_DIR . '/library' //Shouldn't be needed, uncomment when neccessary ); -$GEMS_DIRS = array( - GEMS_PROJECT_NAME_UC => APPLICATION_PATH . '/classes', - 'Gems' => GEMS_LIBRARY_DIR . '/classes' -); - -// Set up autoload +// Set up autoload for MUtil require_once 'Zend/Loader/AutoLoader.php'; -$autoloader = Zend_Loader_Autoloader::getInstance(); +$autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('MUtil_'); -$autoloader->registerNamespace('Gems_'); -$autoloader->registerNamespace(GEMS_PROJECT_NAME_UC . '_'); // Start using cached Loader -// require_once 'MUtil/Loader/CachedLoader.php'; -// $cachedloader = MUtil_Loader_CachedLoader::getInstance(GEMS_ROOT_DIR . '\var\cache'); -// $autoloader->setDefaultAutoloader(array($cachedloader, 'loadClassByPaths')); +// $cachedloader = MUtil_Loader_CachedLoader::getInstance(GEMS_ROOT_DIR . '/var/cache'); +// $autoloader->setDefaultAutoloader(array($cachedloader, 'autoload')); // Create application, bootstrap, and run $application = new Zend_Application( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-15 18:02:35
|
Revision: 1101 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1101&view=rev Author: matijsdejong Date: 2013-01-15 18:02:16 +0000 (Tue, 15 Jan 2013) Log Message: ----------- new ComplianceAction to show an overview of track progress (first version only: layout needs work) new MUtil/Model/ModelTransformerInterface.php with three implementations Modified Paths: -------------- trunk/library/classes/Gems/Menu/MenuAbstract.php trunk/library/classes/Gems/Selector/DateSelectorAbstract.php trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php trunk/library/classes/MUtil/Model/ModelAbstract.php trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php trunk/library/classes/MUtil/Model/SelectModelPaginator.php trunk/library/classes/MUtil/Model/Transform/RequiredRowsTransformer.php trunk/library/configs/db/patches.sql Added Paths: ----------- trunk/library/classes/Gems/Default/ComplianceAction.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php trunk/library/classes/MUtil/Model/ModelTransformerInterface.php trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php trunk/library/controllers/ComplianceController.php Added: trunk/library/classes/Gems/Default/ComplianceAction.php =================================================================== --- trunk/library/classes/Gems/Default/ComplianceAction.php (rev 0) +++ trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -0,0 +1,111 @@ +<?php + +/** + * Copyright (c) 2012, 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) 2012 Erasmus MC + * @license New BSD License + * @version $id: ComplianceAction.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class Gems_Default_ComplianceAction extends Gems_Controller_ModelSnippetActionAbstract +{ + /** + * The snippets used for the autofilter action. + * + * @var mixed String or array of snippets name + */ + protected $autofilterSnippets = 'Tracker_Compliance_ComplianceTableSnippet'; + + /** + * The snippets used for the index action, before those in autofilter + * + * @var mixed String or array of snippets name + */ + protected $indexStartSnippets = array('Generic_ContentTitleSnippet', 'Tracker_Compliance_ComplianceSearchFormSnippet'); + + /** + * 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 + */ + public function createModel($detailed, $action) + { + $model = new Gems_Model_JoinModel('resptrack' , 'gems__respondent2track'); + $model->addTable('gems__respondent2org', array( + 'gr2t_id_user' => 'gr2o_id_user', + 'gr2t_id_organization' => 'gr2o_id_organization' + )); + $model->addTable('gems__tracks', array('gr2t_id_track' => 'gtr_id_track')); + + $model->resetOrder(); + $model->set('gr2o_patient_nr', 'label', $this->_('Respondent nr')); + $model->set('gr2t_start_date', 'label', $this->_('Start date'), 'dateFormat', 'dd-MM-yyyy'); + $model->set('gr2t_end_date', 'label', $this->_('End date'), 'dateFormat', 'dd-MM-yyyy'); + + return $model; + } + + /** + * Helper function to get the title for the index action. + * + * @return $string + */ + public function getIndexTitle() + { + return $this->_('Compliance'); + } + + /** + * Helper function to allow generalized statements about the items in the model. + * + * @param int $count + * @return $string + */ + public function getTopic($count = 1) + { + return $this->plural('track', 'tracks', $count); + } +} Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-14 18:21:45 UTC (rev 1100) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -322,6 +322,9 @@ { $infoPage = $this->addContainer($label); + $infoPage->addPage($this->_('Compliance'), 'pr.plan.compliance', 'compliance', 'index') + ->addAutofilterAction(); + $plans[] = $infoPage->addPage($this->_('By period'), 'pr.plan.overview', 'overview-plan', 'index'); $plans[] = $infoPage->addPage($this->_('By token'), 'pr.plan.token', 'token-plan', 'index'); $plans[] = $infoPage->addPage($this->_('By respondent'), 'pr.plan.respondent', 'respondent-plan', 'index'); Modified: trunk/library/classes/Gems/Selector/DateSelectorAbstract.php =================================================================== --- trunk/library/classes/Gems/Selector/DateSelectorAbstract.php 2013-01-14 18:21:45 UTC (rev 1100) +++ trunk/library/classes/Gems/Selector/DateSelectorAbstract.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -329,7 +329,7 @@ } else { $this->dateFactorChanges = array_fill_keys(array('D', 'W', 'M', 'Y'), 0); } - // MUtil_Echo::r($requiredRows); + // M qUtil_Echo::track($requiredRows); // MUtil_Echo::rs($start, $end, $where); $select = new Zend_Db_Select($this->db); @@ -346,12 +346,13 @@ // Display by column cannot use formatFunction as it is a simple repeater // $model->set('duration_avg', 'formatFunction', $this->util->getLocalized()->formatNumber); - $tmodel = new MUtil_Model_Transform_RequiredRowsTransformer($model); - $tmodel->setDefaultRow($this->getDefaultRow()); - $tmodel->setRequiredRows($requiredRows); - $tmodel->setKeyItemCount($keyCount); + $transformer = new MUtil_Model_Transform_RequiredRowsTransformer(); + $transformer->setDefaultRow($this->getDefaultRow()); + $transformer->setRequiredRows($requiredRows); + $transformer->setKeyItemCount($keyCount); + $model->addTransformer($transformer); - return $tmodel; + return $model; } protected function getDateDescriptions() Added: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -0,0 +1,71 @@ +<?php + +/** + * Copyright (c) 2012, 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 Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ComplianceSearchFormSnippet.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Snippets_Tracker_Compliance_ComplianceSearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet +{ + /** + * Returns a text element for autosearch. Can be overruled. + * + * The form / html elements to search on. Elements can be grouped by inserting null's between them. + * That creates a distinct group of elements + * + * @param array $data The $form field values (can be usefull, but no need to set them) + * @return array Of Zend_Form_Element's or static tekst to add to the html or null for group breaks. + */ + protected function getAutoSearchElements(array $data) + { + $elements[] = $this->_createSelectElement('gr2t_id_track', + $this->util->getTrackData()->getAllTracks(), + $this->_('(select a track)')); + + $elements[] = $this->_createSelectElement('gr2o_id_organization', + $this->util->getDbLookup()->getOrganizationsWithRespondents(), + $this->_('(all organizations)')); + + return $elements; + } + +} Added: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -0,0 +1,181 @@ +<?php + +/** + * Copyright (c) 2012, 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 Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ComplianceTableSnippet.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Snippets_Tracker_Compliance_ComplianceTableSnippet extends Gems_Snippets_ModelTableSnippetGeneric +{ + /** + * + * @var Zend_Db_Adapter_Abstract + */ + protected $db; + + /** + * + * @var Gems_Loader + */ + protected $loader; + + /** + * Creates the model + * + * @return MUtil_Model_ModelAbstract + */ + protected function createModel() + { + $model = parent::createModel(); + $trackId = $this->getTrackId(); + + if (! $trackId) { + return $model; + } + + $select = $this->db->select(); + $select->from('gems__rounds', array('gro_id_round', 'gro_id_order', 'gro_round_description')) + ->where('gro_id_track = ?', $trackId) + ->order('gro_id_order'); + + $data = $this->db->fetchAll($select); + + if (! $data) { + return $model; + } + + $status = new Zend_Db_Expr(" + CASE + WHEN gto_completion_time IS NOT NULL THEN 'A' + WHEN gto_valid_from IS NULL THEN 'U' + WHEN gto_valid_from > CURRENT_TIMESTAMP THEN 'W' + WHEN gto_valid_until < CURRENT_TIMESTAMP THEN 'M' + ELSE 'O' + END + "); + + // $labels = $model->getCol('label'); + + $select = $this->db->select(); + $select->from('gems__tokens', array('gto_id_respondent_track', 'gto_id_round', 'status' => $status)) + ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) + ->where('grc_success = 1') + ->where('gto_id_track = ?', $trackId) + ->order('gto_id_respondent_track') + ->order('gto_round_order'); + + // MUtil_Echo::track($this->db->fetchAll($select)); + + $newModel = new MUtil_Model_SelectModel($select, 'tok'); + $newModel->setKeys(array('gto_id_respondent_track')); + // $model->addLeftTable('gems__tokens', array('gr2t_id_track' => 'gto_id_track')); + // $model->addLeftTable('gems__reception_codes', array('gto_reception_code' => 'grc_id_reception_code')); + // $model->addFilter(array('grc_success' => 1)); + // $newModel = $model; + + $transformer = new MUtil_Model_Transform_CrossTabTransformer(); + $transformer->setCrosstabFields('gto_id_round', 'status'); + + foreach ($data as $row) { + $name = 'col_' . $row['gro_id_round']; + $transformer->set($name, 'label', $row['gro_id_order'], 'description', $row['gro_round_description']); + // break; + } + + $newModel->addTransformer($transformer); + // MUtil_Echo::track($data); + + $joinTrans = new MUtil_Model_Transform_JoinTransformer(); + $joinTrans->addModel($newModel, array('gr2t_id_respondent_track' => 'gto_id_respondent_track')); + + $model->resetOrder(); + $model->set('gr2o_patient_nr'); + $model->set('gr2t_start_date'); + $model->addTransformer($joinTrans); + return $model; + + return $newModel; + } + + /** + * Returns a show menu item, if access is allowed by privileges + * + * @return Gems_Menu_SubMenuItem + */ + protected function getShowMenuItem() + { + return $this->findMenuItem('track', 'show-track'); + } + + /** + * + * @return int Return the track id if any or null + */ + public function getTrackId() + { + if ($this->requestCache) { + $data = $this->requestCache->getProgramParams(); + if (isset($data['gr2t_id_track'])) { + return $data['gr2t_id_track']; + } + } else { + return $this->request->getParam('gr2t_id_track'); + } + } + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + $trackId = $this->getTrackId(); + + if ($trackId) { + parent::processFilterAndSort($model); + } else { + $model->setFilter(array('1=0')); + $this->onEmpty = $this->_('No track selected...'); + } + } +} Modified: trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-01-14 18:21:45 UTC (rev 1100) +++ trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -166,6 +166,16 @@ } if (null === $value) { $select->where($name . ' IS NULL'); + } elseif (is_array($value)) { + if ($value) { + foreach ($value as $sub) { + $subs[] = $adapter->quote($value); + } + $select->where($name . ' IN (' . implode(', ', $subs) . ')'); + } else { + // Never a result when a value should be one of an empty set. + $select->where('1=0'); + } } else { $select->where($name . ' = ?', $value); } @@ -318,6 +328,23 @@ return $this->_createSelect($filter, $sort)->query(Zend_Db::FETCH_ASSOC)->fetchAll(); } + /** + * Returns an array containing the first requested item. + * + * @param mixed $filter True to use the stored filter, array to specify a different filter + * @param mixed $sort True to use the stored sort, array to specify a different sort + * @return array An array or false + */ + protected function _loadFirst($filter = true, $sort = true) + { + $select = $this->_createSelect($filter, $sort); + $select->limit(1, 0); + + $data = $select->query(Zend_Db::FETCH_ASSOC)->fetch(); + + return $data; + } + protected function _loadTableMetaData(Zend_Db_Table_Abstract $table) { $table_name = $this->_getTableName($table); @@ -703,10 +730,10 @@ public function formatLoadDate($value, $isNew = false, $name = null, array $context = array()) { // If not empty or zend_db_expression and not already a zend date, we - // transform to a Zend_Date using the ISO_8601 format + // transform to a Zend_Date using the ISO_8601 format if (!empty($value) && !($value instanceof Zend_Date) && !($value instanceof Zend_Db_Expr)) { try { - $tmpDate = new MUtil_Date($value, Zend_Date::ISO_8601); + $tmpDate = new MUtil_Date($value, Zend_Date::ISO_8601); } catch (Exception $exc) { // On failure, we use the input value $tmpDate = $value; @@ -895,26 +922,6 @@ } /** - * Returns an array containing the first requested item. - * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort - * @return array An array or false - */ - public function loadFirst($filter = true, $sort = true) - { - $select = $this->_createSelect($filter, $sort); - $select->limit(1, 0); - - $data = $select->query(Zend_Db::FETCH_ASSOC)->fetch(); - if (is_array($data)) { - $data = $this->_filterDataAfterLoad($data, false); - } - - return $data; - } - - /** * Returns a Zend_Paginator for the items in the model * * @param mixed $filter True to use the stored filter, array to specify a different filter @@ -929,26 +936,6 @@ return new Zend_Paginator($adapter); } - /** - * Helper function for SelectModelPaginator to process - * setOnLoads. - * - * @see MUtil_Model_SelectModelPaginator - * - * @param array $data Nested array - * @return array Nested - */ - public function processAfterLoad(array $data) - { - if ($this->getMeta(parent::LOAD_TRANSFORMER)) { - foreach ($data as $key => $row) { - $data[$key] = $this->_filterDataAfterLoad($row, false); - } - } - - return $data; - } - // abstract public function save(array $newValues); /** Modified: trunk/library/classes/MUtil/Model/ModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-14 18:21:45 UTC (rev 1100) +++ trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -110,12 +110,22 @@ private $_model_used = false; /** + * + * @var array of MUtil_Model_ModelTransformerInterface + */ + private $_transformers = array(); + + /** * The increment for item ordering, default is 10 * * @var int */ public $orderIncrement = 10; + /** + * + * @param string $modelName Hopefully unique model name + */ public function __construct($modelName) { $this->_model_name = $modelName; @@ -267,6 +277,20 @@ */ abstract protected function _load($filter = true, $sort = true); + /** + * Returns a nested array containing the items requested. + * + * @param mixed $filter True to use the stored filter, array to specify a different filter + * @param mixed $sort True to use the stored sort, array to specify a different sort + * @return array Nested array or false + */ + protected function _loadFirst($filter = true, $sort = true) + { + $data = $this->_load($filter, $sort); + + return reset($data); + } + protected function addChanged($add = 1) { $this->_changedCount += $add; @@ -310,6 +334,21 @@ } /** + * Add a model transformer + * + * @param MUtil_Model_ModelTransformerInterface $transformer + * @return MUtil_Model_ModelAbstract (continuation pattern) + */ + public function addTransformer(MUtil_Model_ModelTransformerInterface $transformer) + { + foreach ($transformer->getFieldInfo($this) as $name => $info) { + $this->set($name, $info); + } + $this->_transformers[] = $transformer; + return $this; + } + + /** * Stores the fields that can be used for sorting or filtering in the * sort / filter objects attached to this model. * @@ -864,6 +903,17 @@ } /** + * Get the model transformers + * + * @return array of MUtil_Model_ModelTransformerInterface + */ + public function getTransformers() + { + $this->_transformers[] = $transformer; + return $this; + } + + /** * Splits a wildcard search text into its constituent parts. * * @param string $searchText @@ -1000,10 +1050,8 @@ { $data = $this->_load($filter, $sort); - if (is_array($data) && $this->getMeta(self::LOAD_TRANSFORMER)) { - foreach ($data as $key => $row) { - $data[$key] = $this->_filterDataAfterLoad($row, false); - } + if (is_array($data)) { + $data = $this->processAfterLoad($data); } return $data; @@ -1018,13 +1066,20 @@ */ public function loadFirst($filter = true, $sort = true) { - $data = $this->_load($filter, $sort); - // Return the first row or null. - $data = reset($data); - if (is_array($data) && $this->getMeta(self::LOAD_TRANSFORMER)) { - $data = $this->_filterDataAfterLoad($data, false); + $row = $this->_loadFirst($filter, $sort); + MUtil_Echo::track($row); + + if (! is_array($row)) { + // Return false + return false; } - return $data; + + // Transform the row + $data = $this->processAfterLoad(array($row)); + MUtil_Echo::track($data); + + // Return resulting first row + return reset($data); } /** @@ -1084,6 +1139,29 @@ /** + * Helper function that procesess the raw data after a load. + * + * @see MUtil_Model_SelectModelPaginator + * + * @param array $data Nested array containing rows + * @return array Nested + */ + public function processAfterLoad(array $data) + { + foreach ($this->_transformers as $transformer) { + $data = $transformer->transformLoad($this, $data); + } + + if ($this->getMeta(self::LOAD_TRANSFORMER)) { + foreach ($data as $key => $row) { + $data[$key] = $this->_filterDataAfterLoad($row, false); + } + } + + return $data; + } + + /** * Remove one attribute for a field name in the model. * * Example: @@ -1094,7 +1172,7 @@ * * @param string $name The fieldname * @param string $key The name of the key - * @return $this + * @return MUtil_Model_ModelAbstract (continuation pattern) */ public function remove($name, $key = null) { @@ -1167,13 +1245,13 @@ * </code> * Both set the attribute 'save' to true for 'field_x'. * - * @param string $name The fieldname + * @param string $name The fieldname * @param mixed $arrayOrKey1 A key => value array or the name of the first key, see MUtil_Args::pairs() * @param mixed $value1 The value for $arrayOrKey1 or null when $arrayOrKey1 is an array * @param string $key2 Optional second key when $arrayOrKey1 is a string * @param mixed $value2 Optional second value when $arrayOrKey1 is a string, * an unlimited number of $key values pairs can be given. - * @return $this + * @return \MUtil_Model_ModelAbstract */ public function set($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { @@ -1261,7 +1339,7 @@ * @param mixed $value1 The value for $arrayOrKey1 or null when $arrayOrKey1 is an array * @param string $key2 Optional second key when $arrayOrKey1 is a string * @param mixed $value2 Optional second value when $arrayOrKey1 is a string, an unlimited number of $key values pairs can be given. - * @return $this + * @return MUtil_Model_ModelAbstract (continuation pattern) */ public function setCol($arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { @@ -1353,7 +1431,7 @@ * @param mixed $value1 The value for $arrayOrKey1 or null when $arrayOrKey1 is an array * @param string $key2 Optional second key when $arrayOrKey1 is a string * @param mixed $value2 Optional second value when $arrayOrKey1 is a string, an unlimited number of $key values pairs can be given. - * @return $this + * @return MUtil_Model_ModelAbstract (continuation pattern) */ public function setMulti(array $names, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { @@ -1443,6 +1521,22 @@ return $this->setSaveWhen($name, array(__CLASS__, 'whenNotNull')); } + /** + * set the model transformers + * + * @param array $transformers of MUtil_Model_ModelTransformerInterface + * @return MUtil_Model_ModelAbstract (continuation pattern) + */ + public function setTransformers(array $transformers) + { + $this->_transformers = array(); + foreach ($transformers as $transformer) { + $this->addTransformer($transformer); + } + return $this; + } + + public function setSort($value) { return $this->setMeta('sort', $this->_checkSortValue($value)); Modified: trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-01-14 18:21:45 UTC (rev 1100) +++ trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -25,208 +25,140 @@ * 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 Model + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ModelTransformerInterface.php 203 2012-01-01t 12:51:32Z matijs $ */ /** - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 - * @package MUtil + * A general transformer that implements all required functions, without + * them doing anything so you can just implement what you need. + * + * @package MUtil * @subpackage Model + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.2 (in current form) */ -abstract class MUtil_Model_ModelTransformerAbstract extends MUtil_Model_ModelAbstract +abstract class MUtil_Model_ModelTransformerAbstract implements MUtil_Model_ModelTransformerInterface { - protected $sourceModel; - - public function __construct(array $args, array $paramTypes = array()) - { - $paramTypes['sourceModel'] = 'MUtil_Model_ModelAbstract'; - $paramTypes['name'] = 'is_string'; - - $args = MUtil_Ra::args($args, $paramTypes); - - if (isset($args['name'])) { - $name = $args['name']; - unset($args['name']); - } else { - if (isset($args['sourceModel'])) { - $name = $args['sourceModel']->getName(); - } else { - // MUtil_Echo::r($args); - throw new MUtil_Model_ModelException('No $name or $sourceModel parameter specified for ' . get_class($this) . ' constructor.'); - } - } - // MUtil_Echo::r($args, $name); - - parent::__construct($name); - - foreach ($args as $name => $arg) { - $function = 'set' . ucfirst($name); - if (method_exists($this, $function)) { - $this->$function($arg); - } else { - throw new MUtil_Model_ModelException("Unknown argument $name in " . get_class($this) . ' constructor.'); - } - } - } - - protected function _getKeyValue($name, $key) - { - if ($this->sourceModel) { - return $this->sourceModel->_getKeyValue($name, $key); - } - } - /** - * Returns a nested array containing the items requested. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort - * @return array Nested array or false + * @var array */ - protected function _load($filter = true, $sort = true) - { - $data = $this->sourceModel->_load($filter, $sort); + protected $_fields = array(); - return $this->transform($data, $filter, $sort); - } - - public function delete($filter = true) - { - throw new Exception('Cannot delete ' . get_class($this) . ' data.'); - } - + /** + * Gets one or more values for a certain field name. + * + * @see MUtil_Model_ModelAbstract->get() + * + * @param string $name Field name + * @param string|array|null $arrayOrKey1 Null or the name of a single attribute or an array of attribute names + * @param string $key2 Optional a second attribute name. + * @return mixed + */ public function get($name, $arrayOrKey1 = null, $key2 = null) { - if ($this->sourceModel) { - $args = func_get_args(); + $args = func_get_args(); + $args = MUtil_Ra::args($args, 1); - call_user_func_array(array($this->sourceModel, 'get'), $args); - } - return $this; - } + switch (count($args)) { + case 0: + if (isset($this->_fields[$name])) { + return $this->_fields[$name]; + } else { + return array(); + } - public function getAlias($name) - { - if ($this->sourceModel) { - return $this->sourceModel->getAlias($name); - } - } + case 1: + $key = $arrayOrKey1; + if (isset($this->_fields[$name][$arrayOrKey1])) { + return $this->_fields[$name][$arrayOrKey1]; + } else { + return null; + } - public function getItemNames() - { - if ($this->sourceModel) { - return $this->sourceModel->getItemNames(); + default: + $results = array(); + foreach ($args as $key) { + if (isset($this->_fields[$name][$arrayOrKey1])) { + $results[$key] = $this->_fields[$name][$arrayOrKey1]; + } + } + return $results; } } - public function getItemsOrdered() + /** + * If the transformer add's fields, these should be returned here. + * Called in $model->AddTransformer(), so the transformer MUST + * know which fields to add by then (optionally using the model + * for that). + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @return array Of filedname => set() values + */ + public function getFieldInfo(MUtil_Model_ModelAbstract $model) { - if ($this->sourceModel) { - return $this->sourceModel->getItemsOrdered(); - } + return $this->_fields; } /** - * Return an identifier the item specified by $forData + * Set one or more attributes for a field names in the model. * - * basically transforms the fieldnames ointo oan IDn => value array + * @see MUtil_Model_ModelAbstract->set() * - * @param mixed $forData Array value to vilter on - * @param array $href Or ArrayObject - * @return array That can by used as href + * @param string $name The fieldname + * @param mixed $arrayOrKey1 A key => value array or the name of the first key, see MUtil_Args::pairs() + * @param mixed $value1 The value for $arrayOrKey1 or null when $arrayOrKey1 is an array + * @param string $key2 Optional second key when $arrayOrKey1 is a string + * @param mixed $value2 Optional second value when $arrayOrKey1 is a string, + * an unlimited number of $key values pairs can be given. + * @return \MUtil_Model_ModelTransformerAbstract */ - public function getKeyRef($forData, $href = array()) - { - if ($this->sourceModel) { - return $this->sourceModel->getKeyRef($forData, $href); - } - } - - public function getKeys($reset = false) - { - if ($this->sourceModel) { - return $this->sourceModel->getKeys($reset); - } - } - - public function getMeta($key, $default = null) - { - if ($this->sourceModel) { - return $this->sourceModel->getMeta($key, $default); - } - } - - public function getSourceModel() - { - return $this->sourceModel; - } - - public function has($name, $subkey = null) - { - if ($this->sourceModel) { - return $this->sourceModel->has($name, $subkey); - } - return false; - } - - public function hasMeta($key) - { - if ($this->sourceModel) { - return $this->sourceModel->hasMeta($key); - } - return false; - } - - public function hasNew() - { - return false; - } - - public function resetOrder() - { - if ($this->sourceModel) { - $this->sourceModel->resetOrder(); - } - return $this; - } - - public function save(array $newValues, array $filter = null) - { - throw new Exception('Cannot save ' . get_class($this) . ' data.'); - } - public function set($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { - if ($this->sourceModel) { - $args = func_get_args(); + $args = func_get_args(); + $args = MUtil_Ra::pairs($args, 1); - call_user_func_array(array($this->sourceModel, 'set'), $args); - } - return $this; - } + foreach ($args as $key => $value) { + // If $key end with ] it is array value + if (substr($key, -1) == ']') { + if (substr($key, -2) == '[]') { + // If $key ends with [], append it to array + $key = substr($key, 0, -2); + $this->_fields[$name][$key][] = $value; + } else { + // Otherwise extract subkey + $pos = strpos($key, '['); + $subkey = substr($key, $pos + 1, -1); + $key = substr($key, 0, $pos); - public function setKeys(array $keys) - { - if ($this->sourceModel) { - $this->sourceModel->setKeys($key, $value); + $this->_fields[$name][$key][$subkey] = $value; + } + } else { + $this->_fields[$name][$key] = $value; + } } - return $this; - } - public function setMeta($key, $value) - { - if ($this->sourceModel) { - $this->sourceModel->setMeta($key, $value); - } return $this; } - public function setSourceModel(MUtil_Model_ModelAbstract $model) + /** + * The transform function performs the actual transformation of the data and is called after + * the loading of the data in the source model. + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @param array $data Nested array + * @return array Nested array containing (optionally) transformed data + */ + public function transformLoad(MUtil_Model_ModelAbstract $model, array $data) { - $this->sourceModel = $model; - return $this; + return $data; } - - abstract public function transform($data, $filter = true, $sort = true); } Added: trunk/library/classes/MUtil/Model/ModelTransformerInterface.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelTransformerInterface.php (rev 0) +++ trunk/library/classes/MUtil/Model/ModelTransformerInterface.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -0,0 +1,69 @@ +<?php + +/** + * Copyright (c) 2012, 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 Model + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ModelTransformerInterface.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * An general interface to transform the data retrieved by a model + * + * @package MUtil + * @subpackage Model + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.2 + */ +interface MUtil_Model_ModelTransformerInterface +{ + /** + * If the transformer add's fields, these should be returned here. + * Called in $model->AddTransformer(), so the transformer MUST + * know which fields to add by then (optionally using the model + * for that). + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @return array Of filedname => set() values + */ + public function getFieldInfo(MUtil_Model_ModelAbstract $model); + + /** + * The transform function performs the actual transformation of the data and is called after + * the loading of the data in the source model. + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @param array $data Nested array + * @return array Nested array containing (optionally) transformed data + */ + public function transformLoad(MUtil_Model_ModelAbstract $model, array $data); +} Modified: trunk/library/classes/MUtil/Model/SelectModelPaginator.php =================================================================== --- trunk/library/classes/MUtil/Model/SelectModelPaginator.php 2013-01-14 18:21:45 UTC (rev 1100) +++ trunk/library/classes/MUtil/Model/SelectModelPaginator.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -94,7 +94,7 @@ $items = $this->_selectAdapter->getItems($offset, $itemCountPerPage); // MUtil_Echo::track($items); - if ($items && is_array($items)) { + if (is_array($items)) { $items = $this->_model->processAfterLoad($items); } // MUtil_Echo::track($items); Added: trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php =================================================================== --- trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php (rev 0) +++ trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -0,0 +1,122 @@ +<?php + +/** + * Copyright (c) 2012, 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 Model + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: CrossTabTransformer.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package MUtil + * @subpackage Model + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.2 + */ +class MUtil_Model_Transform_CrossTabTransformer extends MUtil_Model_ModelTransformerAbstract +{ + /** + * The field to crosstab over + * + * @var string + */ + protected $idField; + + /** + * + * @var string + */ + protected $valueField; + + /** + * + * @param string $idField The field values to perform the crosstab over + * @param string $valueField The field values to crosstab + * @return MUtil_Model_Transform_CrossTabTransformer (continuation pattern) + */ + public function setCrosstabFields($idField, $valueField) + { + $this->idField = $idField; + $this->valueField = $valueField; + + return $this; + + } + + /** + * The transform function performs the actual transformation of the data and is called after + * the loading of the data in the source model. + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @param array $data Nested array + * @return array Nested array containing (optionally) transformed data + */ + public function transformLoad(MUtil_Model_ModelAbstract $model, array $data) + { + if (! $data) { + return $data; + } + + //* + $row = reset($data); + if (! ($this->idField && + $this->valueField && + isset($row[$this->idField]) && + array_key_exists($this->valueField, $row) + )) { + return $data; + } + + $keys = $model->getKeys(); + $keys = array_combine($keys, $keys); + $default = array_fill_keys(array_keys($this->_fields), null); + $except = array($this->idField => 1, $this->valueField => 1); + $results = array(); + foreach ($data as $row) { + $name = 'col_' . $row[$this->idField]; + + if (isset($this->_fields[$name])) { + $key = implode("\t", array_intersect_key($row, $keys)); + + if (! isset($results[$key])) { + $results[$key] = array_diff_key($row, $except) + $default; + } + $results[$key][$name] = $row[$this->valueField]; + } + } + + // MUtil_Echo::track($results, $data); + return $results; + } +} Added: trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php =================================================================== --- trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php (rev 0) +++ trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -0,0 +1,143 @@ +<?php + +/** + * Copyright (c) 2012, 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 Model + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: JoinTransformer.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Transform that can be used to join models to another model in non-relational + * ways. + * + * @package MUtil + * @subpackage Model + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.2 + */ +class MUtil_Model_Transform_JoinTransformer implements MUtil_Model_ModelTransformerInterface +{ + /** + * + * @var array of join functions + */ + protected $_joins = array(); + + /** + * + * @var array of MUtil_Model_ModelAbstract + */ + protected $_subModels = array(); + + public function addModel(MUtil_Model_ModelAbstract $subModel, array $joinFields) + { + $name = $subModel->getName(); + $this->_subModels[$name] = $subModel; + $this->_joins[$name] = $joinFields; + + if (count($joinFields) > 1) { + throw new MUtil_Model_ModelException(__CLASS__ . " currently accepts single field joins only."); + } + + return $this; + } + + /** + * If the transformer add's fields, these should be returned here. + * Called in $model->AddTransformer(), so the transformer MUST + * know which fields to add by then (optionally using the model + * for that). + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @return array Of filedname => set() values + */ + public function getFieldInfo(MUtil_Model_ModelAbstract $model) + { + $data = array(); + foreach ($this->_subModels as $sub) { + foreach ($sub->getItemNames() as $name) { + if (! $model->has($name)) { + $data[$name] = $sub->get($name); + } + } + } + return $data; + } + + /** + * The transform function performs the actual transformation of the data and is called after + * the loading of the data in the source model. + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @param array $data Nested array + * @return array Nested array containing (optionally) transformed data + */ + public function transformLoad(MUtil_Model_ModelAbstract $model, array $data) + { + if (! $data) { + return $data; + } + + foreach ($this->_subModels as $name => $sub) { + /* @var $sub MUtil_Model_ModelAbstract */ + + if (1 === count($this->_joins[$name])) { + $mkey = key($this->_joins[$name]); + $skey = reset($this->_joins[$name]); + + $mfor = MUtil_Ra::column($mkey, $data); + + // MUtil_Echo::track($mfor); + + $sdata = $sub->load(array($skey => $mfor)); + // MUtil_Echo::track($sdata); + + $skeys = array_flip(MUtil_Ra::column($skey, $sdata)); + $empty = array_fill_keys(array_keys(reset($sdata)), null); + + foreach ($data as &$mrow) { + $mfind = $mrow[$mkey]; + + if (isset($skeys[$mfind])) { + $mrow += $sdata[$skeys[$mfind]]; + } else { + $mrow += $empty; + } + } + } + } + // MUtil_Echo::track($data); + + return $data; + } +} Modified: trunk/library/classes/MUtil/Model/Transform/RequiredRowsTransformer.php =================================================================== --- trunk/library/classes/MUtil/Model/Transform/RequiredRowsTransformer.php 2013-01-14 18:21:45 UTC (rev 1100) +++ trunk/library/classes/MUtil/Model/Transform/RequiredRowsTransformer.php 2013-01-15 18:02:16 UTC (rev 1101) @@ -49,22 +49,33 @@ */ class MUtil_Model_Transform_RequiredRowsTransformer extends MUtil_Model_ModelTransformerAbstract { + /** + * Contains default values for all missing row values + * + * @var mixed Something that can be made into an array using MUtil_Ra::to() + */ protected $_defaultRow; + + /** + * The number of key values to compare, if empty the number of fields in the first required row + * + * @var int + */ protected $_keyItemCount; + + /** + * + * @var mixed Something that can be made into an array using MUtil_Ra::to() + */ protected $_requiredRows; - public function __construct($requiredRows, $sourceModel_args = null) - { - $args = func_get_args(); - $paramTypes = array( - 'sourceModel' => 'MUtil_Model_ModelAbstract', - 'requiredRows' => 'is_ra_array', - 'keyItemCount' => 'is_int', - ); - - parent::__construct($args, $paramTypes); - } - + /** + * + * @param array $required + * @param array $row + * @param int $count + * @return boolean True if the rows refer to the same row + */ protected function _compareRows($required, $row, $count) { if ($row) { @@ -87,10 +98,16 @@ } } - public function getDefaultRow() + /** + * Returns the required rows set or calculates the rows using the $model and the required rows info + * + * @param MUtil_Model_ModelAbstract $model Optional model for calculation + * @return array + * @throws MUtil_Model_ModelException + */ + public function getDefaultRow(MUtil_Model_ModelAbstract $model = null) { if (! $this->_defaultRow) { - $model = $this->getSourceModel(); $requireds = $this->getRequiredRows(); $required = MUtil_Ra::to(reset($requireds)); @@ -98,7 +115,7 @@ $this->setKeyItemCount(count($required)); } - if ($model && $required) { + if ($required && ($model instanceof MUtil_Model_ModelAbstract)) { $defaults = array(); foreach ($model->getItemNames() as $name) { if (! array_key_exists($name, $required)) { @@ -116,6 +133,11 @@ return $this->_defaultRow; } + /** + * The number of key values to compare + * + * @return int + */ public function getKeyItemCount() { if (! $this->_keyItemCount) { @@ -126,6 +148,11 @@ return $this->_keyItemCount; } + /** + * Array of required rows + * + * @return array + */ public function getRequiredRows() { if (! is_array($this->_requiredRows)) { @@ -135,6 +162,13 @@ return $this->_requiredRows; } + /** + * Contains default values for all missing row values + * + * @param mixed $defaultRow Something that can be made into an array using MUtil_Ra::to() + * @return \MUtil_Model_Transform_RequiredRowsTransformer + * @throws MUtil_Model_ModelException + */ public function setDefaultRow($defaultRow) { if (MUtil_Ra::is($defaultRow)) { @@ -145,12 +179,25 @@ throw new MUtil_Model_ModelException('Invalid parameter type for ' . __FUNCTION__ . ': $rows cannot be converted to an array.'); } + /** + * The number of key values to compare + * + * @param int $count + * @return \MUtil_Model_Transform_RequiredRowsTransformer + */ public function setKeyItemCount($count) { $this->_keyItemCount = $count; return $this; } + /** + * The keys for the required rows + * + * @param mixed $rows Something that can be made into an array using MUtil_Ra::to() + * @return \MUtil_Model_Transform_RequiredRowsTransformer + * @throws MUtil_Model_ModelException + */ public function setRequiredRows($rows) { if (MUtil_Ra::is($rows)) { @@ -161,9 +208,17 @@ throw new MUtil_Model_ModelException('Invalid parameter type for ' . __FUNCTION__ . ': $rows cannot be converted to an array.'); } - public function transform($data, $filter = true, $sort = true) + /** + * The transform function performs the actual transformation of the data and is called after + * the loading of the data in the source model. + * + * @param MUtil_Model_ModelAbstract $model The parent model + * @param array $data Nested array + * @return array Nested array containing (optionally) transformed data + */ + public function transformLoad(MUtil_Model_ModelAbstract $model... [truncated message content] |
From: <gem...@li...> - 2013-02-15 16:53:12
|
Revision: 1143 http://sourceforge.net/p/gemstracker/code/1143 Author: matijsdejong Date: 2013-02-15 16:53:06 +0000 (Fri, 15 Feb 2013) Log Message: ----------- Fixed bug in RoleAction.php when parents / children are missing Reorganized ContactAction.php with extra support urls from project.ini and About GemsTracker page New Sprintf.php Html class that is an array object that renders the input to sprintf before sprintf-ing it Documented Raw.php and Sequence.php Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Default/ContactAction.php trunk/library/classes/Gems/Default/RoleAction.php trunk/library/classes/Gems/Menu.php trunk/library/classes/Gems/Project/ProjectSettings.php trunk/library/classes/MUtil/Html/Creator.php trunk/library/classes/MUtil/Html/Raw.php trunk/library/classes/MUtil/Html/Sequence.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__roles.20.sql trunk/library/views/scripts/contact/bugs.phtml Added Paths: ----------- trunk/library/classes/MUtil/Html/Sprintf.php Removed Paths: ------------- trunk/library/views/scripts/contact/support.phtml Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/changelog.txt 2013-02-15 16:53:06 UTC (rev 1143) @@ -2,6 +2,9 @@ ============================================================ Defined constant GEMS_PROJECT_PATH removed from code (update at least your application.ini and use APPLICATION_PATH instead) Moved date_default_timezone_set to index.php (can generate warnings) +longDescr in project.ini enables more project specific information on the about pages +New "About GemsTracker" page, implemented as menu item +Support can now be provided through support, manuals, documentation or forum url's. The global variable $GEMS_DIRS is deprecated, redefine it the application.ini using loaderDirs.Gems = .... (see NewProject) ZFDebug is now activated in the application.ini using: zfdebug.activate = 1 @@ -14,7 +17,7 @@ Many small bugs fixed and display improvements made Implemented many speed optimizations in both database access and code speed New DEMO application environment -Simplefied writing project level unit test +Simplified writing project level unit test Important changes from 1.5.5 => 1.5.6 ============================================================ Modified: trunk/library/classes/Gems/Default/ContactAction.php =================================================================== --- trunk/library/classes/Gems/Default/ContactAction.php 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/classes/Gems/Default/ContactAction.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -1,86 +1,101 @@ <?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. - */ - /** - * - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 - * @package Gems + * 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$ */ /** - * - * @author Matijs de Jong - * @package Gems + * + * @package Gems * @subpackage Default + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 */ -class Gems_Default_ContactAction extends Gems_Controller_Action +class Gems_Default_ContactAction extends Gems_Controller_Action { - public function aboutAction() - { - $this->_forward('support'); - } + /** + * + * @var Gems_Project_ProjectSettings + */ + public $project; - public function bugsAction() - { } - - private function getOrganizationsList() + /** + * A list of all participating organizations. + * + * @return MUtil_Html_HtmlElement + */ + private function _getOrganizationsList() { - $html = Gems_Html::init(); - $sql = ' + $html = new MUtil_Html_Sequence(); + $sql = ' SELECT * FROM gems__organizations WHERE gor_active=1 AND gor_url IS NOT NULL AND gor_task IS NOT NULL ORDER BY gor_name'; + // $organizations = array(); + // $organizations = array(key($organizations) => reset($organizations)); $organizations = $this->db->fetchAll($sql); - $orgCount = count($organizations); + $orgCount = count($organizations); switch ($orgCount) { case 0: - return $html->pInfo(sprintf($this->_('%s is a web application.'), $this->project->name)); + return $html->pInfo(sprintf($this->_('%s is still under development.'), $this->project->getName())); case 1: $organization = reset($organizations); - $p = $html->pInfo(sprintf($this->_('The %s project is run by: '), $this->project->name)); + $p = $html->pInfo(sprintf($this->_('%s is run by: '), $this->project->getName())); $p->a($organization['gor_url'], $organization['gor_name']); + $p->append('.'); - return $p; + $html->pInfo()->sprintf( + $this->_('Please contact the %s if you have any questions regarding %s.'), + $organization['gor_name'], + $this->project->getName() + ); + return $html; + default: - $p = $html->pInfo(sprintf($this->_('%s is a collaboration of these organizations:'), $this->project->name)); + $p = $html->pInfo(sprintf( + $this->_('%s is a collaboration of these organizations:'), + $this->project->getName() + )); + $data = MUtil_Lazy::repeat($organizations); $ul = $p->ul($data, array('class' => 'indent')); $li = $ul->li(); @@ -89,19 +104,74 @@ $li->append($data->gor_task->call(array($this, '_'))); $li->append(')'); - return $p; + $html->pInfo()->sprintf( + $this->_('You can contact any of these organizations if you have questions regarding %s.'), + $this->project->getName() + ); + + return $html; } } + /** + * Shows an about page + */ + public function aboutAction() + { + $this->initHtml(); + + $this->html->h3()->sprintf($this->_('About %s'), $this->project->getName()); + $this->html->pInfo($this->project->getLongDescription($this->locale->getLanguage())); + $this->html->append($this->_getOrganizationsList()); + } + + /** + * Show screen telling people how to report bugs + */ + public function bugsAction() + { + // Uses just view/script/bugs.html + } + + /** + * Show screen telling people about gems + */ + public function gemsAction() + { + $this->initHtml(); + + $this->html->h3()->sprintf($this->_('About %s'), $this->_('GemsTracker')); + $this->html->pInfo($this->_( + 'GemsTracker (GEneric Medical Survey Tracker) is a software package for (complex) distribution + of questionnaires and forms during clinical research and for quality registration in healthcare.')); + $this->html->pInfo()->sprintf( + $this->_('%s is a project built using GemsTracker as a foundation.'), + $this->project->getName()); + $this->html->pInfo()->sprintf($this->_('GemsTracker is an open source project hosted on %s.')) + ->a( + 'http://sourceforge.net/projects/gemstracker/', + 'SourceForge', + array('rel' => 'external', 'target' => 'sourceforge') + ); + $this->html->pInfo()->sprintf($this->_('More information about GemsTracker is available on the %s website.')) + ->a( + 'http://gemstracker.org/', + 'GemsTracker.org', + array('rel' => 'external', 'target' => 'gemstracker') + ); + } + + /** + * Genaral contact page + */ public function indexAction() { $this->initHtml(); - Gems_Html::init(); $this->html->h3($this->_('Contact')); - $this->html->h4(sprintf($this->_('The %s project'), $this->project->name)); - $this->html->append($this->getOrganizationsList()); + $this->html->h4(sprintf($this->_('The %s project'), $this->project->getName())); + $this->html->append($this->_getOrganizationsList()); $this->html->h4($this->_('Information on this application')); $this->html->pInfo($this->_('Links concerning this web application:')); @@ -112,18 +182,50 @@ $this->html[] = $ul; } - /* - public function requestAccountAction() + /** + * Shows a support page + */ + public function supportAction() { $this->initHtml(); - $this->html->h3($this->_('Request account')); + $this->html->h3($this->_('Support')); + $this->html->pInfo()->sprintf( + $this->_('There is more than one way to get support for %s.'), + $this->project->getName() + ); + if ($url = $this->project->getDocumentationUrl()) { + $this->html->h4('Documentation'); - } */ + $this->html->pInfo()->sprintf($this->_('All available documentation is gathered at: %s')) + ->a($url, array('rel' => 'external', 'target' => 'documentation')); + } - public function supportAction() - { - $this->view->organizationsList = $this->getOrganizationsList(); + if ($url = $this->project->getManualUrl()) { + $this->html->h4('Manual'); + + $this->html->pInfo()->sprintf($this->_('The manual is available here: %s')) + ->a($url, array('rel' => 'external', 'target' => 'manual')); + } + + if ($url = $this->project->getForumUrl()) { + $this->html->h4('The forum'); + + $this->html->pInfo()->sprintf($this->_( + 'You will find questions asked by other users and ask new questions at our forum site: %s' + ))->a($url, array('rel' => 'external', 'target' => 'forum')); + } + + if ($url = $this->project->getSupportUrl()) { + $this->html->h4('Support site'); + + $this->html->pInfo()->sprintf($this->_('Check our support site at %s.')) + ->a($url, array('rel' => 'external', 'target' => 'support')); + } + + $this->html->h4($this->_('Or contact')); + $this->html->append($this->_getOrganizationsList()); } + } Modified: trunk/library/classes/Gems/Default/RoleAction.php =================================================================== --- trunk/library/classes/Gems/Default/RoleAction.php 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/classes/Gems/Default/RoleAction.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -82,8 +82,16 @@ $bridge->addText('grl_description', 'size', 40); $roles = $this->acl->getRoles(); - $possibleParents = array_combine($roles, $roles); - $currentParents = array_combine($data['grl_parents'], $data['grl_parents']); + if ($roles) { + $possibleParents = array_combine($roles, $roles); + } else { + $possibleParents = array(); + } + if (isset($data['grl_parents']) && $data['grl_parents']) { + $currentParents = array_combine($data['grl_parents'], $data['grl_parents']); + } else { + $currentParents = array(); + } // Don't allow master, nologin or itself as parents unset($possibleParents['master']); @@ -94,7 +102,8 @@ foreach ($possibleParents as $parent) { if ($this->acl->hasRole($data['grl_name']) && $this->acl->inheritsRole($parent, $data['grl_name'])) { $disabled[] = $parent; - $possibleParents[$parent] .= ' ' . MUtil_Html::create('small', $this->_('child of current role'), $this->view); + $possibleParents[$parent] .= ' ' . + MUtil_Html::create('small', $this->_('child of current role'), $this->view); unset($currentParents[$parent]); } else { foreach ($currentParents as $p2) { @@ -102,7 +111,10 @@ $disabled[] = $parent; $possibleParents[$parent] .= ' ' . MUtil_Html::create( 'small', - MUtil_Html::raw(sprintf($this->_('inherited from %s'), MUtil_Html::create('em', $p2, $this->view))), + MUtil_Html::raw(sprintf( + $this->_('inherited from %s'), + MUtil_Html::create('em', $p2, $this->view) + )), $this->view); $currentParents[$parent] = $parent; } @@ -110,7 +122,10 @@ } } $disabled[] = $data['grl_name']; - $possibleParents[$data['grl_name']] .= ' ' . MUtil_Html::create('small', $this->_('this role'), $this->view); + if (isset($possibleParents[$data['grl_name']])) { + $possibleParents[$data['grl_name']] .= ' ' . + MUtil_Html::create('small', $this->_('this role'), $this->view); + } } $bridge->addMultiCheckbox('grl_parents', 'multiOptions', $possibleParents, 'disable', $disabled, @@ -126,7 +141,8 @@ foreach ((array) $data['grl_parents'] as $parent) { if (isset($rolePrivileges[$parent])) { $inherited = $inherited + array_flip($rolePrivileges[$parent][Zend_Acl::TYPE_ALLOW]); - $inherited = $inherited + array_flip($rolePrivileges[$parent][MUtil_Acl::INHERITED][Zend_Acl::TYPE_ALLOW]); + $inherited = $inherited + + array_flip($rolePrivileges[$parent][MUtil_Acl::INHERITED][Zend_Acl::TYPE_ALLOW]); } } // Sneaks in: @@ -141,7 +157,12 @@ $checkbox->setAttrib('escape', false); //Don't use escaping, so the line breaks work if ($inheritedPrivileges) { - $checkbox = $bridge->addMultiCheckbox('inherited', 'label', $this->_('Inherited'), 'multiOptions', $inheritedPrivileges, 'required', false, 'disabled', 'disabled'); + $checkbox = $bridge->addMultiCheckbox( + 'inherited', + 'label', $this->_('Inherited'), + 'multiOptions', $inheritedPrivileges, + 'required', false, + 'disabled', 'disabled'); $checkbox->setAttrib('escape', false); //Don't use escaping, so the line breaks work $checkbox->setValue(array_keys($inheritedPrivileges)); //To check the boxes } Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/classes/Gems/Menu.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -135,14 +135,13 @@ $page = $this->addPage($label, null, 'contact'); - if (isset($project->contact, $project->contact['supportUrl'])) { - $page->addAction(sprintf($this->_('About %s'), $project->name), null, 'about'); - } - // $page->addAction($this->_('Request account'), null, 'request-account'); - if (isset($project->contact, $project->contact['bugsUrl'])) { + $page->addAction(sprintf($this->_('About %s'), $project->getName()), null, 'about'); + $page->addAction(sprintf($this->_('About %s'), $this->_('GemsTracker')), 'pr.contact.gems', 'gems'); + + if ($project->hasBugsUrl()) { $page->addAction($this->_('Reporting bugs'), 'pr.contact.bugs', 'bugs'); } - if (isset($project->contact, $project->contact['supportUrl'])) { + if ($project->hasAnySupportUrl()) { $page->addAction($this->_('Support'), 'pr.contact.support', 'support'); } Modified: trunk/library/classes/Gems/Project/ProjectSettings.php =================================================================== --- trunk/library/classes/Gems/Project/ProjectSettings.php 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/classes/Gems/Project/ProjectSettings.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -292,6 +292,18 @@ } /** + * Returns the documentation url + * + * @return string + */ + public function getDocumentationUrl() + { + if (isset($this['contact'], $this['contact']['docsUrl'])) { + return $this['contact']['docsUrl']; + } + } + + /** * The the email BCC address - if any * * @return string @@ -317,6 +329,18 @@ } /** + * Returns the forum url + * + * @return string + */ + public function getForumUrl() + { + if (isset($this['contact'], $this['contact']['forumUrl'])) { + return $this['contact']['forumUrl']; + } + } + + /** * Returns the from address * * @return string E-Mail address @@ -385,6 +409,23 @@ } /** + * Return a long description, in the correct language if available + * + * @param string $language Iso code languahe + * @return string + */ + public function getLongDescription($language) + { + if (isset($this['longDescr' . ucfirst($language)])) { + return $this['longDescr' . ucfirst($language)]; + } + + if (isset($this['longDescr'])) { + return $this['longDescr']; + } + } + + /** * Array of field name => values for sending E-Mail * * @return array @@ -400,6 +441,18 @@ } /** + * Returns the manual url + * + * @return string + */ + public function getManualUrl() + { + if (isset($this['contact'], $this['contact']['manualUrl'])) { + return $this['contact']['manualUrl']; + } + } + + /** * Returns the public name of this project. * * @return string @@ -492,6 +545,18 @@ } /** + * Returns the support url + * + * @return string + */ + public function getSupportUrl() + { + if (isset($this['contact'], $this['contact']['supportUrl'])) { + return $this['contact']['supportUrl']; + } + } + + /** * Returns a salted hash on the * * @param string $value The value to hash @@ -513,13 +578,38 @@ } /** + * True at least one support url exists. + * + * @return boolean + */ + public function hasAnySupportUrl() + { + return isset($this['contact']) && ( + isset($this['contact']['docsUrl']) || + isset($this['contact']['forumUrl']) || + isset($this['contact']['manualUrl']) || + isset($this['contact']['supportUrl']) + ); + } + + /** + * True the bugs url exists. + * + * @return boolean + */ + public function hasBugsUrl() + { + return isset($this['contact'], $this['contact']['bugsUrl']); + } + + /** * True if an initial password was specified for users. * * @return boolean */ public function hasInitialPassword() { - return isset($this['password']['initialPassword']); + return isset($this['password'], $this['password']['initialPassword']); } /** Modified: trunk/library/classes/MUtil/Html/Creator.php =================================================================== --- trunk/library/classes/MUtil/Html/Creator.php 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/classes/MUtil/Html/Creator.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -124,7 +124,7 @@ 'seq' => 'MUtil_Html_Sequence::createSequence', 'sequence' => 'MUtil_Html_Sequence::createSequence', // A sequence can contain another sequence, so other function name used 'snippet' => 'MUtil_Html::snippet', - 'sprintf' => 'sprintf', + 'sprintf' => 'MUtil_Html_Sprintf::sprintf', 'spaced' => 'MUtil_Html_Sequence::createSpaced', // A sequence can contain another sequence, so other function name used 'table' => 'MUtil_Html_TableElement::table', 'tbody' => 'MUtil_Html_TBodyElement::tbody', Modified: trunk/library/classes/MUtil/Html/Raw.php =================================================================== --- trunk/library/classes/MUtil/Html/Raw.php 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/classes/MUtil/Html/Raw.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -1,65 +1,65 @@ <?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. - */ - /** - * - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 - * @package MUtil + * 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 Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** * The Raw class is used to output html without character encoding or escaping. - * - * Use this class when you have a string containg html or escaped texts that you + * + * Use this class when you have a string containg html or escaped texts that you * want to output without further processing. - * - * @author Matijs de Jong - * @package MUtil + * + * @package MUtil * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.0 */ class MUtil_Html_Raw implements MUtil_Html_HtmlInterface { /** * Whatever should be the output - * + * * @var string */ private $_value; /** * Create the class with the specified string content. - * - * @param string $value + * + * @param string $value */ public function __construct($value) { @@ -68,7 +68,7 @@ /** * Simple helper function - * + * * @return string */ public function __toString() @@ -77,17 +77,17 @@ } /** - * Splits the content into an array where each items either contains + * Splits the content into an array where each items either contains * - a tag (starts with '<' and ends with '>' * - an entity (starts with '&' and ends with ';' * - other string content (not starting with '<' or '&' - * + * * This is a utility function that simplifies e.g. search and replace - * without messing up the markup, e.g. in the Marker class - * + * without messing up the markup, e.g. in the Marker class + * * @see MUtil_Html_Marker - * - * @return array + * + * @return array */ public function getElements() { @@ -177,7 +177,7 @@ /** * The current content - * + * * @return string */ public function getValue() @@ -187,7 +187,7 @@ /** * Static helper function for creation, used by @see MUtil_Html_Creator. - * + * * @param string $value * @return MUtil_Html_Raw */ @@ -199,7 +199,7 @@ /** * Echo the content. - * + * * The $view is not used but required by the interface definition * * @param Zend_View_Abstract $view @@ -212,9 +212,9 @@ /** * Change the content. - * + * * @param string $value - * @return MUtil_Html_Raw + * @return MUtil_Html_Raw */ public function setValue($value) { Modified: trunk/library/classes/MUtil/Html/Sequence.php =================================================================== --- trunk/library/classes/MUtil/Html/Sequence.php 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/classes/MUtil/Html/Sequence.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -1,10 +1,9 @@ <?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 @@ -15,7 +14,7 @@ * * 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 @@ -26,37 +25,38 @@ * 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. - */ - -/** - * - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 - * @package MUtil + * + * + * @package MUtil * @subpackage Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** * The Sequence class is for sequentional Html content, kind of like a DOM document fragment. - * + * * It usual use is where you should return a single ElementInterface object but want to return a - * sequence of objects. While implementing the MUtil_Html_ElementInterface it does have attributes + * sequence of objects. While implementing the MUtil_Html_ElementInterface it does have attributes * nor does it return a tagname so it is not really an element, just treated as one. - * - * This object also contains functions for processing parameters of special types. E.g. when a + * + * This object also contains functions for processing parameters of special types. E.g. when a * Zend_View object is passed it should be stored in $this->view, not added to the core array. - * - * @author Matijs de Jong - * @package MUtil + * + * @package MUtil * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.0 */ class MUtil_Html_Sequence extends MUtil_ArrayString implements MUtil_Html_ElementInterface { /** * Object classes that should not be added to the core array, but should be set using * a setXxx() function. - * + * * This parameter enables sub-classes to define their own special types. * * @var array Null or array containing className => setFunction() @@ -65,7 +65,7 @@ /** * The default special types that are always valid for children of this class. - * + * * @var array */ private $_specialTypesDefault = array( @@ -79,6 +79,15 @@ */ public $view = null; + /** + * Adds an HtmlElement to this element + * + * @see MUtil_Html_Creator + * + * @param string $name Function name becomes tagname (unless specified otherwise in MUtil_Html_Creator) + * @param array $arguments The content and attributes values + * @return MUtil_Html_HtmlElement With '$name' tagName + */ public function __call($name, array $arguments) { $elem = MUtil_Html::createArray($name, $arguments); @@ -88,6 +97,10 @@ return $elem; } + /** + * + * @param mixed $arg_array MUtil_Ra::args parameter passing + */ public function __construct($arg_array = null) { parent::__construct(); @@ -139,16 +152,29 @@ return $seq; } + /** + * Interface required function, not in real use + * + * @return null + */ public function getTagName() { return null; } + /** + * Get the current view + * + * @return Zend_View + */ public function getView() { return $this->view; } + /** + * Initiator functions - to prevent constructor overloading + */ protected function init() { if ($this->_specialTypes) { @@ -185,7 +211,7 @@ /** * Renders the element into a html string - * + * * The $view is used to correctly encode and escape the output * * @param Zend_View_Abstract $view Copied: trunk/library/classes/MUtil/Html/Sprintf.php (from rev 1141, trunk/library/classes/MUtil/Html/Raw.php) =================================================================== --- trunk/library/classes/MUtil/Html/Sprintf.php (rev 0) +++ trunk/library/classes/MUtil/Html/Sprintf.php 2013-02-15 16:53:06 UTC (rev 1143) @@ -0,0 +1,220 @@ +<?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 Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * Sprintf class is used to use sprintf with renderable content . + * + * @package MUtil + * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since MUtil version 1.2 + */ +class MUtil_Html_Sprintf extends ArrayObject implements MUtil_Html_ElementInterface +{ + /** + * Object classes that should not be added to the core array, but should be set using + * a setXxx() function. + * + * This parameter enables sub-classes to define their own special types. + * + * @var array Null or array containing className => setFunction() + */ + protected $_specialTypes; + + /** + * The default special types that are always valid for children of this class. + * + * @var array + */ + private $_specialTypesDefault = array( + 'Zend_View' => 'setView', + ); + + /** + * View object + * + * @var Zend_View_Interface + */ + public $view = null; + + /** + * Adds an HtmlElement to this element + * + * @see MUtil_Html_Creator + * + * @param string $name Function name becomes tagname (unless specified otherwise in MUtil_Html_Creator) + * @param array $arguments The content and attributes values + * @return MUtil_Html_HtmlElement With '$name' tagName + */ + public function __call($name, array $arguments) + { + $elem = MUtil_Html::createArray($name, $arguments); + + $this[] = $elem; + + return $elem; + } + + /** + * + * @param mixed $arg_array MUtil_Ra::args parameter passing + */ + public function __construct($arg_array = null) + { + parent::__construct(); + + $args = MUtil_Ra::args(func_get_args()); + + $this->init(); + + // Passing the $args to parent::__construct() + // means offsetSet() is not called. + foreach ($args as $key => $arg) { + $this->offsetSet($key, $arg); + } + } + + /** + * Interface required function, not in real use + * + * @return null + */ + public function getTagName() + { + return null; + } + + /** + * Get the current view + * + * @return Zend_View + */ + public function getView() + { + return $this->view; + } + + /** + * Initiator functions - to prevent constructor overloading + */ + protected function init() + { + if ($this->_specialTypes) { + $this->_specialTypes = $this->_specialTypes + $this->_specialTypesDefault; + } else { + $this->_specialTypes = $this->_specialTypesDefault; + } + } + + public function offsetSet($index, $newval) + { + if ($index && (! is_numeric($index))) { + if (method_exists($this, $fname = 'set' . $index)) { + $this->$fname($newval); + + return; + } + } + + /* + if (! $this->_specialTypes) { + MUtil_Echo::backtrace(); + } // */ + foreach ($this->_specialTypes as $class => $method) { + if ($newval instanceof $class) { + $this->$method($newval, $index); + + return; + } + } + + return parent::offsetSet($index, $newval); + } + + /** + * Renders the element into a html string + * + * The $view is used to correctly encode and escape the output + * + * @param Zend_View_Abstract $view + * @return string Correctly encoded and escaped html output + */ + public function render(Zend_View_Abstract $view) + { + if (null !== $view) { + $this->setView($view); + } + + $view = $this->getView(); + + $renderer = MUtil_Html::getRenderer(); + $params = array(); + foreach ($this->getIterator() as $item) { + $params[] = $renderer->renderAny($view, $item); + } + + if ($params) { + return call_user_func_array('sprintf', $params); + } + + return ''; + } + + /** + * Set the View object + * + * @param Zend_View_Interface $view + * @return Zend_View_Helper_Abstract + */ + public function setView(Zend_View_Interface $view) + { + $this->view = $view; + return $this; + } + + /** + * + * @param mixed $arg_array MUtil_Ra::args parameter passing + */ + public static function sprintf($arg_array = null) + { + $args = MUtil_Ra::args(func_get_args()); + + return new self($args); + } +} Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/configs/db/patches.sql 2013-02-15 16:53:06 UTC (rev 1143) @@ -473,3 +473,6 @@ UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.plan.summary.excel') WHERE grl_privileges LIKE '%pr.plan.%' AND grl_privileges NOT LIKE '%pr.plan.summary.excel%'; + +UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.contact.gems') + WHERE grl_privileges LIKE '%pr.plan.%' AND grl_privileges NOT LIKE '%pr.contact%'; Modified: trunk/library/configs/db/tables/gems__roles.20.sql =================================================================== --- trunk/library/configs/db/tables/gems__roles.20.sql 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/configs/db/tables/gems__roles.20.sql 2013-02-15 16:53:06 UTC (rev 1143) @@ -26,7 +26,7 @@ INSERT INTO gems__roles (grl_name, grl_description, grl_privileges, grl_parents, grl_changed, grl_changed_by, grl_created, grl_created_by) VALUES ('nologin','nologin','pr.contact.bugs,pr.contact.support,pr.nologin','', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('guest','guest','pr.ask,pr.contact.bugs,pr.contact.support,pr.islogin,pr.respondent','', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), + ('guest','guest','pr.ask,pr.contact.bugs,pr.contact.gems,pr.contact.support,pr.islogin,pr.respondent','', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), ('respondent','respondent','','guest', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), ('security','security','','guest', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), ('staff','staff','pr.option.edit,pr.option.password,pr.plan,pr.plan.overview,pr.plan.token,pr.project,pr.project.questions,pr.respondent.create,pr.respondent.edit,pr.respondent.who,pr.setup,pr.staff,pr.survey,pr.survey.create,pr.token,pr.token.answers,pr.token.delete,pr.token.edit,pr.token.mail,pr.token.print,pr.track,pr.track.create,pr.track.delete,pr.track.edit,pr.respondent.reportdeath','guest', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), Modified: trunk/library/views/scripts/contact/bugs.phtml =================================================================== --- trunk/library/views/scripts/contact/bugs.phtml 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/views/scripts/contact/bugs.phtml 2013-02-15 16:53:06 UTC (rev 1143) @@ -1,12 +1,12 @@ -<?php +<?php // ENGLISH -if ('en' == $this->locale->getLanguage()): +if ('en' == $this->locale->getLanguage()): ?> <h3>Reporting bugs</h3> <p class="info"> - <?php echo $this->project->name; ?> uses the <a href="http://www.mantisbt.org/" rel="external">Mantis Bug Tracker</a> - for reporting and solving bugs. + <?php echo $this->project->name; ?> uses the <a href="http://www.mantisbt.org/" rel="external">Mantis Bug Tracker</a> + for reporting and solving bugs. <br/> To help us to quickly solve bugs we request you read the suggestions below. </p> @@ -14,8 +14,8 @@ <div class="indent"> <h4>Report each bug by itself</h4> <p class="info"> - Every bug has to be assigned to someone to solve it. - Combining multiple problems in a single report can obstruct this process. + Every bug has to be assigned to someone to solve it. + Combining multiple problems in a single report can obstruct this process. </p> <h4>Add a link</h4> <p class="info"> @@ -40,31 +40,17 @@ <div class="centerAlign"> <a href="<?php echo $this->project->contact['bugsUrl'] ?>" class="actionlink" rel="external" target="pulse_bugs">Report a bug</a> -</div><?php - if (isset($this->project->contact['supportUrl'])): -?> -<h3>Support</h3> - -<p class="info"> - When you have questions about using <?php echo $this->project->name; ?> the place to look for answers is the - <strong>forum</strong> on - <a href="<?php echo $this->project->contact['supportUrl'] ?>" rel="external" target="pulse_support">our support site</a>. -</p> - -<div class="centerAlign"> - <a href="<?php echo $this->project->contact['supportUrl'] ?>" class="actionlink" rel="external" target="pulse_support">Go to the support site</a> -</div><?php - endif; +</div><?php endif; // NEDERLANDS -if ('nl' == $this->locale->getLanguage()): +if ('nl' == $this->locale->getLanguage()): ?> <h3>Problemen melden</h3> <p class="info"> <?php echo $this->project->name; ?> gebruikt de <a href="http://www.mantisbt.org/" rel="external">Mantis Bug Tracker</a> - voor de rapportage en verwerking van problemen. + voor de rapportage en verwerking van problemen. <br/> Voor een snelle verwerking van problemen verzoeken wij u de onderstaande suggesties te lezen. </p> @@ -72,8 +58,8 @@ <div class="indent"> <h4>Meld elk probleem apart</h4> <p class="info"> - Elk probleem moet aan iemand toegewezen worden voor behandeling. - Dit kan lastig zijn als verschillende problemen in één melding staan. + Elk probleem moet aan iemand toegewezen worden voor behandeling. + Dit kan lastig zijn als verschillende problemen in één melding staan. </p> <h4>Voeg een link toe</h4> <p class="info"> @@ -98,19 +84,5 @@ <div class="centerAlign"> <a href="<?php echo $this->project->contact['bugsUrl'] ?>" class="actionlink" rel="external" target="pulse_bugs">Meld een probleem</a> -</div><?php - if (isset($this->project->contact['supportUrl'])): -?> -<h3>Ondersteuning</h3> - -<p class="info"> - Als u vragen heeft over het gebruik van <?php echo $this->project->name; ?> dan kan u die beter stellen op het - <strong>forum</strong> van de - <a href="<?php echo $this->project->contact['supportUrl'] ?>" rel="external" target="pulse_support">onze support site</a>. -</p> - -<div class="centerAlign"> - <a href="<?php echo $this->project->contact['supportUrl'] ?>" class="actionlink" rel="external" target="pulse_support">Ga naar de support site</a> -</div><?php - endif; +</div><?php endif; ?> Deleted: trunk/library/views/scripts/contact/support.phtml =================================================================== --- trunk/library/views/scripts/contact/support.phtml 2013-02-15 16:49:21 UTC (rev 1142) +++ trunk/library/views/scripts/contact/support.phtml 2013-02-15 16:53:06 UTC (rev 1143) @@ -1,56 +0,0 @@ -<?php -if ('en' == $this->locale->getLanguage()): -?><h3><?php echo $this->project->name; ?> support</h3> - -<?php echo $this->organizationsList->render($this); ?> - -<p class="info"> - When you have questions about using <?php echo $this->project->name; ?> the place to look for answers is the - <strong>forum</strong> on - <a href="<?php echo $this->project->contact['supportUrl'] ?>" rel="external" target="pulse_support">support site</a>: -</p> - -<div class="centerAlign"> - <a href="<?php echo $this->project->contact['supportUrl'] ?>" class="actionlink" rel="external" target="pulse_support">Go to the support site</a> -</div><?php - if (isset($this->project->contact['bugsUrl'])): -?> -<h3>Reporting bugs</h3> - -<p class="info"> - If you encountered a bug while using <?php echo $this->project->name; ?> please report in on our - <a href="<?php echo $this->project->contact['bugsUrl'] ?>" rel="external" target="pulse_bugs">bug tracker site</a>. -</p> - -<div class="centerAlign"> - <a href="<?php echo $this->project->contact['bugsUrl'] ?>" class="actionlink" rel="external" target="pulse_bugs">Report a bug</a> -</div><?php - endif; -endif; ?> -<?php -if ('nl' == $this->locale->getLanguage()): -?><h3><?php echo $this->project->name; ?> ondersteuning</h3> -<?php - echo $this->organizationsList->render($this); -?> -<p class="info"> - Vragen over het gebruik van <?php echo $this->project->name; ?> kan u het beste stellen op het <strong>forum</strong> van de - <a href="<?php echo $this->project->contact['supportUrl'] ?>" rel="external" target="pulse_support">support site</a>: -</p> -<div class="centerAlign"> - <a href="<?php echo $this->project->contact['supportUrl'] ?>" class="actionlink" rel="external" target="pulse_support">Ga naar de support site</a> -</div><?php - if (isset($this->project->contact['bugsUrl'])): -?> -<h3>Problemen melden</h3> - -<p class="info"> - Als u een fout of probleem tegengekomen bent tijdens het gebruik van <?php echo $this->project->name; ?> dan kan u die beter melden op onze - <a href="<?php echo $this->project->contact['bugsUrl'] ?>" rel="external" target="pulse_bugs">bug tracker</a>. -</p> - -<div class="centerAlign"> - <a href="<?php echo $this->project->contact['bugsUrl'] ?>" class="actionlink" rel="external" target="pulse_bugs">Meld een probleem</a> -</div><?php - endif; -endif; ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-02-15 17:24:57
|
Revision: 1145 http://sourceforge.net/p/gemstracker/code/1145 Author: matijsdejong Date: 2013-02-15 17:24:54 +0000 (Fri, 15 Feb 2013) Log Message: ----------- Translations updated Modified Paths: -------------- trunk/library/classes/Gems/Default/ContactAction.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/ContactAction.php =================================================================== --- trunk/library/classes/Gems/Default/ContactAction.php 2013-02-15 16:57:18 UTC (rev 1144) +++ trunk/library/classes/Gems/Default/ContactAction.php 2013-02-15 17:24:54 UTC (rev 1145) @@ -142,8 +142,7 @@ $this->html->h3()->sprintf($this->_('About %s'), $this->_('GemsTracker')); $this->html->pInfo($this->_( - 'GemsTracker (GEneric Medical Survey Tracker) is a software package for (complex) distribution - of questionnaires and forms during clinical research and for quality registration in healthcare.')); + 'GemsTracker (GEneric Medical Survey Tracker) is a software package for (complex) distribution of questionnaires and forms during clinical research and for quality registration in healthcare.')); $this->html->pInfo()->sprintf( $this->_('%s is a project built using GemsTracker as a foundation.'), $this->project->getName()); @@ -196,21 +195,21 @@ ); if ($url = $this->project->getDocumentationUrl()) { - $this->html->h4('Documentation'); + $this->html->h4($this->_('Documentation')); $this->html->pInfo()->sprintf($this->_('All available documentation is gathered at: %s')) ->a($url, array('rel' => 'external', 'target' => 'documentation')); } if ($url = $this->project->getManualUrl()) { - $this->html->h4('Manual'); + $this->html->h4($this->_('Manual')); $this->html->pInfo()->sprintf($this->_('The manual is available here: %s')) ->a($url, array('rel' => 'external', 'target' => 'manual')); } if ($url = $this->project->getForumUrl()) { - $this->html->h4('The forum'); + $this->html->h4($this->_('The forum')); $this->html->pInfo()->sprintf($this->_( 'You will find questions asked by other users and ask new questions at our forum site: %s' @@ -218,7 +217,7 @@ } if ($url = $this->project->getSupportUrl()) { - $this->html->h4('Support site'); + $this->html->h4($this->_('Support site')); $this->html->pInfo()->sprintf($this->_('Check our support site at %s.')) ->a($url, array('rel' => 'external', 'target' => 'support')); Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2013-02-15 16:57:18 UTC (rev 1144) +++ trunk/library/languages/default-en.po 2013-02-15 17:24:54 UTC (rev 1145) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-07 18:05+0100\n" +"POT-Creation-Date: 2013-02-15 18:23+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -31,7 +31,7 @@ msgid "You are logged in as %s" msgstr "You are logged in as %s" -#: classes/GemsEscort.php:895 classes/Gems/Menu.php:265 +#: classes/GemsEscort.php:895 classes/Gems/Menu.php:264 msgid "Logoff" msgstr "Logoff" @@ -131,118 +131,124 @@ msgid "of" msgstr "of" -#: classes/Gems/Menu.php:139 +#: classes/Gems/Menu.php:138 classes/Gems/Menu.php:139 +#: classes/Gems/Default/ContactAction.php:123 +#: classes/Gems/Default/ContactAction.php:143 #, php-format msgid "About %s" msgstr "About %s" -#: classes/Gems/Menu.php:143 +#: classes/Gems/Menu.php:139 classes/Gems/Default/ContactAction.php:143 +msgid "GemsTracker" +msgstr "GemsTracker" + +#: classes/Gems/Menu.php:142 msgid "Reporting bugs" msgstr "Reporting bugs" -#: classes/Gems/Menu.php:146 +#: classes/Gems/Menu.php:145 classes/Gems/Default/ContactAction.php:191 msgid "Support" msgstr "Support" -#: classes/Gems/Menu.php:167 +#: classes/Gems/Menu.php:166 msgid "Project setup" msgstr "Project setup" -#: classes/Gems/Menu.php:169 +#: classes/Gems/Menu.php:168 msgid "Upgrade" msgstr "Upgrade" -#: classes/Gems/Menu.php:170 classes/Gems/Menu.php:171 +#: classes/Gems/Menu.php:169 classes/Gems/Menu.php:170 #: classes/Gems/Default/ProjectInformationAction.php:113 #: classes/Gems/Default/ProjectInformationAction.php:118 #, php-format msgid "Changelog %s" msgstr "Changelog %s" -#: classes/Gems/Menu.php:172 classes/Gems/Menu.php:356 +#: classes/Gems/Menu.php:171 classes/Gems/Menu.php:358 #: classes/Gems/Menu/SubMenuItem.php:551 msgid "Show" msgstr "Show" -#: classes/Gems/Menu.php:173 +#: classes/Gems/Menu.php:172 msgid "Execute all" msgstr "Execute all" -#: classes/Gems/Menu.php:174 +#: classes/Gems/Menu.php:173 msgid "Execute this" msgstr "Execute this" -#: classes/Gems/Menu.php:175 +#: classes/Gems/Menu.php:174 msgid "Execute from here" msgstr "Execute from here" -#: classes/Gems/Menu.php:176 +#: classes/Gems/Menu.php:175 msgid "Execute to here" msgstr "Execute to here" -#: classes/Gems/Menu.php:179 classes/Gems/Default/SourceAction.php:203 +#: classes/Gems/Menu.php:178 classes/Gems/Default/SourceAction.php:203 msgid "Database" msgstr "Database" -#: classes/Gems/Menu.php:183 +#: classes/Gems/Menu.php:182 msgid "Content" msgstr "Content" -#: classes/Gems/Menu.php:186 classes/Gems/Default/DatabaseAction.php:313 +#: classes/Gems/Menu.php:185 classes/Gems/Default/DatabaseAction.php:313 msgid "Execute" msgstr "Execute" -#: classes/Gems/Menu.php:191 classes/Gems/Default/DatabaseAction.php:289 +#: classes/Gems/Menu.php:190 classes/Gems/Default/DatabaseAction.php:289 msgid "Patches" msgstr "Patches" -#: classes/Gems/Menu.php:192 +#: classes/Gems/Menu.php:191 msgid "Execute new" msgstr "Execute new" -#: classes/Gems/Menu.php:194 +#: classes/Gems/Menu.php:193 msgid "Refresh translateables" msgstr "Refresh translateables" -#: classes/Gems/Menu.php:196 +#: classes/Gems/Menu.php:195 msgid "Run SQL" msgstr "Run SQL" -#: classes/Gems/Menu.php:199 +#: classes/Gems/Menu.php:198 msgid "Codes" msgstr "Codes" -#: classes/Gems/Menu.php:200 classes/Gems/Default/ReceptionAction.php:131 +#: classes/Gems/Menu.php:199 classes/Gems/Default/ReceptionAction.php:131 msgid "Reception codes" msgstr "Reception codes" -#: classes/Gems/Menu.php:201 +#: classes/Gems/Menu.php:200 msgid "Consents" msgstr "Consents" -#: classes/Gems/Menu.php:204 +#: classes/Gems/Menu.php:203 #: snippets/Organization/OrganizationEditSnippet.php:94 msgid "Access" msgstr "Access" -#: classes/Gems/Menu.php:206 classes/Gems/Default/RoleAction.php:309 +#: classes/Gems/Menu.php:205 classes/Gems/Default/RoleAction.php:330 msgid "Roles" msgstr "Roles" -#: classes/Gems/Menu.php:207 classes/Gems/Menu.php:392 +#: classes/Gems/Menu.php:206 classes/Gems/Menu.php:394 msgid "Assigned" msgstr "Assigned" -#: classes/Gems/Menu.php:208 classes/Gems/Default/RoleAction.php:238 -#: classes/Gems/Default/RoleAction.php:324 +#: classes/Gems/Menu.php:207 classes/Gems/Default/RoleAction.php:259 +#: classes/Gems/Default/RoleAction.php:345 msgid "Privileges" msgstr "Privileges" -#: classes/Gems/Menu.php:210 +#: classes/Gems/Menu.php:209 msgid "Groups" msgstr "Groups" -#: classes/Gems/Menu.php:212 +#: classes/Gems/Menu.php:211 #: classes/Gems/Default/SurveyMaintenanceAction.php:210 #: classes/Gems/Default/TrackMaintenanceAction.php:139 #: classes/Gems/Email/MailTemplateForm.php:101 @@ -250,51 +256,51 @@ msgid "Organizations" msgstr "Organizations" -#: classes/Gems/Menu.php:214 classes/Gems/Default/GroupAction.php:121 +#: classes/Gems/Menu.php:213 classes/Gems/Default/GroupAction.php:121 #: classes/Gems/Default/LogAction.php:193 #: classes/Gems/Default/StaffAction.php:470 msgid "Staff" msgstr "Staff" -#: classes/Gems/Menu.php:217 +#: classes/Gems/Menu.php:216 msgid "Mail" msgstr "Mail" -#: classes/Gems/Menu.php:221 classes/Gems/Default/LogAction.php:213 +#: classes/Gems/Menu.php:220 classes/Gems/Default/LogAction.php:213 msgid "Logging" msgstr "Logging" -#: classes/Gems/Menu.php:225 +#: classes/Gems/Menu.php:224 msgid "Maintenance" msgstr "Maintenance" -#: classes/Gems/Menu.php:252 +#: classes/Gems/Menu.php:251 #, php-format msgid "Stand-alone privilege: %s" msgstr "Stand-alone privilege: %s" -#: classes/Gems/Menu.php:259 +#: classes/Gems/Menu.php:258 msgid "Logon" msgstr "Logon" -#: classes/Gems/Menu.php:260 classes/Gems/User/Form/LoginForm.php:112 +#: classes/Gems/Menu.php:259 classes/Gems/User/Form/LoginForm.php:112 msgid "Lost password" msgstr "Lost password" -#: classes/Gems/Menu.php:261 +#: classes/Gems/Menu.php:260 msgid "Your account" msgstr "Your account" -#: classes/Gems/Menu.php:262 classes/Gems/Default/OptionAction.php:153 +#: classes/Gems/Menu.php:261 classes/Gems/Default/OptionAction.php:153 msgid "Activity overview" msgstr "Activity overview" -#: classes/Gems/Menu.php:263 classes/Gems/Default/OptionAction.php:78 +#: classes/Gems/Menu.php:262 classes/Gems/Default/OptionAction.php:78 msgid "Change password" msgstr "Change password" -#: classes/Gems/Menu.php:264 classes/Gems/Menu.php:316 -#: classes/Gems/Menu.php:362 classes/Gems/Default/MailLogAction.php:114 +#: classes/Gems/Menu.php:263 classes/Gems/Menu.php:318 +#: classes/Gems/Menu.php:364 classes/Gems/Default/MailLogAction.php:114 #: classes/Gems/Default/TrackAction.php:459 #: classes/Gems/Export/RespondentExport.php:158 #: classes/Gems/Snippets/TokenModelSnippetAbstract.php:70 @@ -311,11 +317,7 @@ msgid "Token" msgstr "Token" -#: classes/Gems/Menu.php:304 -msgid "Export archive" -msgstr "Export archive" - -#: classes/Gems/Menu.php:311 classes/Gems/Default/MailJobAction.php:99 +#: classes/Gems/Menu.php:313 classes/Gems/Default/MailJobAction.php:99 #: classes/Gems/Default/ProjectTracksAction.php:64 #: classes/Gems/Default/TrackAction.php:328 #: classes/Gems/Default/TrackActionAbstract.php:219 @@ -332,14 +334,14 @@ msgid "Track" msgstr "Track" -#: classes/Gems/Menu.php:319 classes/Gems/Menu.php:344 -#: classes/Gems/Menu.php:386 +#: classes/Gems/Menu.php:321 classes/Gems/Menu.php:346 +#: classes/Gems/Menu.php:388 #: classes/Gems/Default/TrackMaintenanceAction.php:458 #: snippets/AddTracksSnippet.php:241 msgid "Add" msgstr "Add" -#: classes/Gems/Menu.php:325 classes/Gems/Menu.php:425 +#: classes/Gems/Menu.php:327 classes/Gems/Menu.php:427 #: classes/Gems/Email/EmailFormAbstract.php:280 #: classes/Gems/Email/EmailFormAbstract.php:291 #: classes/Gems/Menu/MenuAbstract.php:406 @@ -347,26 +349,26 @@ msgid "Preview" msgstr "Preview" -#: classes/Gems/Menu.php:334 classes/Gems/Default/ExportAction.php:149 +#: classes/Gems/Menu.php:336 classes/Gems/Default/ExportAction.php:149 #: classes/Gems/Default/TrackMaintenanceAction.php:405 #: classes/Gems/Menu/MenuAbstract.php:415 #: classes/Gems/Menu/MenuAbstract.php:497 snippets/AddTracksSnippet.php:238 msgid "Tracks" msgstr "Tracks" -#: classes/Gems/Menu.php:350 +#: classes/Gems/Menu.php:352 msgid "Assignments" msgstr "Assignments" -#: classes/Gems/Menu.php:366 classes/Gems/Menu/SubMenuItem.php:417 +#: classes/Gems/Menu.php:368 classes/Gems/Menu/SubMenuItem.php:417 msgid "Edit" msgstr "Edit" -#: classes/Gems/Menu.php:372 classes/Gems/Menu/SubMenuItem.php:398 +#: classes/Gems/Menu.php:374 classes/Gems/Menu/SubMenuItem.php:398 msgid "Delete" msgstr "Delete" -#: classes/Gems/Menu.php:379 +#: classes/Gems/Menu.php:381 #: classes/Gems/Default/SurveyMaintenanceAction.php:586 #: classes/Gems/Menu/MenuAbstract.php:422 #: classes/Gems/Menu/MenuAbstract.php:484 @@ -374,55 +376,59 @@ msgid "Surveys" msgstr "Surveys" -#: classes/Gems/Menu.php:416 +#: classes/Gems/Menu.php:418 msgid "Fill in" msgstr "Fill in" -#: classes/Gems/Menu.php:419 +#: classes/Gems/Menu.php:421 msgid "Print PDF" msgstr "Print PDF" -#: classes/Gems/Menu.php:422 +#: classes/Gems/Menu.php:424 msgid "E-Mail now!" msgstr "E-Mail now!" -#: classes/Gems/Menu.php:428 +#: classes/Gems/Menu.php:430 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:481 msgid "Answers" msgstr "Answers" -#: classes/Gems/Menu.php:580 classes/Gems/Default/GroupAction.php:122 +#: classes/Gems/Menu.php:436 +msgid "Export archive" +msgstr "Export archive" + +#: classes/Gems/Menu.php:586 classes/Gems/Default/GroupAction.php:122 #: classes/Gems/Default/OrganizationAction.php:154 #: classes/Gems/Default/RespondentAction.php:462 msgid "Respondents" msgstr "Patients" -#: classes/Gems/Menu.php:588 +#: classes/Gems/Menu.php:594 msgid "Overview" msgstr "Overview" -#: classes/Gems/Menu.php:595 classes/Gems/Menu/MenuAbstract.php:379 +#: classes/Gems/Menu.php:601 classes/Gems/Menu/MenuAbstract.php:379 msgid "Project" msgstr "Project" -#: classes/Gems/Menu.php:598 +#: classes/Gems/Menu.php:604 msgid "Setup" msgstr "Setup" -#: classes/Gems/Menu.php:601 +#: classes/Gems/Menu.php:607 msgid "Track Builder" msgstr "Track Builder" -#: classes/Gems/Menu.php:604 classes/Gems/Export/RespondentExport.php:341 +#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:341 msgid "Export" msgstr "Export" -#: classes/Gems/Menu.php:610 classes/Gems/Default/ContactAction.php:101 +#: classes/Gems/Menu.php:616 classes/Gems/Default/ContactAction.php:170 #: snippets/Organization/OrganizationEditSnippet.php:82 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:624 +#: classes/Gems/Menu.php:630 msgid "Changelog" msgstr "Changelog" @@ -480,7 +486,7 @@ #: classes/Gems/Default/DatabaseAction.php:335 #: classes/Gems/Default/GroupAction.php:115 #: classes/Gems/Default/OrganizationAction.php:126 -#: classes/Gems/Default/RoleAction.php:231 +#: classes/Gems/Default/RoleAction.php:252 #: classes/Gems/Default/SourceAction.php:195 #: classes/Gems/Default/StaffAction.php:328 #: classes/Gems/Default/SurveyMaintenanceAction.php:435 @@ -847,7 +853,7 @@ #: classes/Gems/Default/ConsentAction.php:68 #: classes/Gems/Default/GroupAction.php:116 #: classes/Gems/Default/ReceptionAction.php:81 -#: classes/Gems/Default/RoleAction.php:232 +#: classes/Gems/Default/RoleAction.php:253 #: classes/Gems/Default/SurveyMaintenanceAction.php:206 #: classes/Gems/Default/SurveyMaintenanceAction.php:436 #: classes/Gems/Default/TrackActionAbstract.php:220 @@ -895,34 +901,122 @@ msgid "Respondent consents" msgstr "Patient consents" -#: classes/Gems/Default/ContactAction.php:71 +#: classes/Gems/Default/ContactAction.php:75 #, php-format -msgid "%s is a web application." -msgstr "%s is a web application." +msgid "%s is still under development." +msgstr "%s is still under development." -#: classes/Gems/Default/ContactAction.php:76 +#: classes/Gems/Default/ContactAction.php:80 #, php-format -msgid "The %s project is run by: " -msgstr "The %s project is run by: " +msgid "%s is run by: " +msgstr "%s is run by: " -#: classes/Gems/Default/ContactAction.php:82 +#: classes/Gems/Default/ContactAction.php:85 #, php-format +msgid "Please contact the %s if you have any questions regarding %s." +msgstr "Please contact the %s if you have any questions regarding %s." + +#: classes/Gems/Default/ContactAction.php:95 +#, php-format msgid "%s is a collaboration of these organizations:" msgstr "%s is a collaboration of these organizations:" -#: classes/Gems/Default/ContactAction.php:103 +#: classes/Gems/Default/ContactAction.php:108 #, php-format +msgid "" +"You can contact any of these organizations if you have questions regarding " +"%s." +msgstr "" +"You can contact any of these organizations if you have questions regarding " +"%s." + +#: classes/Gems/Default/ContactAction.php:145 +msgid "" +"GemsTracker (GEneric Medical Survey Tracker) is a software package for " +"(complex) distribution of questionnaires and forms during clinical research " +"and for quality registration in healthcare." +msgstr "" +"GemsTracker (GEneric Medical Survey Tracker) is a software package for " +"(complex) distribution of questionnaires and forms during clinical research " +"and for quality registration in healthcare." + +#: classes/Gems/Default/ContactAction.php:147 +#, php-format +msgid "%s is a project built using GemsTracker as a foundation." +msgstr "%s is a project built using GemsTracker as a foundation." + +#: classes/Gems/Default/ContactAction.php:149 +#, php-format +msgid "GemsTracker is an open source project hosted on %s." +msgstr "GemsTracker is an open source project hosted on %s." + +#: classes/Gems/Default/ContactAction.php:155 +#, php-format +msgid "More information about GemsTracker is available on the %s website." +msgstr "More information about GemsTracker is available on the %s website." + +#: classes/Gems/Default/ContactAction.php:172 +#, php-format msgid "The %s project" msgstr "The %s project" -#: classes/Gems/Default/ContactAction.php:106 +#: classes/Gems/Default/ContactAction.php:175 msgid "Information on this application" msgstr "Information on this application" -#: classes/Gems/Default/ContactAction.php:107 +#: classes/Gems/Default/ContactAction.php:176 msgid "Links concerning this web application:" msgstr "Links concerning this web application:" +#: classes/Gems/Default/ContactAction.php:193 +#, php-format +msgid "There is more than one way to get support for %s." +msgstr "There is more than one way to get support for %s." + +#: classes/Gems/Default/ContactAction.php:198 +msgid "Documentation" +msgstr "Documentation" + +#: classes/Gems/Default/ContactAction.php:200 +#, php-format +msgid "All available documentation is gathered at: %s" +msgstr "All available documentation is gathered at: %s" + +#: classes/Gems/Default/ContactAction.php:205 +msgid "Manual" +msgstr "Manual" + +#: classes/Gems/Default/ContactAction.php:207 +#, php-format +msgid "The manual is available here: %s" +msgstr "The manual is available here: %s" + +#: classes/Gems/Default/ContactAction.php:212 +msgid "The forum" +msgstr "The forum" + +#: classes/Gems/Default/ContactAction.php:215 +#, php-format +msgid "" +"You will find questions asked by other users and ask new questions at our " +"forum site: %s" +msgstr "" +"You will find questions asked by other users and ask new questions at our " +"forum site: %s" + +#: classes/Gems/Default/ContactAction.php:220 +msgid "Support site" +msgstr "Support site" + +#: classes/Gems/Default/ContactAction.php:222 +#, php-format +msgid "Check our support site at %s." +msgstr "Check our support site at %s." + +#: classes/Gems/Default/ContactAction.php:226 +msgid "Or contact" +msgstr "Or contact" + #: classes/Gems/Default/CronAction.php:133 msgid "Cron jobs turned off." msgstr "Cron jobs turned off." @@ -938,7 +1032,7 @@ msgstr "On this test system all mail will be delivered to the from address." #: classes/Gems/Default/DatabaseAction.php:75 -#: classes/Gems/Default/ProjectInformationAction.php:193 +#: classes/Gems/Default/ProjectInformationAction.php:248 #: classes/Gems/Task/CleanCache.php:58 msgid "Cache cleaned" msgstr "Cache cleaned" @@ -1084,7 +1178,7 @@ msgstr "%d new or changed patch(es)." #: classes/Gems/Default/DatabaseAction.php:303 -#: classes/Gems/Default/ProjectInformationAction.php:137 +#: classes/Gems/Default/ProjectInformationAction.php:180 msgid "Gems build" msgstr "Gems build" @@ -1268,7 +1362,7 @@ #: classes/Gems/Default/GroupAction.php:117 #: classes/Gems/Default/LogAction.php:201 -#: classes/Gems/Default/RoleAction.php:298 +#: classes/Gems/Default/RoleAction.php:319 msgid "Role" msgstr "Role" @@ -1969,103 +2063,134 @@ msgid "Empty logfile" msgstr "Empty logfile" -#: classes/Gems/Default/ProjectInformationAction.php:130 +#: classes/Gems/Default/ProjectInformationAction.php:150 +#, php-format +msgid "%s - does not exist" +msgstr "%s - does not exist" + +#: classes/Gems/Default/ProjectInformationAction.php:157 +#, php-format +msgid "%s - no disk information available" +msgstr "%s - no disk information available" + +#: classes/Gems/Default/ProjectInformationAction.php:163 +#, php-format +msgid "%s - %s free of %s = %d%% available" +msgstr "%s - %s free of %s = %d%% available" + +#: classes/Gems/Default/ProjectInformationAction.php:173 msgid "Project information" msgstr "Project information" -#: classes/Gems/Default/ProjectInformationAction.php:134 +#: classes/Gems/Default/ProjectInformationAction.php:177 msgid "Project name" msgstr "Project name" -#: classes/Gems/Default/ProjectInformationAction.php:135 +#: classes/Gems/Default/ProjectInformationAction.php:178 msgid "Project version" msgstr "Project version" -#: classes/Gems/Default/ProjectInformationAction.php:136 +#: classes/Gems/Default/ProjectInformationAction.php:179 msgid "Gems version" msgstr "Gems version" -#: classes/Gems/Default/ProjectInformationAction.php:138 +#: classes/Gems/Default/ProjectInformationAction.php:181 msgid "Gems project" msgstr "Gems project" -#: classes/Gems/Default/ProjectInformationAction.php:139 +#: classes/Gems/Default/ProjectInformationAction.php:182 msgid "Gems web directory" msgstr "Gems web directory" -#: classes/Gems/Default/ProjectInformationAction.php:140 +#: classes/Gems/Default/ProjectInformationAction.php:183 msgid "Gems root directory" msgstr "Gems root directory" -#: classes/Gems/Default/ProjectInformationAction.php:141 +#: classes/Gems/Default/ProjectInformationAction.php:184 msgid "Gems code directory" msgstr "Gems code directory" -#: classes/Gems/Default/ProjectInformationAction.php:142 +#: classes/Gems/Default/ProjectInformationAction.php:185 +msgid "Gems variable directory" +msgstr "Gems variable directory" + +#: classes/Gems/Default/ProjectInformationAction.php:186 msgid "MUtil version" msgstr "MUtil version" -#: classes/Gems/Default/ProjectInformationAction.php:143 +#: classes/Gems/Default/ProjectInformationAction.php:187 msgid "Zend version" msgstr "Zend version" -#: classes/Gems/Default/ProjectInformationAction.php:144 +#: classes/Gems/Default/ProjectInformationAction.php:188 msgid "Application environment" msgstr "Application environment" -#: classes/Gems/Default/ProjectInformationAction.php:145 +#: classes/Gems/Default/ProjectInformationAction.php:189 msgid "Application baseuri" msgstr "Application baseuri" -#: classes/Gems/Default/ProjectInformationAction.php:146 +#: classes/Gems/Default/ProjectInformationAction.php:190 msgid "Application directory" msgstr "Application directory" -#: classes/Gems/Default/ProjectInformationAction.php:147 +#: classes/Gems/Default/ProjectInformationAction.php:191 msgid "Application encoding" msgstr "Application encoding" -#: classes/Gems/Default/ProjectInformationAction.php:148 +#: classes/Gems/Default/ProjectInformationAction.php:192 msgid "PHP version" msgstr "PHP version" -#: classes/Gems/Default/ProjectInformationAction.php:149 +#: classes/Gems/Default/ProjectInformationAction.php:193 msgid "Server Hostname" msgstr "Server Hostname" -#: classes/Gems/Default/ProjectInformationAction.php:150 +#: classes/Gems/Default/ProjectInformationAction.php:194 msgid "Server OS" msgstr "Server OS" -#: classes/Gems/Default/ProjectInformationAction.php:151 +#: classes/Gems/Default/ProjectInformationAction.php:195 msgid "Time on server" msgstr "Time on server" -#: classes/Gems/Default/ProjectInformationAction.php:155 +#: classes/Gems/Default/ProjectInformationAction.php:198 +msgid "Session directory" +msgstr "Session directory" + +#: classes/Gems/Default/ProjectInformationAction.php:199 +msgid "Temporary files directory" +msgstr "Temporary files directory" + +#: classes/Gems/Default/ProjectInformationAction.php:202 +msgid "System Drive" +msgstr "System Drive" + +#: classes/Gems/Default/ProjectInformationAction.php:210 msgid "Turn Maintenance Mode OFF" msgstr "Turn Maintenance Mode OFF" -#: classes/Gems/Default/ProjectInformationAction.php:157 +#: classes/Gems/Default/ProjectInformationAction.php:212 msgid "Turn Maintenance Mode ON" msgstr "Turn Maintenance Mode ON" -#: classes/Gems/Default/ProjectInformationAction.php:167 +#: classes/Gems/Default/ProjectInformationAction.php:222 msgid "Version information" msgstr "Version information" -#: classes/Gems/Default/ProjectInformationAction.php:201 +#: classes/Gems/Default/ProjectInformationAction.php:256 msgid "Server PHP Info" msgstr "Server PHP Info" -#: classes/Gems/Default/ProjectInformationAction.php:218 +#: classes/Gems/Default/ProjectInformationAction.php:273 msgid "Project settings" msgstr "Project settings" -#: classes/Gems/Default/ProjectInformationAction.php:225 +#: classes/Gems/Default/ProjectInformationAction.php:280 msgid "Session content" msgstr "Session content" -#: classes/Gems/Default/ProjectInformationAction.php:226 +#: classes/Gems/Default/ProjectInformationAction.php:281 #: classes/Gems/Menu/MenuAbstract.php:380 msgid "Session" msgstr "Session" @@ -2345,65 +2470,65 @@ msgid "Respondent planning" msgstr "Patient planning" -#: classes/Gems/Default/RoleAction.php:97 +#: classes/Gems/Default/RoleAction.php:106 msgid "child of current role" msgstr "child of current role" -#: classes/Gems/Default/RoleAction.php:105 +#: classes/Gems/Default/RoleAction.php:115 #, php-format msgid "inherited from %s" msgstr "inherited from %s" -#: classes/Gems/Default/RoleAction.php:113 +#: classes/Gems/Default/RoleAction.php:127 msgid "this role" msgstr "this role" -#: classes/Gems/Default/RoleAction.php:144 -#: classes/Gems/Default/RoleAction.php:302 +#: classes/Gems/Default/RoleAction.php:162 +#: classes/Gems/Default/RoleAction.php:323 msgid "Inherited" msgstr "Inherited" -#: classes/Gems/Default/RoleAction.php:209 +#: classes/Gems/Default/RoleAction.php:230 msgid "Illegal name" msgstr "Illegal name" -#: classes/Gems/Default/RoleAction.php:233 -#: classes/Gems/Default/RoleAction.php:299 +#: classes/Gems/Default/RoleAction.php:254 +#: classes/Gems/Default/RoleAction.php:320 msgid "Parents" msgstr "Parents" -#: classes/Gems/Default/RoleAction.php:255 +#: classes/Gems/Default/RoleAction.php:276 msgid "Editing `master` is not allowed" msgstr "Editing `master` is not allowed" -#: classes/Gems/Default/RoleAction.php:273 +#: classes/Gems/Default/RoleAction.php:294 msgid "role" msgid_plural "roles" msgstr[0] "role" msgstr[1] "roles" -#: classes/Gems/Default/RoleAction.php:278 +#: classes/Gems/Default/RoleAction.php:299 msgid "Administrative roles" msgstr "Administrative roles" -#: classes/Gems/Default/RoleAction.php:300 -#: classes/Gems/Default/RoleAction.php:318 +#: classes/Gems/Default/RoleAction.php:321 +#: classes/Gems/Default/RoleAction.php:339 msgid "Allowed" msgstr "Allowed" -#: classes/Gems/Default/RoleAction.php:307 +#: classes/Gems/Default/RoleAction.php:328 msgid "Project role overview" msgstr "Project role overview" -#: classes/Gems/Default/RoleAction.php:317 +#: classes/Gems/Default/RoleAction.php:338 msgid "Privilege" msgstr "Privilege" -#: classes/Gems/Default/RoleAction.php:319 +#: classes/Gems/Default/RoleAction.php:340 msgid "Denied" msgstr "Denied" -#: classes/Gems/Default/RoleAction.php:323 +#: classes/Gems/Default/RoleAction.php:344 msgid "Project privileges" msgstr "Project privileges" @@ -5328,6 +5453,9 @@ msgstr[1] "" "After this survey there are another %d surveys we would like you to answer." +#~ msgid "%s is a web application." +#~ msgstr "%s is a web application." + #~ msgid "Success" #~ msgstr "Success" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2013-02-15 16:57:18 UTC (rev 1144) +++ trunk/library/languages/default-nl.po 2013-02-15 17:24:54 UTC (rev 1145) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-07 18:05+0100\n" +"POT-Creation-Date: 2013-02-15 18:22+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -31,7 +31,7 @@ msgid "You are logged in as %s" msgstr "Ingelogd als %s" -#: classes/GemsEscort.php:895 classes/Gems/Menu.php:265 +#: classes/GemsEscort.php:895 classes/Gems/Menu.php:264 msgid "Logoff" msgstr "Uitloggen" @@ -131,118 +131,124 @@ msgid "of" msgstr "van" -#: classes/Gems/Menu.php:139 +#: classes/Gems/Menu.php:138 classes/Gems/Menu.php:139 +#: classes/Gems/Default/ContactAction.php:123 +#: classes/Gems/Default/ContactAction.php:143 #, php-format msgid "About %s" msgstr "Over %s" -#: classes/Gems/Menu.php:143 +#: classes/Gems/Menu.php:139 classes/Gems/Default/ContactAction.php:143 +msgid "GemsTracker" +msgstr "GemsTracker" + +#: classes/Gems/Menu.php:142 msgid "Reporting bugs" msgstr "Meld een bug" -#: classes/Gems/Menu.php:146 +#: classes/Gems/Menu.php:145 classes/Gems/Default/ContactAction.php:191 msgid "Support" msgstr "Ondersteuning" -#: classes/Gems/Menu.php:167 +#: classes/Gems/Menu.php:166 msgid "Project setup" msgstr "Projectinfo" -#: classes/Gems/Menu.php:169 +#: classes/Gems/Menu.php:168 msgid "Upgrade" msgstr "Upgrade" -#: classes/Gems/Menu.php:170 classes/Gems/Menu.php:171 +#: classes/Gems/Menu.php:169 classes/Gems/Menu.php:170 #: classes/Gems/Default/ProjectInformationAction.php:113 #: classes/Gems/Default/ProjectInformationAction.php:118 #, php-format msgid "Changelog %s" msgstr "Wijzigingen %s" -#: classes/Gems/Menu.php:172 classes/Gems/Menu.php:356 +#: classes/Gems/Menu.php:171 classes/Gems/Menu.php:358 #: classes/Gems/Menu/SubMenuItem.php:551 msgid "Show" msgstr "Toon" -#: classes/Gems/Menu.php:173 +#: classes/Gems/Menu.php:172 msgid "Execute all" msgstr "Alles uitvoeren" -#: classes/Gems/Menu.php:174 +#: classes/Gems/Menu.php:173 msgid "Execute this" msgstr "Dit uitvoeren" -#: classes/Gems/Menu.php:175 +#: classes/Gems/Menu.php:174 msgid "Execute from here" msgstr "Uitvoeren vanaf hier" -#: classes/Gems/Menu.php:176 +#: classes/Gems/Menu.php:175 msgid "Execute to here" msgstr "Uitvoeren tot hier" -#: classes/Gems/Menu.php:179 classes/Gems/Default/SourceAction.php:203 +#: classes/Gems/Menu.php:178 classes/Gems/Default/SourceAction.php:203 msgid "Database" msgstr "Database" -#: classes/Gems/Menu.php:183 +#: classes/Gems/Menu.php:182 msgid "Content" msgstr "Inhoud" -#: classes/Gems/Menu.php:186 classes/Gems/Default/DatabaseAction.php:313 +#: classes/Gems/Menu.php:185 classes/Gems/Default/DatabaseAction.php:313 msgid "Execute" msgstr "Uitvoeren" -#: classes/Gems/Menu.php:191 classes/Gems/Default/DatabaseAction.php:289 +#: classes/Gems/Menu.php:190 classes/Gems/Default/DatabaseAction.php:289 msgid "Patches" msgstr "Patches" -#: classes/Gems/Menu.php:192 +#: classes/Gems/Menu.php:191 msgid "Execute new" msgstr "Nieuwe aanmaken" -#: classes/Gems/Menu.php:194 +#: classes/Gems/Menu.php:193 msgid "Refresh translateables" msgstr "Ververs vertaalbaren" -#: classes/Gems/Menu.php:196 +#: classes/Gems/Menu.php:195 msgid "Run SQL" msgstr "SQL uitvoeren" -#: classes/Gems/Menu.php:199 +#: classes/Gems/Menu.php:198 msgid "Codes" msgstr "Codes" -#: classes/Gems/Menu.php:200 classes/Gems/Default/ReceptionAction.php:131 +#: classes/Gems/Menu.php:199 classes/Gems/Default/ReceptionAction.php:131 msgid "Reception codes" msgstr "Ontvangst codes" -#: classes/Gems/Menu.php:201 +#: classes/Gems/Menu.php:200 msgid "Consents" msgstr "Toestemmingen" -#: classes/Gems/Menu.php:204 +#: classes/Gems/Menu.php:203 #: snippets/Organization/OrganizationEditSnippet.php:94 msgid "Access" msgstr "Toegang" -#: classes/Gems/Menu.php:206 classes/Gems/Default/RoleAction.php:309 +#: classes/Gems/Menu.php:205 classes/Gems/Default/RoleAction.php:330 msgid "Roles" msgstr "Rollen" -#: classes/Gems/Menu.php:207 classes/Gems/Menu.php:392 +#: classes/Gems/Menu.php:206 classes/Gems/Menu.php:394 msgid "Assigned" msgstr "Toegewezen" -#: classes/Gems/Menu.php:208 classes/Gems/Default/RoleAction.php:238 -#: classes/Gems/Default/RoleAction.php:324 +#: classes/Gems/Menu.php:207 classes/Gems/Default/RoleAction.php:259 +#: classes/Gems/Default/RoleAction.php:345 msgid "Privileges" msgstr "Priviléges" -#: classes/Gems/Menu.php:210 +#: classes/Gems/Menu.php:209 msgid "Groups" msgstr "Groepen" -#: classes/Gems/Menu.php:212 +#: classes/Gems/Menu.php:211 #: classes/Gems/Default/SurveyMaintenanceAction.php:210 #: classes/Gems/Default/TrackMaintenanceAction.php:139 #: classes/Gems/Email/MailTemplateForm.php:101 @@ -250,51 +256,51 @@ msgid "Organizations" msgstr "Organisaties" -#: classes/Gems/Menu.php:214 classes/Gems/Default/GroupAction.php:121 +#: classes/Gems/Menu.php:213 classes/Gems/Default/GroupAction.php:121 #: classes/Gems/Default/LogAction.php:193 #: classes/Gems/Default/StaffAction.php:470 msgid "Staff" msgstr "Medewerkers" -#: classes/Gems/Menu.php:217 +#: classes/Gems/Menu.php:216 msgid "Mail" msgstr "Email" -#: classes/Gems/Menu.php:221 classes/Gems/Default/LogAction.php:213 +#: classes/Gems/Menu.php:220 classes/Gems/Default/LogAction.php:213 msgid "Logging" msgstr "Logboek" -#: classes/Gems/Menu.php:225 +#: classes/Gems/Menu.php:224 msgid "Maintenance" msgstr "Onderhoud" -#: classes/Gems/Menu.php:252 +#: classes/Gems/Menu.php:251 #, php-format msgid "Stand-alone privilege: %s" msgstr "Zelfstandig privilege: %s" -#: classes/Gems/Menu.php:259 +#: classes/Gems/Menu.php:258 msgid "Logon" msgstr "Login" -#: classes/Gems/Menu.php:260 classes/Gems/User/Form/LoginForm.php:112 +#: classes/Gems/Menu.php:259 classes/Gems/User/Form/LoginForm.php:112 msgid "Lost password" msgstr "Wachtwoord vergeten" -#: classes/Gems/Menu.php:261 +#: classes/Gems/Menu.php:260 msgid "Your account" msgstr "Uw account" -#: classes/Gems/Menu.php:262 classes/Gems/Default/OptionAction.php:153 +#: classes/Gems/Menu.php:261 classes/Gems/Default/OptionAction.php:153 msgid "Activity overview" msgstr "Activiteiten overzicht" -#: classes/Gems/Menu.php:263 classes/Gems/Default/OptionAction.php:78 +#: classes/Gems/Menu.php:262 classes/Gems/Default/OptionAction.php:78 msgid "Change password" msgstr "Uw wachtwoord" -#: classes/Gems/Menu.php:264 classes/Gems/Menu.php:316 -#: classes/Gems/Menu.php:362 classes/Gems/Default/MailLogAction.php:114 +#: classes/Gems/Menu.php:263 classes/Gems/Menu.php:318 +#: classes/Gems/Menu.php:364 classes/Gems/Default/MailLogAction.php:114 #: classes/Gems/Default/TrackAction.php:459 #: classes/Gems/Export/RespondentExport.php:158 #: classes/Gems/Snippets/TokenModelSnippetAbstract.php:70 @@ -311,11 +317,7 @@ msgid "Token" msgstr "Kenmerk" -#: classes/Gems/Menu.php:304 -msgid "Export archive" -msgstr "Dossier export" - -#: classes/Gems/Menu.php:311 classes/Gems/Default/MailJobAction.php:99 +#: classes/Gems/Menu.php:313 classes/Gems/Default/MailJobAction.php:99 #: classes/Gems/Default/ProjectTracksAction.php:64 #: classes/Gems/Default/TrackAction.php:328 #: classes/Gems/Default/TrackActionAbstract.php:219 @@ -332,14 +334,14 @@ msgid "Track" msgstr "Traject" -#: classes/Gems/Menu.php:319 classes/Gems/Menu.php:344 -#: classes/Gems/Menu.php:386 +#: classes/Gems/Menu.php:321 classes/Gems/Menu.php:346 +#: classes/Gems/Menu.php:388 #: classes/Gems/Default/TrackMaintenanceAction.php:458 #: snippets/AddTracksSnippet.php:241 msgid "Add" msgstr "Voeg toe" -#: classes/Gems/Menu.php:325 classes/Gems/Menu.php:425 +#: classes/Gems/Menu.php:327 classes/Gems/Menu.php:427 #: classes/Gems/Email/EmailFormAbstract.php:280 #: classes/Gems/Email/EmailFormAbstract.php:291 #: classes/Gems/Menu/MenuAbstract.php:406 @@ -347,26 +349,26 @@ msgid "Preview" msgstr "Preview" -#: classes/Gems/Menu.php:334 classes/Gems/Default/ExportAction.php:149 +#: classes/Gems/Menu.php:336 classes/Gems/Default/ExportAction.php:149 #: classes/Gems/Default/TrackMaintenanceAction.php:405 #: classes/Gems/Menu/MenuAbstract.php:415 #: classes/Gems/Menu/MenuAbstract.php:497 snippets/AddTracksSnippet.php:238 msgid "Tracks" msgstr "Trajecten" -#: classes/Gems/Menu.php:350 +#: classes/Gems/Menu.php:352 msgid "Assignments" msgstr "Toewijzingen" -#: classes/Gems/Menu.php:366 classes/Gems/Menu/SubMenuItem.php:417 +#: classes/Gems/Menu.php:368 classes/Gems/Menu/SubMenuItem.php:417 msgid "Edit" msgstr "Wijzig" -#: classes/Gems/Menu.php:372 classes/Gems/Menu/SubMenuItem.php:398 +#: classes/Gems/Menu.php:374 classes/Gems/Menu/SubMenuItem.php:398 msgid "Delete" msgstr "Verwijder" -#: classes/Gems/Menu.php:379 +#: classes/Gems/Menu.php:381 #: classes/Gems/Default/SurveyMaintenanceAction.php:586 #: classes/Gems/Menu/MenuAbstract.php:422 #: classes/Gems/Menu/MenuAbstract.php:484 @@ -374,55 +376,59 @@ msgid "Surveys" msgstr "Vragenlijsten" -#: classes/Gems/Menu.php:416 +#: classes/Gems/Menu.php:418 msgid "Fill in" msgstr "Vul in" -#: classes/Gems/Menu.php:419 +#: classes/Gems/Menu.php:421 msgid "Print PDF" msgstr "Print PDF" -#: classes/Gems/Menu.php:422 +#: classes/Gems/Menu.php:424 msgid "E-Mail now!" msgstr "Email nu!" -#: classes/Gems/Menu.php:428 +#: classes/Gems/Menu.php:430 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:481 msgid "Answers" msgstr "Antwoorden" -#: classes/Gems/Menu.php:580 classes/Gems/Default/GroupAction.php:122 +#: classes/Gems/Menu.php:436 +msgid "Export archive" +msgstr "Dossier export" + +#: classes/Gems/Menu.php:586 classes/Gems/Default/GroupAction.php:122 #: classes/Gems/Default/OrganizationAction.php:154 #: classes/Gems/Default/RespondentAction.php:462 msgid "Respondents" msgstr "Patiënten" -#: classes/Gems/Menu.php:588 +#: classes/Gems/Menu.php:594 msgid "Overview" msgstr "Overzicht" -#: classes/Gems/Menu.php:595 classes/Gems/Menu/MenuAbstract.php:379 +#: classes/Gems/Menu.php:601 classes/Gems/Menu/MenuAbstract.php:379 msgid "Project" msgstr "Project" -#: classes/Gems/Menu.php:598 +#: classes/Gems/Menu.php:604 msgid "Setup" msgstr "Beheer" -#: classes/Gems/Menu.php:601 +#: classes/Gems/Menu.php:607 msgid "Track Builder" msgstr "Traject bouwer" -#: classes/Gems/Menu.php:604 classes/Gems/Export/RespondentExport.php:341 +#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:341 msgid "Export" msgstr "Exporteer" -#: classes/Gems/Menu.php:610 classes/Gems/Default/ContactAction.php:101 +#: classes/Gems/Menu.php:616 classes/Gems/Default/ContactAction.php:170 #: snippets/Organization/OrganizationEditSnippet.php:82 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:624 +#: classes/Gems/Menu.php:630 msgid "Changelog" msgstr "Changelog" @@ -480,7 +486,7 @@ #: classes/Gems/Default/DatabaseAction.php:335 #: classes/Gems/Default/GroupAction.php:115 #: classes/Gems/Default/OrganizationAction.php:126 -#: classes/Gems/Default/RoleAction.php:231 +#: classes/Gems/Default/RoleAction.php:252 #: classes/Gems/Default/SourceAction.php:195 #: classes/Gems/Default/StaffAction.php:328 #: classes/Gems/Default/SurveyMaintenanceAction.php:435 @@ -849,7 +855,7 @@ #: classes/Gems/Default/ConsentAction.php:68 #: classes/Gems/Default/GroupAction.php:116 #: classes/Gems/Default/ReceptionAction.php:81 -#: classes/Gems/Default/RoleAction.php:232 +#: classes/Gems/Default/RoleAction.php:253 #: classes/Gems/Default/SurveyMaintenanceAction.php:206 #: classes/Gems/Default/SurveyMaintenanceAction.php:436 #: classes/Gems/Default/TrackActionAbstract.php:220 @@ -897,34 +903,120 @@ msgid "Respondent consents" msgstr "Patiënt toestemming" -#: classes/Gems/Default/ContactAction.php:71 +#: classes/Gems/Default/ContactAction.php:75 #, php-format -msgid "%s is a web application." -msgstr "%s is een web applicatie." +msgid "%s is still under development." +msgstr "%s wordt nog ontwikkeld." -#: classes/Gems/Default/ContactAction.php:76 +#: classes/Gems/Default/ContactAction.php:80 #, php-format -msgid "The %s project is run by: " +msgid "%s is run by: " msgstr "%s is een project van: " -#: classes/Gems/Default/ContactAction.php:82 +#: classes/Gems/Default/ContactAction.php:85 #, php-format +msgid "Please contact the %s if you have any questions regarding %s." +msgstr "%s is de organisatie om contact mee op te nemen met vragen over %s." + +#: classes/Gems/Default/ContactAction.php:95 +#, php-format msgid "%s is a collaboration of these organizations:" msgstr "Deze organisaties werken samen voor het %s project:" -#: classes/Gems/Default/ContactAction.php:103 +#: classes/Gems/Default/ContactAction.php:108 #, php-format +msgid "" +"You can contact any of these organizations if you have questions regarding " +"%s." +msgstr "U kan elk van deze organisaties benaderen met vragen over %s." + +#: classes/Gems/Default/ContactAction.php:145 +msgid "" +"GemsTracker (GEneric Medical Survey Tracker) is a software package for " +"(complex) distribution of questionnaires and forms during clinical research " +"and for quality registration in healthcare." +msgstr "" +"GemsTracker (GEneric Medical Survey Tracker) is een software pakket voor de " +"(complexe) distributie van vragenlijsten en formulieren voor klinisch " +"onderzoek en kwaliteitsregistratie in de gezondheidszorg." + +#: classes/Gems/Default/ContactAction.php:147 +#, php-format +msgid "%s is a project built using GemsTracker as a foundation." +msgstr "%s is een project gebouwt met GemsTracker als basis fundament." + +#: classes/Gems/Default/ContactAction.php:149 +#, php-format +msgid "GemsTracker is an open source project hosted on %s." +msgstr "GemsTracker is een %s open source project." + +#: classes/Gems/Default/ContactAction.php:155 +#, php-format +msgid "More information about GemsTracker is available on the %s website." +msgstr "Meer informatie over GemsTracker vindt u op de %s site." + +#: classes/Gems/Default/ContactAction.php:172 +#, php-format msgid "The %s project" msgstr "Het %s project" -#: classes/Gems/Default/ContactAction.php:106 +#: classes/Gems/Default/ContactAction.php:175 msgid "Information on this application" -msgstr "Information over deze website" +msgstr "Informatie over deze website" -#: classes/Gems/Default/ContactAction.php:107 +#: classes/Gems/Default/ContactAction.php:176 msgid "Links concerning this web application:" msgstr "Links met informatie over deze website:" +#: classes/Gems/Default/ContactAction.php:193 +#, php-format +msgid "There is more than one way to get support for %s." +msgstr "U kan op meerdere manieren ondersteuning krijgen voor %s." + +#: classes/Gems/Default/ContactAction.php:198 +msgid "Documentation" +msgstr "Documentatie" + +#: classes/Gems/Default/ContactAction.php:200 +#, php-format +msgid "All available documentation is gathered at: %s" +msgstr "Alle beschikbare documentatie staat op: %s." + +#: classes/Gems/Default/ContactAction.php:205 +msgid "Manual" +msgstr "Handleiding" + +#: classes/Gems/Default/ContactAction.php:207 +#, php-format +msgid "The manual is available here: %s" +msgstr "De handleiding vindt u hier: %s" + +#: classes/Gems/Default/ContactAction.php:212 +msgid "The forum" +msgstr "Forum" + +#: classes/Gems/Default/ContactAction.php:215 +#, php-format +msgid "" +"You will find questions asked by other users and ask new questions at our " +"forum site: %s" +msgstr "" +"Via ons forum op %s kan u vragen en antwoorden van andere gebruikers vinden " +"en nieuwe vragen stellen." + +#: classes/Gems/Default/ContactAction.php:220 +msgid "Support site" +msgstr "Ondersteuning" + +#: classes/Gems/Default/ContactAction.php:222 +#, php-format +msgid "Check our support site at %s." +msgstr "Kijk op onze ondersteunings site op %s." + +#: classes/Gems/Default/ContactAction.php:226 +msgid "Or contact" +msgstr "Of neem contact op met" + #: classes/Gems/Default/CronAction.php:133 msgid "Cron jobs turned off." msgstr "Cron opdrachten uitgezet." @@ -941,7 +1033,7 @@ "Op dit test systeem worden alle emails gestuurd naar het \"van\" adres." #: classes/Gems/Default/DatabaseAction.php:75 -#: classes/Gems/Default/ProjectInformationAction.php:193 +#: classes/Gems/Default/ProjectInformationAction.php:248 #: classes/Gems/Task/CleanCache.php:58 msgid "Cache cleaned" msgstr "Cache opgeschoond" @@ -1087,7 +1179,7 @@ msgstr "%d nieuwe of veranderde patch(es)." #: classes/Gems/Default/DatabaseAction.php:303 -#: classes/Gems/Default/ProjectInformationAction.php:137 +#: classes/Gems/Default/ProjectInformationAction.php:180 msgid "Gems build" msgstr "Gems bouwnummer" @@ -1273,7 +1365,7 @@ #: classes/Gems/Default/GroupAction.php:117 #: classes/Gems/Default/LogAction.php:201 -#: classes/Gems/Default/RoleAction.php:298 +#: classes/Gems/Default/RoleAction.php:319 msgid "Role" msgstr "Rol" @@ -1980,103 +2072,134 @@ msgid "Empty logfile" msgstr "Verwijder alle foutmeldingen" -#: classes/Gems/Default/ProjectInformationAction.php:130 +#: classes/Gems/Default/ProjectInformationAction.php:150 +#, php-format +msgid "%s - does not exist" +msgstr "%s - bestaat niet" + +#: classes/Gems/Default/ProjectInformationAction.php:157 +#, php-format +msgid "%s - no disk information available" +msgstr "%s - informatie over schijf niet beschikbaar" + +#: classes/Gems/Default/ProjectInformationAction.php:163 +#, php-format +msgid "%s - %s free of %s = %d%% available" +msgstr "%s - %s vrij van %s = %d%% beschikbaar" + +#: classes/Gems/Default/ProjectInformationAction.php:173 msgid "Project information" msgstr "Project informatie" -#: classes/Gems/Default/ProjectInformationAction.php:134 +#: classes/Gems/Default/ProjectInformationAction.php:177 msgid "Project name" msgstr "Project naam" -#: classes/Gems/Default/ProjectInformationAction.php:135 +#: classes/Gems/Default/ProjectInformationAction.php:178 msgid "Project version" msgstr "Project versie" -#: classes/Gems/Default/ProjectInformationAction.php:136 +#: classes/Gems/Default/ProjectInformationAction.php:179 msgid "Gems version" msgstr "Gems versie" -#: classes/Gems/Default/ProjectInformationAction.php:138 +#: classes/Gems/Default/ProjectInformationAction.php:181 msgid "Gems project" msgstr "Gems project" -#: classes/Gems/Default/ProjectInformationAction.php:139 +#: classes/Gems/Default/ProjectInformationAction.php:182 msgid "Gems web directory" msgstr "Gems web folder" -#: classes/Gems/Default/ProjectInformationAction.php:140 +#: classes/Gems/Default/ProjectInformationAction.php:183 msgid "Gems root directory" msgstr "Gems start folder" -#: classes/Gems/Default/ProjectInformationAction.php:141 +#: classes/Gems/Default/ProjectInformationAction.php:184 msgid "Gems code directory" msgstr "Gems code folder" -#: classes/Gems/Default/ProjectInformationAction.php:142 +#: classes/Gems/Default/ProjectInformationAction.php:185 +msgid "Gems variable directory" +msgstr "Gems variabelen folder" + +#: classes/Gems/Default/ProjectInformationAction.php:186 msgid "MUtil version" msgstr "MUtil versie" -#: classes/Gems/Default/ProjectInformationAction.php:143 +#: classes/Gems/Default/ProjectInformationAction.php:187 msgid "Zend version" msgstr "Zend versie" -#: classes/Gems/Default/ProjectInformationAction.php:144 +#: classes/Gems/Default/ProjectInformationAction.php:188 msgid "Application environment" msgstr "Applicatie omgeving" -#: classes/Gems/Default/ProjectInformationAction.php:145 +#: classes/Gems/Default/ProjectInformationAction.php:189 msgid "Application baseuri" msgstr "Applicatie baseuri" -#: classes/Gems/Default/ProjectInformationAction.php:146 +#: classes/Gems/Default/ProjectInformationAction.php:190 msgid "Application directory" msgstr "Applicatie folder" -#: classes/Gems/Default/ProjectInformationAction.php:147 +#: classes/Gems/Default/ProjectInformationAction.php:191 msgid "Application encoding" msgstr "Applicatie tekenset" -#: classes/Gems/Default/ProjectInformationAction.php:148 +#: classes/Gems/Default/ProjectInformationAction.php:192 msgid "PHP version" msgstr "PHP versie" -#: classes/Gems/Default/ProjectInformationAction.php:149 +#: classes/Gems/Default/ProjectInformationAction.php:193 msgid "Server Hostname" msgstr "Webserver naam" -#: classes/Gems/Default/ProjectInformationAction.php:150 +#: classes/Gems/Default/ProjectInformationAction.php:194 msgid "Server OS" msgstr "Server besturingssysteem" -#: classes/Gems/Default/ProjectInformationAction.php:151 +#: classes/Gems/Default/ProjectInformationAction.php:195 msgid "Time on server" msgstr "De tijd op de server" -#: classes/Gems/Default/ProjectInformationAction.php:155 +#: classes/Gems/Default/ProjectInformationAction.php:198 +msgid "Session directory" +msgstr "Sessie opslag folder" + +#: classes/Gems/Default/ProjectInformationAction.php:199 +msgid "Temporary files directory" +msgstr "Tijdelijke bestanden folder" + +#: classes/Gems/Default/ProjectInformationAction.php:202 +msgid "System Drive" +msgstr "Systeem Schijf" + +#: classes/Gems/Default/ProjectInformationAction.php:210 msgid "Turn Maintenance Mode OFF" msgstr "Onderhoudsmodus UITzetten" -#: classes/Gems/Default/ProjectInformationAction.php:157 +#: classes/Gems/Default/ProjectInformationAction.php:212 msgid "Turn Maintenance Mode ON" msgstr "Onderhoudsmodus AANzetten" -#: classes/Gems/Default/ProjectInformationAction.php:167 +#: classes/Gems/Default/ProjectInformationAction.php:222 msgid "Version information" msgstr "Versie informatie" -#: classes/Gems/Default/ProjectInformationAction.php:201 +#: classes/Gems/Default/ProjectInformationAction.php:256 msgid "Server PHP Info" msgstr "Server PHP Info" -#: classes/Gems/Default/ProjectInformationAction.php:218 +#: classes/Gems/Default/ProjectInformationAction.php:273 msgid "Project settings" msgstr "Project instellingen" -#: classes/Gems/Default/ProjectInformationAction.php:225 +#: classes/Gems/Default/ProjectInformationAction.php:280 msgid "Session content" msgstr "Sessie inhoud" -#: classes/Gems/Default/ProjectInformationAction.php:226 +#: classes/Gems/Default/ProjectInformationAction.php:281 #: classes/Gems/Menu/MenuAbstract.php:380 msgid "Session" msgstr "Sessie" @@ -2356,65 +2479,65 @@ msgid "Respondent planning" msgstr "Per patiënt plannen" -#: classes/Gems/Default/RoleAction.php:97 +#: classes/Gems/Default/RoleAction.php:106 msgid "child of current role" msgstr "afgeleid van huidige rol" -#: classes/Gems/Default/RoleAction.php:105 +#: classes/Gems/Default/RoleAction.php:115 #, php-format msgid "inherited from %s" msgstr "overerfd van %s" -#: classes/Gems/Default/RoleAction.php:113 +#: classes/Gems/Default/RoleAction.php:127 msgid "this role" msgstr "deze rol" -#: classes/Gems/Default/RoleAction.php:144 -#: classes/Gems/Default/RoleAction.php:302 +#: classes/Gems/Default/RoleAction.php:162 +#: classes/Gems/Default/RoleAction.php:323 msgid "Inherited" msgstr "Overerfd" -#: classes/Gems/Default/RoleAction.php:209 +#: classes/Gems/Default/RoleAction.php:230 msgid "Illegal name" msgstr "Naam niet toegestaan" -#: classes/Gems/Default/RoleAction.php:233 -#: classes/Gems/Default/RoleAction.php:299 +#: classes/Gems/Default/RoleAction.php:254 +#: classes/Gems/Default/RoleAction.php:320 msgid "Parents" msgstr "Afgeleid van" -#: classes/Gems/Default/RoleAction.php:255 +#: classes/Gems/Default/RoleAction.php:276 msgid "Editing `master` is not allowed" msgstr "Het wijzigen van `master` is niet toegestaan" -#: classes/Gems/Default/RoleAction.php:273 +#: classes/Gems/Default/RoleAction.php:294 msgid "role" msgid_plural "roles" msgstr[0] "Rol" msgstr[1] "Rollen" -#: classes/Gems/Default/RoleAction.php:278 +#: classes/Gems/Default/RoleAction.php:299 msgid "Administrative roles" msgstr "Beheer rollen en rechten" -#: classes/Gems/Default/RoleAction.php:300 -#: classes/Gems/Default/RoleAction.php:318 +#: classes/Gems/Default/RoleAction.php:321 +#: classes/Gems/Default/RoleAction.php:339 msgid "Allowed" msgstr "Toegestaan" -#: classes/Gems/Default/RoleAction.php:307 +#: classes/Gems/Default/RoleAction.php:328 msgid "Project role overview" msgstr "Project rollen" -#: classes/Gems/Default/RoleAction.php:317 +#: classes/Gems/Default/RoleAction.php:338 msgid "Privilege" msgstr "Privilége" -#: classes/Gems/Default/RoleAction.php:319 +#: classes/Gems/Default/RoleAction.php:340 msgid "Denied" msgstr "Geweigerd" -#: classes/Gems/Default/RoleAction.php:323 +#: classes/Gems/Default/RoleAction.php:344 msgid "Project privileges" msgstr "Project priviléges" @@ -5384,6 +5507,9 @@ msgstr[0] "Na deze vragenlijst hebben we nog één andere vragenlijst voor u." msgstr[1] "Na deze vragenlijst hebben we nog %d andere vragenlijsten voor u." +#~ msgid "%s is a web application." +#~ msgstr "%s is een web applicatie." + #~ msgid "Success" #~ msgstr "Succes" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-02-28 17:40:34
|
Revision: 1167 http://sourceforge.net/p/gemstracker/code/1167 Author: matijsdejong Date: 2013-02-28 17:40:31 +0000 (Thu, 28 Feb 2013) Log Message: ----------- FormBridge.php supports FakeSubmit elements ModelSnippetActionAbstract can now apply multicolumn display through getBrowseColumns() Moving RespondentModel.php settings to object itself ModelTabFormSnippetGeneric.php now knows how to generate tabbed forms from the Model/RespondentModel.php Small generalization of TabForm.php DbLookup->getOrganizationsWithRespondents() shows all organizations that could have a respondent Translated->formatDateTime returns null when the date input is not a real date Started on RespondentNewAction.php Modified Paths: -------------- trunk/library/classes/Gems/Communication/RespondentModelWriter.php trunk/library/classes/Gems/Model/RespondentModel.php trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php trunk/library/classes/Gems/TabForm.php trunk/library/classes/Gems/Util/DbLookup.php trunk/library/classes/Gems/Util/Translated.php trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php trunk/library/classes/MUtil/Model/FormBridge.php trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php trunk/library/snippets/Organization/ChooseOrganizationSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Default/RespondentNewAction.php Modified: trunk/library/classes/Gems/Communication/RespondentModelWriter.php =================================================================== --- trunk/library/classes/Gems/Communication/RespondentModelWriter.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/Gems/Communication/RespondentModelWriter.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -3,7 +3,7 @@ /** * 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 @@ -14,7 +14,7 @@ * * 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 @@ -32,7 +32,7 @@ /** * Writer implementation to save respondents to the database - * + * * @author Michiel Rook <mi...@to...> * @version $Id$ * @package Gems @@ -44,22 +44,22 @@ * @var Gems_Model_RespondentModel */ private $_model = null; - + public function __construct() { - $this->_model = GemsEscort::getInstance()->getLoader()->getModels()->getRespondentModel(true); + $this->_model = GemsEscort::getInstance()->getLoader()->getModels()->createRespondentModel(); } - + /** * - Fetches respondent based on bsn / reception code and patient nr * - Creates the respondent if it does not exist, updates otherwise - * + * * @see Gems_Model_RespondentModel * @see Gems_Communication_RespondentWriter::writeRespondent() * * @param Gems_Communication_RespondentContainer $respondent * @param int $userId - * @return boolean True if a new respondent was added, false if one was updated + * @return boolean True if a new respondent was added, false if one was updated */ public function writeRespondent(Gems_Communication_RespondentContainer $respondent, &$userId) { @@ -70,17 +70,17 @@ 'gr2o_patient_nr' => $respondent->getPatientId() ) ); - + $data = $this->_model->loadFirst(); $isNew = false; - + if (empty($data)) { $isNew = true; $data = $this->_model->loadNew(); } - + unset($data['grs_email']); - + $data['gr2o_patient_nr'] = $respondent->getPatientId(); $data['grs_first_name'] = $respondent->getFirstName(); $data['grs_last_name'] = $respondent->getLastName(); @@ -88,11 +88,11 @@ $data['grs_ssn'] = $respondent->getBsn(); $data['grs_gender'] = $respondent->getGender(); $data['grs_birthday'] = $respondent->getBirthday(); - + $data = $this->_model->save($data); - + $userId = $data['grs_id_user']; - + return $isNew; } } \ No newline at end of file Added: trunk/library/classes/Gems/Default/RespondentNewAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentNewAction.php (rev 0) +++ trunk/library/classes/Gems/Default/RespondentNewAction.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -0,0 +1,159 @@ +<?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 <COPYRIGHT HOLDER> 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: RespondentNewAction.php$ + */ + +/** + * + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +abstract class Gems_Default_RespondentNewAction extends Gems_Controller_ModelSnippetActionAbstract +{ + /** + * The snippets used for the create and edit actions. + * + * @var mixed String or array of snippets name + */ + protected $createEditSnippets = 'ModelTabFormSnippetGeneric'; + + /** + * + * @var Gems_Loader + */ + public $loader; + + /** + * 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 + */ + protected function createModel($detailed, $action) + { + $model = $this->loader->getModels()->createRespondentModel(); + + if (! $detailed) { + return $model->applyBrowseSettings(); + } + + switch ($action) { + case 'create': + case 'edit': + return $model->applyEditSettings(); + + default: + return $model->applyDetailSettings(); + } + } + + /** + * Set column usage to use for the browser. + * + * Must be an array of arrays containing the input for TableBridge->setMultisort() + * + * @return array or false + */ + public function getBrowseColumns() + { + $model = $this->getModel(); + + $model->setIfExists('gr2o_opened', 'tableDisplay', 'small'); + $model->setIfExists('grs_email', 'formatFunction', 'MUtil_Html_AElement::ifmail'); + + // Newline placeholder + $br = MUtil_Html::create('br'); + + // Display separator and phone sign only if phone exist. + $phonesep = MUtil_Html::raw('☏ '); // $bridge->itemIf($bridge->grs_phone_1, MUtil_Html::raw('☏ ')); + $citysep = MUtil_Html::raw(' '); // $bridge->itemIf($bridge->grs_zipcode, MUtil_Html::raw(' ')); + + if ($this->loader->getCurrentUser()->hasPrivilege('pr.respondent.multiorg')) { + $columns[] = array('gr2o_patient_nr', $br, 'gr2o_id_organization'); + } else { + $columns[] = array('gr2o_patient_nr', $br, 'gr2o_opened'); + } + $columns[] = array('name', $br, 'grs_email'); + $columns[] = array('grs_address_1', $br, 'grs_zipcode', $citysep, 'grs_city'); + $columns[] = array('grs_birthday', $br, $phonesep, 'grs_phone_1'); + + return $columns; + } + + /** + * Helper function to get the title for the index action. + * + * @return $string + */ + public function getIndexTitle() + { + return $this->_('Respondents'); + } + + /** + * Helper function to allow generalized statements about the items in the model. + * + * @param int $count + * @return $string + */ + public function getTopic($count = 1) + { + return $this->plural('respondent', 'respondents', $count);; + } + + /** + * Overrule default index for the case that the current + * organization cannot have users. + */ + public function indexAction() + { + $user = $this->loader->getCurrentUser(); + + if ($user->hasPrivilege('pr.respondent.multiorg') || $user->getCurrentOrganization()->canHaveRespondents()) { + parent::indexAction(); + } else { + $this->addSnippet('Organization_ChooseOrganizationSnippet'); + } + } +} Modified: trunk/library/classes/Gems/Model/RespondentModel.php =================================================================== --- trunk/library/classes/Gems/Model/RespondentModel.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/Gems/Model/RespondentModel.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -69,6 +69,14 @@ */ protected $project; + /** + * @var Gems_Util + */ + protected $util; + + /** + * Self constructor + */ public function __construct() { // gems__respondents MUST be first table for INSERTS!! @@ -84,8 +92,12 @@ $this->setOnSave('gr2o_opened_by', GemsEscort::getInstance()->session->user_id); $this->setSaveOnChange('gr2o_opened_by'); + if (! $this->has('grs_ssn')) { + $this->hashSsn = self::SSN_HIDE; + } if (self::SSN_HASH === $this->hashSsn) { - $this->setSaveWhenNotNull('grs_ssn'); + $this->setSaveWhen('grs_ssn', array($this, 'whenSSN')); + $this->setOnLoad('grs_ssn', array($this, 'saveSSN')); $this->setOnSave('grs_ssn', array($this, 'formatSSN')); } } @@ -145,6 +157,201 @@ } /** + * Set those settings needed for the browse display + * + * @return \Gems_Model_RespondentModel + */ + public function applyBrowseSettings() + { + $dbLookup = $this->util->getDbLookup(); + $translated = $this->util->getTranslated(); + $translator = $this->translate->getAdapter(); + + $this->resetOrder(); + + if ($this->has('gr2o_id_organization') && $this->isMultiOrganization()) { + $this->set('gr2o_id_organization', + 'label', $translator->_('Organization'), + 'multiOptions', $dbLookup->getOrganizationsWithRespondents() + ); + } + + $this->setIfExists('gr2o_patient_nr', 'label', $translator->_('Respondent nr')); + + $this->set('name', + 'label', $translator->_('Name'), + 'column_expression', "CONCAT( + COALESCE(CONCAT(grs_last_name, ', '), '-, '), + COALESCE(CONCAT(grs_first_name, ' '), ''), + COALESCE(grs_surname_prefix, ''))", + 'fieldlist', array('grs_last_name', 'grs_first_name', 'grs_surname_prefix')); + + $this->setIfExists('grs_email', 'label', $translator->_('E-Mail')); + + $this->setIfExists('grs_address_1', 'label', $translator->_('Street')); + $this->setIfExists('grs_zipcode', 'label', $translator->_('Zipcode')); + $this->setIfExists('grs_city', 'label', $translator->_('City')); + + $this->setIfExists('grs_phone_1', 'label', $translator->_('Phone')); + + $this->setIfExists('grs_birthday', + 'label', $translator->_('Birthday'), + 'dateFormat', Zend_Date::DATE_MEDIUM); + + $this->setIfExists('gr2o_opened', + 'label', $translator->_('Opened'), + 'formatFunction', $translated->formatDateTime); + $this->setIfExists('gr2o_consent', + 'label', $translator->_('Consent'), + 'multiOptions', $dbLookup->getUserConsents() + ); + + return $this; + } + + /** + * Set those settings needed for the detailed display + * + * @param mixed $locale The locale for the settings + * @return \Gems_Model_RespondentModel + */ + public function applyDetailSettings($locale = null) + { + $dbLookup = $this->util->getDbLookup(); + $translated = $this->util->getTranslated(); + $translator = $this->translate->getAdapter(); + + $this->resetOrder(); + if ($this->has('gr2o_id_organization')) { + $this->set('gr2o_id_organization', + 'label', $translator->_('Organization'), + 'tab', $translator->_('Identification') + ); + + if ($this->isMultiOrganization()) { + $user = $this->loader->getCurrentUser(); + + $this->set('gr2o_id_organization', + 'default', $user->getCurrentOrganizationId(), + 'multiOptions', $user->getRespondentOrganizations() + ); + } + } + + // The SSN + if ($this->hashSsn !== Gems_Model_RespondentModel::SSN_HIDE) { + $this->set('grs_ssn', 'label', $translator->_('SSN')); + } + + $this->setIfExists('gr2o_patient_nr', 'label', $translator->_('Respondent number')); + + $this->setIfExists('grs_first_name', 'label', $translator->_('First name')); + $this->setIfExists('grs_surname_prefix', + 'label', $translator->_('Surname prefix'), + 'description', $translator->_('de, van der, \'t, etc...') + ); + $this->setIfExists('grs_last_name', 'label', $translator->_('Last name')); + + $this->setIfExists('grs_gender', + 'label', $translator->_('Gender'), + 'multiOptions', $translated->getGenderHello() + ); + + $this->setIfExists('grs_email', 'label', $translator->_('E-Mail')); + + $this->setIfExists('grs_address_1', 'label', $translator->_('Street')); + $this->setIfExists('grs_zipcode', 'label', $translator->_('Zipcode')); + $this->setIfExists('grs_city', 'label', $translator->_('City')); + + $this->setIfExists('grs_phone_1', 'label', $translator->_('Phone')); + + $this->setIfExists('grs_birthday', + 'label', $translator->_('Birthday'), + 'dateFormat', Zend_Date::DATE_MEDIUM + ); + + $this->setIfExists('gr2o_opened', + 'label', $translator->_('Opened'), + 'formatFunction', $translated->formatDateTime + ); + + $this->setIfExists('gr2o_consent', + 'label', $translator->_('Consent'), + 'multiOptions', $dbLookup->getUserConsents() + ); + + $this->set('gr2o_comments', 'label', $translator->_('Comments')); + $this->set('gr2o_treatment', 'label', $translator->_('Treatment')); + + $this->addColumn('CASE WHEN grs_email IS NULL OR LENGTH(TRIM(grs_email)) = 0 THEN 1 ELSE 0 END', 'calc_email'); + + return $this; + } + + /** + * Set those values needed for editing + * + * @param mixed $locale The locale for the settings + * @return \Gems_Model_RespondentModel + */ + public function applyEditSettings($locale = null) + { + $this->applyDetailSettings($locale); + $this->copyKeys(); // The user can edit the keys. + + $translated = $this->util->getTranslated(); + $translator = $this->translate->getAdapter(); + $ucfirst = new Zend_Filter_Callback('ucfirst'); + + if ($this->hashSsn !== Gems_Model_RespondentModel::SSN_HIDE) { + $this->set('grs_ssn', + 'size', 10, + 'maxlength', 12, + 'filter', 'Digits'); + + if (APPLICATION_ENV !== 'production') { + $bsn = new MUtil_Validate_Dutch_Burgerservicenummer(); + $num = mt_rand(100000000, 999999999); + + while (! $bsn->isValid($num)) { + $num++; + } + + $this->setIfExists('grs_ssn', 'description', sprintf($translator->_('Random Example BSN: %s'), $num)); + } else { + $this->setIfExists('grs_ssn', 'description', $translator->_('Enter a 9-digit SSN number.')); + } + } + + $this->setIfExists('gr2o_patient_nr', + 'size', 15, + 'minlength', 4, + 'validator', $this->createUniqueValidator( + array('gr2o_patient_nr', 'gr2o_id_organization'), + array('gr2o_id_user' => 'grs_id_user', 'gr2o_id_organization') + ) + ); + + $this->setIfExists('grs_first_name', 'filter', $ucfirst); + $this->setIfExists('grs_last_name', 'filter', $ucfirst, 'required', true); + + $this->setIfExists('grs_gender', + 'elementClass', 'Radio', + 'separator', '', + 'multiOptions', $translated->getGenders(), + 'tab', $translator->_('Medical data') + ); + + $this->setIfExists('gr2o_opened', 'elementClass', 'Exhibitor'); + + $this->setIfExists('gr2o_consent', 'default', $this->util->getDefaultConsent()); + + $this->setIfExists('grs_iso_lang', 'default', 'nl'); + + return $this; + } + + /** * Apply hash function for array_walk_recursive in _checkFilterUsed() * * @see _checkFilterUsed() @@ -159,22 +366,6 @@ } } - /** - * Return a hashed version of the input value. - * - * @param mixed $value The value being saved - * @param boolean $isNew True when a new item is being saved - * @param string $name The name of the current field - * @param array $context Optional, the other values being saved - * @return string The salted hash as a 32-character hexadecimal number. - */ - public function formatSSN($value, $isNew = false, $name = null, array $context = array()) - { - if ($value) { - return $this->project->getValueHash($value); - } - } - public function copyKeys($reset = false) { $keys = $this->_getKeysFor('gems__respondent2org'); @@ -196,6 +387,22 @@ } /** + * Return a hashed version of the input value. + * + * @param mixed $value The value being saved + * @param boolean $isNew True when a new item is being saved + * @param string $name The name of the current field + * @param array $context Optional, the other values being saved + * @return string The output to display + */ + public function hideSSN($value, $isNew = false, $name = null, array $context = array()) + { + if ($value) { + return str_repeat('*', 9); + } + } + + /** * True when the default filter can contain multiple organizations * * @return boolean @@ -205,5 +412,35 @@ // return ($this->user->hasPrivilege('pr.respondent.multiorg') && (! $this->user->getCurrentOrganization()->canHaveRespondents())); return $this->user->hasPrivilege('pr.respondent.multiorg'); } + + /** + * Return a hashed version of the input value. + * + * @param mixed $value The value being saved + * @param boolean $isNew True when a new item is being saved + * @param string $name The name of the current field + * @param array $context Optional, the other values being saved + * @return string The salted hash as a 32-character hexadecimal number. + */ + public function saveSSN($value, $isNew = false, $name = null, array $context = array()) + { + if ($value) { + return $this->project->getValueHash($value); + } + } + + /** + * Return a hashed version of the input value. + * + * @param mixed $value The value being saved + * @param boolean $isNew True when a new item is being saved + * @param string $name The name of the current field + * @param array $context Optional, the other values being saved + * @return boolean + */ + public function whenSSN($value, $isNew = false, $name = null, array $context = array()) + { + return $value && ($value !== $this->hideSSN($value, $isNew, $name, $context)); + } } Modified: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -54,6 +54,67 @@ protected $_form; /** + * Adds elements from the model to the bridge that creates the form. + * + * Overrule this function to add different elements to the browse table, without + * having to recode the core table building code. + * + * @param MUtil_Model_FormBridge $bridge + * @param MUtil_Model_ModelAbstract $model + */ + protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model) + { + //Get all elements in the model if not already done + $this->initItems(); + + // Add 'tooltip' to the allowed displayoptions + $displayOptions = $bridge->getAllowedOptions(MUtil_Model_FormBridge::DISPLAY_OPTIONS); + if (!array_search('tooltip', $displayOptions)) { + $displayOptions[] = 'tooltip'; + } + $bridge->setAllowedOptions(MUtil_Model_FormBridge::DISPLAY_OPTIONS, $displayOptions); + + $tab = 0; + $group = 0; + foreach ($model->getItemsOrdered() as $name) { + // Get all options at once + $modelOptions = $model->get($name); + if ($tabName = $model->get($name, 'tab')) { + $bridge->addTab('tab' . $tab, 'value', $tabName); + $tab++; + } + + if ($model->has($name, 'label')) { + $bridge->add($name); + + if ($theName = $model->get('startGroup')) { + //We start a new group here! + $groupElements = array(); + $groupElements[] = $name; + $groupName = $theName; + } elseif ($theName = $model->get('endGroup')) { + //Ok, last element define the group + $groupElements[] = $name; + $bridge->addDisplayGroup('grp_' . $groupElements[0], $groupElements, + 'description', $groupName, + 'showLabels', ($theName == 'showLabels'), + 'class', 'grp' . $group); + $group++; + unset($groupElements); + unset($groupName); + } else { + //If we are in a group, add the elements to the group + if (isset($groupElements)) { + $groupElements[] = $name; + } + } + } else { + $bridge->addHidden($name); + } + } + } + + /** * Simple default function for making sure there is a $this->_saveButton. * * As the save button is not part of the model - but of the interface - it Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/Gems/TabForm.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -128,7 +128,9 @@ */ public function addTab($name, $title) { - if ($title instanceof MUtil_Html_Sequence) $title = $title->render($form->getView()); + if ($title instanceof MUtil_Html_HtmlInterface) { + $title = $title->render($this->getView()); + } $tab = new Gems_Form_TabSubForm(array('name' => $name, 'title' => strip_tags($title))); $this->currentTab = $tab; $this->addSubForm($tab, $name); @@ -247,13 +249,13 @@ * As addElement and addDisplayGroup provide a fluent way of working with subforms * we need to provide a method to skip back to the main form again. */ - public function resetContext() { + public function resetContext() { $this->currentTab = null; } /** * Select a tab by it's numerical index - * + * * @param int $tabIdx */ public function selectTab($tabIdx) { @@ -276,7 +278,7 @@ } parent::setView($view); - + if ($this->_view !== $view) { $this->activateJQuery(); if (false === $view->getPluginLoader('helper')->getPaths('Gems_JQuery_View_Helper')) { Modified: trunk/library/classes/Gems/Util/DbLookup.php =================================================================== --- trunk/library/classes/Gems/Util/DbLookup.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/Gems/Util/DbLookup.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -337,7 +337,12 @@ static $organizations; if (! $organizations) { - $organizations = $this->db->fetchPairs('SELECT gor_id_organization, gor_name FROM gems__organizations WHERE gor_active=1 AND gor_has_respondents=1 ORDER BY gor_name'); + $organizations = $this->db->fetchPairs( + 'SELECT gor_id_organization, gor_name + FROM gems__organizations + WHERE gor_active = 1 AND (gor_has_respondents = 1 OR gor_add_respondents = 1) + ORDER BY gor_name' + ); natsort($organizations); } Modified: trunk/library/classes/Gems/Util/Translated.php =================================================================== --- trunk/library/classes/Gems/Util/Translated.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/Gems/Util/Translated.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -126,48 +126,50 @@ public function formatDateTime($dateTimeValue) { - if ($dateTimeValue) { - //$dateTime = strtotime($dateTimeValue); - // MUtil_Echo::track($dateTimeValue, date('c', $dateTime), $dateTime / 86400, date('c', time()), time() / 86400); - // TODO: Timezone seems to screw this one up - //$days = floor($dateTime / 86400) - floor(time() / 86400); // 86400 = 24*60*60 - if ($dateTimeValue instanceof MUtil_Date) { - $dateTime = clone $dateTimeValue; - } else { - $dateTime = new MUtil_Date($dateTimeValue, Zend_Date::ISO_8601); - } - $days = $dateTime->diffDays(); + if (! $dateTimeValue) { + return null; + } - switch ($days) { - case -2: - return $this->_('2 days ago'); + //$dateTime = strtotime($dateTimeValue); + // MUtil_Echo::track($dateTimeValue, date('c', $dateTime), $dateTime / 86400, date('c', time()), time() / 86400); + // TODO: Timezone seems to screw this one up + //$days = floor($dateTime / 86400) - floor(time() / 86400); // 86400 = 24*60*60 + if ($dateTimeValue instanceof MUtil_Date) { + $dateTime = clone $dateTimeValue; + } elseif (MUtil_Date::isDate($dateTimeValue, Zend_Date::ISO_8601)) { + $dateTime = new MUtil_Date($dateTimeValue, Zend_Date::ISO_8601); + } else { + return null; + } + $days = $dateTime->diffDays(); - case -1: - return $this->_('Yesterday'); + switch ($days) { + case -2: + return $this->_('2 days ago'); - case 0: - return $this->_('Today'); + case -1: + return $this->_('Yesterday'); - case 1: - return $this->_('Tomorrow'); + case 0: + return $this->_('Today'); - case 2: - return $this->_('Over 2 days'); + case 1: + return $this->_('Tomorrow'); - default: - if (($days > -14) && ($days < 14)) { - if ($days > 0) { - return sprintf($this->_('Over %d days'), $days); - } else { - return sprintf($this->_('%d days ago'), -$days); - } + case 2: + return $this->_('Over 2 days'); + + default: + if (($days > -14) && ($days < 14)) { + if ($days > 0) { + return sprintf($this->_('Over %d days'), $days); + } else { + return sprintf($this->_('%d days ago'), -$days); } + } - return date($this->phpDateFormatString, $dateTime->getTimestamp()); // . ' (' . $days . ')'; - } + return date($this->phpDateFormatString, $dateTime->getTimestamp()); // . ' (' . $days . ')'; } - - return null; } /** Modified: trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -113,7 +113,7 @@ * * @var array Mixed key => value array for snippet initialization */ - protected $autofilterParameters = array(); + protected $autofilterParameters = array('columns' => 'getBrowseColumns'); /** * The snippets used for the autofilter action. @@ -380,6 +380,18 @@ } /** + * Set column usage to use for the browser. + * + * Must be an array of arrays containing the input for TableBridge->setMultisort() + * + * @return array or false + */ + public function getBrowseColumns() + { + return false; + } + + /** * Returns the model for the current $action. * * The parameters allow you to easily adapt the model to the current action. The $detailed Modified: trunk/library/classes/MUtil/Model/FormBridge.php =================================================================== --- trunk/library/classes/MUtil/Model/FormBridge.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/MUtil/Model/FormBridge.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -50,19 +50,20 @@ */ class MUtil_Model_FormBridge { - const AUTO_OPTIONS = 'auto'; - const CHECK_OPTIONS = 'check'; - const DATE_OPTIONS = 'date'; - const DISPLAY_OPTIONS = 'display'; - const EXHIBIT_OPTIONS = 'exhibit'; - const FILE_OPTIONS = 'file'; - const GROUP_OPTIONS = 'displaygroup'; - const JQUERY_OPTIONS = 'jquery'; - const MULTI_OPTIONS = 'multi'; - const PASSWORD_OPTIONS = 'password'; - const TAB_OPTIONS = 'tab'; - const TEXT_OPTIONS = 'text'; - const TEXTAREA_OPTIONS = 'textarea'; + const AUTO_OPTIONS = 'auto'; + const CHECK_OPTIONS = 'check'; + const DATE_OPTIONS = 'date'; + const DISPLAY_OPTIONS = 'display'; + const EXHIBIT_OPTIONS = 'exhibit'; + const FAKESUBMIT_OPTIONS = 'fakesubmit'; + const FILE_OPTIONS = 'file'; + const GROUP_OPTIONS = 'displaygroup'; + const JQUERY_OPTIONS = 'jquery'; + const MULTI_OPTIONS = 'multi'; + const PASSWORD_OPTIONS = 'password'; + const TAB_OPTIONS = 'tab'; + const TEXT_OPTIONS = 'text'; + const TEXTAREA_OPTIONS = 'textarea'; /** * The key to use in the Zend_Registry to store global fixed options @@ -82,19 +83,20 @@ // First list html attributes, then Zend attributes, lastly own attributes private $_allowedOptions = array( - self::AUTO_OPTIONS => array('elementClass', 'multiOptions'), - self::CHECK_OPTIONS => array('checkedValue', 'uncheckedValue'), - self::DATE_OPTIONS => array('dateFormat', 'storageFormat'), - self::DISPLAY_OPTIONS => array('accesskey', 'autoInsertNotEmptyValidator', 'class', 'disabled', 'description', 'escape', 'label', 'onclick', 'readonly', 'required', 'tabindex', 'value', 'showLabels', 'labelplacement'), - self::EXHIBIT_OPTIONS => array('formatFunction'), - self::FILE_OPTIONS => array('accept', 'count', 'destination', 'valueDisabled'), - self::GROUP_OPTIONS => array('elements', 'legend', 'separator'), - self::JQUERY_OPTIONS => array('jQueryParams'), - self::MULTI_OPTIONS => array('disable', 'multiOptions', 'onchange', 'separator', 'size', 'disableTranslator'), - self::PASSWORD_OPTIONS => array('repeatLabel'), - self::TAB_OPTIONS => array('value'), - self::TEXT_OPTIONS => array('maxlength', 'minlength', 'onchange', 'onfocus', 'onselect', 'size'), - self::TEXTAREA_OPTIONS => array('cols', 'rows', 'wrap'), + self::AUTO_OPTIONS => array('elementClass', 'multiOptions'), + self::CHECK_OPTIONS => array('checkedValue', 'uncheckedValue'), + self::DATE_OPTIONS => array('dateFormat', 'storageFormat'), + self::DISPLAY_OPTIONS => array('accesskey', 'autoInsertNotEmptyValidator', 'class', 'disabled', 'description', 'escape', 'label', 'onclick', 'readonly', 'required', 'tabindex', 'value', 'showLabels', 'labelplacement'), + self::EXHIBIT_OPTIONS => array('formatFunction'), + self::FAKESUBMIT_OPTIONS => array('label', 'tabindex', 'disabled'), + self::FILE_OPTIONS => array('accept', 'count', 'destination', 'valueDisabled'), + self::GROUP_OPTIONS => array('elements', 'legend', 'separator'), + self::JQUERY_OPTIONS => array('jQueryParams'), + self::MULTI_OPTIONS => array('disable', 'multiOptions', 'onchange', 'separator', 'size', 'disableTranslator'), + self::PASSWORD_OPTIONS => array('repeatLabel'), + self::TAB_OPTIONS => array('value'), + self::TEXT_OPTIONS => array('maxlength', 'minlength', 'onchange', 'onfocus', 'onselect', 'size'), + self::TEXTAREA_OPTIONS => array('cols', 'rows', 'wrap'), ); public function __construct(MUtil_Model_ModelAbstract $model, Zend_Form $form) @@ -402,14 +404,24 @@ return $this->_addToForm($element->getName(), $element); } + /** + * Add an element that just displays the value to the user + * + * @param string $name Name of element + * @param mixed $arrayOrKey1 MUtil_Ra::pairs() name => value array + * @return \MUtil_Form_Element_Exhibitor + */ public function addExhibitor($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { - $options = func_get_args(); - $options = MUtil_Ra::pairs($options, 1); + $options = $this->_mergeOptions( + $name, + MUtil_Ra::pairs(func_get_args(), 1), + self::DATE_OPTIONS, + self::DISPLAY_OPTIONS, + self::EXHIBIT_OPTIONS, + self::MULTI_OPTIONS + ); - $options = $this->_mergeOptions($name, $options, - self::DATE_OPTIONS, self::DISPLAY_OPTIONS, self::EXHIBIT_OPTIONS, self::MULTI_OPTIONS); - $element = new MUtil_Form_Element_Exhibitor($name, $options); $this->form->addElement($element); @@ -418,6 +430,29 @@ return $element; } + /** + * Add an element that just displays the value to the user + * + * @param string $name Name of element + * @param mixed $arrayOrKey1 MUtil_Ra::pairs() name => value array + * @return \MUtil_Form_Element_FakeSubmit + */ + public function addFakeSubmit($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) + { + $options = $this->_mergeOptions( + $name, + MUtil_Ra::pairs(func_get_args(), 1), + self::FAKESUBMIT_OPTIONS + ); + + $element = new MUtil_Form_Element_FakeSubmit($name, $options); + + $this->form->addElement($element); + // MUtil_Echo::r($element->getOrder(), $element->getName()); + + return $element; + } + public function addFile($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { $options = func_get_args(); @@ -523,6 +558,52 @@ return $this->_addToForm($name, 'Select', $options); } + + /** + * Adds a group of checkboxes (multicheckbox) + * + * @see Zend_Form_Element_MultiCheckbox + * + * @param string $name Name of element + * @param mixed $arrayOrKey1 MUtil_Ra::pairs() name => value array + * @return Zend_Form_Element_MultiCheckbox + */ + public function addMultiCheckbox($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) + { + $options = func_get_args(); + $options = MUtil_Ra::pairs($options, 1); + + // Is often added automatically, but should not be used here + $this->_moveOption('maxlength', $options); + + $options = $this->_mergeOptions($name, $options, + self::DISPLAY_OPTIONS, self::MULTI_OPTIONS); + + return $this->_addToForm($name, 'MultiCheckbox', $options); + } + + /** + * Adds a select box with multiple options + * + * @see Zend_Form_Element_Multiselect + * + * @param string $name Name of element + * @param mixed $arrayOrKey1 MUtil_Ra::pairs() name => value array + */ + public function addMultiSelect($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) + { + $options = func_get_args(); + $options = MUtil_Ra::pairs($options, 1); + + // Is often added automatically, but should not be used here + $this->_moveOption('maxlength', $options); + + $options = $this->_mergeOptions($name, $options, + self::DISPLAY_OPTIONS, self::MULTI_OPTIONS); + + return $this->_addToForm($name, 'Multiselect', $options); + } + public function addPassword($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { $options = func_get_args(); @@ -592,53 +673,7 @@ return $this->_addToForm($name, 'Select', $options); } - /** - * Adds a group of checkboxes (multicheckbox) - * - * @see Zend_Form_Element_MultiCheckbox - * - * @param string $name Name of element - * @param mixed $arrayOrKey1 MUtil_Ra::pairs() name => value array - * @return Zend_Form_Element_MultiCheckbox - */ - public function addMultiCheckbox($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) - { - $options = func_get_args(); - $options = MUtil_Ra::pairs($options, 1); - - // Is often added automatically, but should not be used here - $this->_moveOption('maxlength', $options); - - $options = $this->_mergeOptions($name, $options, - self::DISPLAY_OPTIONS, self::MULTI_OPTIONS); - - return $this->_addToForm($name, 'MultiCheckbox', $options); - } - - /** - * Adds a select box with multiple options - * - * @see Zend_Form_Element_Multiselect - * - * @param string $name Name of element - * @param mixed $arrayOrKey1 MUtil_Ra::pairs() name => value array - */ - public function addMultiSelect($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) - { - $options = func_get_args(); - $options = MUtil_Ra::pairs($options, 1); - - // Is often added automatically, but should not be used here - $this->_moveOption('maxlength', $options); - - $options = $this->_mergeOptions($name, $options, - self::DISPLAY_OPTIONS, self::MULTI_OPTIONS); - - return $this->_addToForm($name, 'Multiselect', $options); - } - - /** * Start a tab after this element, with the given name / title * * Can ofcourse only be used in tabbed forms. @@ -676,12 +711,13 @@ public function addText($name, $arrayOrKey1 = null, $value1 = null, $key2 = null, $value2 = null) { - $options = func_get_args(); - $options = MUtil_Ra::pairs($options, 1); + $options = $this->_mergeOptions( + $name, + MUtil_Ra::pairs(func_get_args(), 1), + self::DISPLAY_OPTIONS, + self::TEXT_OPTIONS + ); - $options = $this->_mergeOptions($name, $options, - self::DISPLAY_OPTIONS, self::TEXT_OPTIONS); - $stringlength = $this->_getStringLength($options); if ($stringlength) { Modified: trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php =================================================================== --- trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -78,6 +78,13 @@ public $caption; /** + * An array of nested arrays, each defining the input for setMultiSort + * + * @var array + */ + public $columns; + + /** * Content to show when there are no rows. * * Null shows '…' @@ -112,7 +119,11 @@ */ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { - if ($this->sortableLinks) { + if ($this->columns) { + foreach ($this->columns as $column) { + call_user_func_array(array($bridge, 'addMultiSort'), $column); + } + } elseif ($this->sortableLinks) { foreach($model->getItemsOrdered() as $name) { if ($label = $model->get($name, 'label')) { $bridge->addSortable($name, $label); Modified: trunk/library/snippets/Organization/ChooseOrganizationSnippet.php =================================================================== --- trunk/library/snippets/Organization/ChooseOrganizationSnippet.php 2013-02-28 15:13:09 UTC (rev 1166) +++ trunk/library/snippets/Organization/ChooseOrganizationSnippet.php 2013-02-28 17:40:31 UTC (rev 1167) @@ -89,17 +89,13 @@ $url[$this->request->getControllerKey()] = 'organization'; $url[$this->request->getActionKey()] = 'change-ui'; - if ($orgs = $user->getAllowedOrganizations()) { + if ($orgs = $user->getRespondentOrganizations()) { $html->pInfo($this->_('This organization cannot have any respondents, please choose one that does:')); foreach ($orgs as $orgId => $name) { - $org = $this->loader->getOrganization($orgId); + $url['org'] = $orgId; - if ($org->canHaveRespondents()) { - $url['org'] = $orgId; - - $html->pInfo()->actionLink($url, $name, array('style' => 'font-size: 120%;')); - } + $html->pInfo()->actionLink($url, $name, array('style' => 'font-size: 120%;')); } } else { $html->pInfo($this->_('This organization cannot have any respondents.')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-07 17:06:57
|
Revision: 1172 http://sourceforge.net/p/gemstracker/code/1172 Author: matijsdejong Date: 2013-03-07 17:06:55 +0000 (Thu, 07 Mar 2013) Log Message: ----------- Allow disable of text search on certain elements Use existing date label for AutosearchFormSnippet.php Modified Paths: -------------- trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-03-06 15:16:41 UTC (rev 1171) +++ trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-03-07 17:06:55 UTC (rev 1172) @@ -102,14 +102,14 @@ protected function _addPeriodSelectors(array &$elements, $dates, $defaultDate = null, $switchToSelect = 4) { if (is_array($dates) && (1 === count($dates))) { - reset($dates); + $fromLabel = reset($dates); $dates = key($dates); + } else { + $fromLabel = $this->_('From'); } if (is_string($dates)) { $element = new Zend_Form_Element_Hidden('dateused'); $element->setValue($dates); - - $fromLabel = $this->_('From'); } else { if (count($dates) >= $switchToSelect) { $element = $this->_createSelectElement('dateused', $dates); Modified: trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-03-06 15:16:41 UTC (rev 1171) +++ trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-03-07 17:06:55 UTC (rev 1172) @@ -865,7 +865,7 @@ $fields = array(); foreach ($this->getItemsUsed() as $name) { - if ($this->get($name, 'label')) { + if ($this->get($name, 'label') && (! $this->get($name, 'no_text_search'))) { if ($expression = $this->get($name, 'column_expression')) { if ($fieldList = $this->get($name, 'fieldlist')) { foreach ((array) $fieldList as $field) { Modified: trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php =================================================================== --- trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php 2013-03-06 15:16:41 UTC (rev 1171) +++ trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php 2013-03-07 17:06:55 UTC (rev 1172) @@ -86,6 +86,7 @@ foreach ($sub->getItemNames() as $name) { if (! $model->has($name)) { $data[$name] = $sub->get($name); + $data[$name]['no_text_search'] = true; // Remove unsuited data unset($data[$name]['table'], $data[$name]['column_expression']); Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2013-03-06 15:16:41 UTC (rev 1171) +++ trunk/library/languages/default-en.po 2013-03-07 17:06:55 UTC (rev 1172) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-19 18:03+0100\n" +"POT-Creation-Date: 2013-03-07 18:05+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -73,12 +73,12 @@ msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1758 classes/Gems/Default/StaffAction.php:317 +#: classes/GemsEscort.php:1758 classes/Gems/Default/StaffAction.php:324 msgid "No access to page" msgstr "No access to page" #: classes/GemsEscort.php:1760 classes/Gems/Default/OrganizationAction.php:106 -#: classes/Gems/Default/StaffAction.php:318 +#: classes/Gems/Default/StaffAction.php:325 #: classes/Gems/Model/HiddenOrganizationModel.php:115 #, php-format msgid "Access to this page is not allowed for current role: %s." @@ -258,7 +258,7 @@ #: classes/Gems/Menu.php:213 classes/Gems/Default/GroupAction.php:121 #: classes/Gems/Default/LogAction.php:193 -#: classes/Gems/Default/StaffAction.php:470 +#: classes/Gems/Default/StaffAction.php:481 msgid "Staff" msgstr "Staff" @@ -323,8 +323,8 @@ #: classes/Gems/Default/TrackActionAbstract.php:219 #: classes/Gems/Default/TrackFieldsAction.php:96 #: classes/Gems/Email/OneMailForm.php:54 -#: classes/Gems/Export/RespondentExport.php:235 -#: classes/Gems/Export/RespondentExport.php:247 +#: classes/Gems/Export/RespondentExport.php:238 +#: classes/Gems/Export/RespondentExport.php:250 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:484 #: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:728 #: classes/Gems/Tracker/Model/StandardTokenModel.php:216 @@ -400,6 +400,7 @@ #: classes/Gems/Menu.php:586 classes/Gems/Default/GroupAction.php:122 #: classes/Gems/Default/OrganizationAction.php:154 #: classes/Gems/Default/RespondentAction.php:462 +#: classes/Gems/Default/RespondentNewAction.php:131 msgid "Respondents" msgstr "Patients" @@ -419,7 +420,7 @@ msgid "Track Builder" msgstr "Track Builder" -#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:341 +#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:344 msgid "Export" msgstr "Export" @@ -433,6 +434,7 @@ msgstr "Changelog" #: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:93 +#: classes/Gems/Model/RespondentModel.php:179 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patient nr" @@ -441,7 +443,9 @@ #: classes/Gems/Default/IndexAction.php:229 #: classes/Gems/Default/LogAction.php:197 #: classes/Gems/Default/MailJobAction.php:98 -#: classes/Gems/Default/StaffAction.php:340 +#: classes/Gems/Default/StaffAction.php:347 +#: classes/Gems/Model/RespondentModel.php:174 +#: classes/Gems/Model/RespondentModel.php:227 #: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:63 #: classes/Gems/User/Form/LayeredLoginForm.php:254 #: classes/Gems/User/Form/OrganizationFormAbstract.php:166 @@ -449,36 +453,44 @@ msgid "Organization" msgstr "Organization" -#: classes/Gems/Model.php:217 +#: classes/Gems/Model.php:217 classes/Gems/Model/RespondentModel.php:202 +#: classes/Gems/Model/RespondentModel.php:274 msgid "Opened" msgstr "Opened" -#: classes/Gems/Model.php:218 +#: classes/Gems/Model.php:218 classes/Gems/Model/RespondentModel.php:205 +#: classes/Gems/Model/RespondentModel.php:279 msgid "Consent" msgstr "Consent" #: classes/Gems/Model.php:220 classes/Gems/Default/OptionAction.php:130 -#: classes/Gems/Default/StaffAction.php:330 +#: classes/Gems/Default/StaffAction.php:337 +#: classes/Gems/Model/RespondentModel.php:189 +#: classes/Gems/Model/RespondentModel.php:260 msgid "E-Mail" msgstr "E-Mail" #: classes/Gems/Model.php:225 classes/Gems/Default/OptionAction.php:134 -#: classes/Gems/Default/StaffAction.php:343 +#: classes/Gems/Default/StaffAction.php:350 +#: classes/Gems/Model/RespondentModel.php:256 msgid "Gender" msgstr "Gender" #: classes/Gems/Model.php:226 classes/Gems/Default/OptionAction.php:131 -#: classes/Gems/Default/StaffAction.php:185 +#: classes/Gems/Default/StaffAction.php:192 +#: classes/Gems/Model/RespondentModel.php:248 msgid "First name" msgstr "First name" #: classes/Gems/Model.php:227 classes/Gems/Default/OptionAction.php:132 -#: classes/Gems/Default/StaffAction.php:187 +#: classes/Gems/Default/StaffAction.php:194 +#: classes/Gems/Model/RespondentModel.php:250 msgid "Surname prefix" msgstr "Surname prefix" #: classes/Gems/Model.php:228 classes/Gems/Default/OptionAction.php:133 -#: classes/Gems/Default/StaffAction.php:188 +#: classes/Gems/Default/StaffAction.php:195 +#: classes/Gems/Model/RespondentModel.php:253 msgid "Last name" msgstr "Last name" @@ -488,35 +500,43 @@ #: classes/Gems/Default/OrganizationAction.php:126 #: classes/Gems/Default/RoleAction.php:252 #: classes/Gems/Default/SourceAction.php:195 -#: classes/Gems/Default/StaffAction.php:328 +#: classes/Gems/Default/StaffAction.php:335 #: classes/Gems/Default/SurveyMaintenanceAction.php:435 #: classes/Gems/Default/TokenPlanAction.php:116 #: classes/Gems/Default/TrackFieldsAction.php:98 #: classes/Gems/Default/TrackMaintenanceAction.php:318 +#: classes/Gems/Model/RespondentModel.php:182 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:60 #: classes/Gems/Tracker/Model/TrackModel.php:98 msgid "Name" msgstr "Name" -#: classes/Gems/Model.php:234 +#: classes/Gems/Model.php:234 classes/Gems/Model/RespondentModel.php:191 +#: classes/Gems/Model/RespondentModel.php:262 msgid "Street" msgstr "Street" -#: classes/Gems/Model.php:235 +#: classes/Gems/Model.php:235 classes/Gems/Model/RespondentModel.php:192 +#: classes/Gems/Model/RespondentModel.php:263 msgid "Zipcode" msgstr "Zipcode" #: classes/Gems/Model.php:236 #: classes/Gems/Default/RespondentPlanAction.php:134 +#: classes/Gems/Model/RespondentModel.php:193 +#: classes/Gems/Model/RespondentModel.php:264 msgid "City" msgstr "City" -#: classes/Gems/Model.php:238 +#: classes/Gems/Model.php:238 classes/Gems/Model/RespondentModel.php:195 +#: classes/Gems/Model/RespondentModel.php:266 msgid "Phone" msgstr "Phone" #: classes/Gems/Model.php:240 #: classes/Gems/Default/RespondentPlanAction.php:133 +#: classes/Gems/Model/RespondentModel.php:198 +#: classes/Gems/Model/RespondentModel.php:269 msgid "Birthday" msgstr "Birthday" @@ -540,11 +560,12 @@ msgid "Unable to run PDF conversion (%s): \"%s\"" msgstr "Unable to run PDF conversion (%s): \"%s\"" -#: classes/Gems/Upgrades.php:91 +#: classes/Gems/Upgrades.php:92 msgid "Syncing surveys for all sources" msgstr "Syncing surveys for all sources" -#: classes/Gems/Upgrades.php:151 classes/Gems/Upgrades.php:163 +#: classes/Gems/Upgrades.php:152 classes/Gems/Upgrades.php:164 +#: classes/Gems/Upgrades.php:186 msgid "Make sure to read the changelog as it contains important instructions" msgstr "Make sure to read the changelog as it contains important instructions" @@ -564,7 +585,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:357 #: classes/Gems/Controller/ModelSnippetActionAbstract.php:261 -#: classes/Gems/Default/StaffAction.php:228 +#: classes/Gems/Default/StaffAction.php:235 #: classes/Gems/Snippets/ModelFormSnippetAbstract.php:186 #, php-format msgid "New %s..." @@ -631,14 +652,14 @@ #: classes/Gems/Controller/BrowseEditAction.php:821 #: classes/Gems/Default/DatabaseAction.php:187 #: classes/Gems/Default/DatabaseAction.php:499 -#: classes/Gems/Default/StaffAction.php:276 +#: classes/Gems/Default/StaffAction.php:283 #: classes/Gems/Default/TrackAction.php:419 #: classes/Gems/Default/TrackRoundsAction.php:265 #: classes/Gems/Snippets/ModelItemYesNoDeleteSnippetAbstract.php:181 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:143 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:147 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:166 -#: classes/Gems/Util/Translated.php:267 +#: classes/Gems/Util/Translated.php:269 #: classes/MUtil/Snippets/ModelYesNoDeleteSnippetAbstract.php:192 #: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:124 msgid "Yes" @@ -647,7 +668,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:822 #: classes/Gems/Default/DatabaseAction.php:188 #: classes/Gems/Default/DatabaseAction.php:500 -#: classes/Gems/Default/StaffAction.php:277 +#: classes/Gems/Default/StaffAction.php:284 #: classes/Gems/Default/TrackAction.php:420 #: classes/Gems/Default/TrackRoundsAction.php:266 #: classes/Gems/Snippets/ModelItemYesNoDeleteSnippetAbstract.php:183 @@ -656,7 +677,7 @@ #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:167 #: classes/Gems/Util/ReceptionCodeLibrary.php:99 #: classes/Gems/Util/ReceptionCodeLibrary.php:123 -#: classes/Gems/Util/Translated.php:267 +#: classes/Gems/Util/Translated.php:269 #: classes/MUtil/Snippets/ModelYesNoDeleteSnippetAbstract.php:194 #: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:125 msgid "No" @@ -859,7 +880,7 @@ #: classes/Gems/Default/TrackActionAbstract.php:220 #: classes/Gems/Default/TrackFieldsAction.php:101 #: classes/Gems/Default/UpgradeAction.php:176 -#: classes/Gems/Export/RespondentExport.php:236 +#: classes/Gems/Export/RespondentExport.php:239 #: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:734 #: classes/Gems/Tracker/Model/StandardTokenModel.php:214 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:150 @@ -1489,7 +1510,7 @@ #: classes/Gems/Default/IndexAction.php:436 #: classes/Gems/Default/OptionAction.php:94 -#: classes/Gems/Default/StaffAction.php:510 +#: classes/Gems/Default/StaffAction.php:521 msgid "New password is active." msgstr "New password is active." @@ -1859,8 +1880,8 @@ #: classes/Gems/Default/MailTemplateAction.php:76 #: classes/Gems/Default/RespondentAction.php:386 -#: classes/Gems/Default/StaffAction.php:335 -#: classes/Gems/Default/StaffAction.php:405 +#: classes/Gems/Default/StaffAction.php:342 +#: classes/Gems/Default/StaffAction.php:416 #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:75 #: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:75 msgid "(all organizations)" @@ -1887,7 +1908,7 @@ #: classes/Gems/Default/OptionAction.php:136 #: classes/Gems/Default/OrganizationAction.php:147 #: classes/Gems/Default/RespondentAction.php:195 -#: classes/Gems/Default/StaffAction.php:351 +#: classes/Gems/Default/StaffAction.php:359 msgid "Language" msgstr "Language" @@ -2019,7 +2040,7 @@ msgstr "This can not be changed yet" #: classes/Gems/Default/OrganizationAction.php:192 -#: classes/Gems/Default/StaffAction.php:158 +#: classes/Gems/Default/StaffAction.php:165 msgid "User Definition" msgstr "User Definition" @@ -2208,7 +2229,7 @@ #: classes/Gems/Email/EmailFormAbstract.php:193 #: classes/Gems/Email/EmailFormAbstract.php:251 #: classes/Gems/Email/MailTemplateForm.php:81 -#: classes/Gems/Snippets/AutosearchFormSnippet.php:112 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:108 #: classes/Gems/Tracker/Model/TrackModel.php:103 msgid "From" msgstr "From" @@ -2321,19 +2342,23 @@ msgstr[1] "reception codes" #: classes/Gems/Default/RespondentAction.php:127 +#: classes/Gems/Model/RespondentModel.php:320 #, php-format msgid "Random Example BSN: %s" msgstr "Random Example BSN: %s" #: classes/Gems/Default/RespondentAction.php:129 +#: classes/Gems/Model/RespondentModel.php:322 msgid "Enter a 9-digit SSN number." msgstr "Enter a 9-digit BSN number." #: classes/Gems/Default/RespondentAction.php:143 +#: classes/Gems/Model/RespondentModel.php:228 msgid "Identification" msgstr "Identification" #: classes/Gems/Default/RespondentAction.php:154 +#: classes/Gems/Model/RespondentModel.php:243 msgid "SSN" msgstr "BSN" @@ -2342,6 +2367,7 @@ msgstr "Patient number" #: classes/Gems/Default/RespondentAction.php:167 +#: classes/Gems/Model/RespondentModel.php:342 msgid "Medical data" msgstr "Medical data" @@ -2374,11 +2400,13 @@ msgstr "Has the patient signed the informed consent letter?" #: classes/Gems/Default/RespondentAction.php:228 +#: classes/Gems/Model/RespondentModel.php:283 #: classes/Gems/Tracker/Model/StandardTokenModel.php:203 msgid "Comments" msgstr "Comments" #: classes/Gems/Default/RespondentAction.php:229 +#: classes/Gems/Model/RespondentModel.php:284 msgid "Treatment" msgstr "Treatment" @@ -2414,6 +2442,7 @@ msgstr "Export patient archive" #: classes/Gems/Default/RespondentAction.php:457 +#: classes/Gems/Default/RespondentNewAction.php:142 msgid "respondent" msgid_plural "respondents" msgstr[0] "patient" @@ -2686,27 +2715,27 @@ msgid "Synchronize all sources." msgstr "Synchronize all sources." -#: classes/Gems/Default/StaffAction.php:122 +#: classes/Gems/Default/StaffAction.php:129 msgid "password" msgstr "password" -#: classes/Gems/Default/StaffAction.php:164 +#: classes/Gems/Default/StaffAction.php:171 msgid "Unsupported User Definition" msgstr "Unsupported User Definition" -#: classes/Gems/Default/StaffAction.php:193 +#: classes/Gems/Default/StaffAction.php:200 msgid "Users can only login when this box is checked." msgstr "Users can only login when this box is checked." -#: classes/Gems/Default/StaffAction.php:194 +#: classes/Gems/Default/StaffAction.php:201 msgid "If checked the user will logoff when answering a survey." msgstr "If checked the user will logoff when answering a survey." -#: classes/Gems/Default/StaffAction.php:211 +#: classes/Gems/Default/StaffAction.php:218 msgid "You are not allowed to edit this staff member." msgstr "You are not allowed to edit this staff member." -#: classes/Gems/Default/StaffAction.php:268 +#: classes/Gems/Default/StaffAction.php:275 #, php-format msgid "" "User with id %s already exists but is deleted, do you want to reactivate the " @@ -2715,35 +2744,35 @@ "User with id %s already exists but is deleted, do you want to reactivate the " "account?" -#: classes/Gems/Default/StaffAction.php:327 classes/Gems/User/User.php:1212 +#: classes/Gems/Default/StaffAction.php:334 classes/Gems/User/User.php:1212 #: classes/Gems/User/Form/OrganizationFormAbstract.php:232 msgid "Username" msgstr "Username" -#: classes/Gems/Default/StaffAction.php:342 +#: classes/Gems/Default/StaffAction.php:349 msgid "Primary function" msgstr "Primary function" -#: classes/Gems/Default/StaffAction.php:352 +#: classes/Gems/Default/StaffAction.php:363 msgid "Can login" msgstr "Can login" -#: classes/Gems/Default/StaffAction.php:353 +#: classes/Gems/Default/StaffAction.php:364 msgid "Logout on survey" msgstr "Logout on survey" -#: classes/Gems/Default/StaffAction.php:465 +#: classes/Gems/Default/StaffAction.php:476 msgid "staff member" msgid_plural "staff members" msgstr[0] "staff member" msgstr[1] "staff members" -#: classes/Gems/Default/StaffAction.php:494 +#: classes/Gems/Default/StaffAction.php:505 #, php-format msgid "Reset password for: %s" msgstr "Reset password for: %s" -#: classes/Gems/Default/StaffAction.php:497 +#: classes/Gems/Default/StaffAction.php:508 msgid "You are not allowed to change this password." msgstr "You are not allowed to change this password." @@ -3141,6 +3170,7 @@ msgstr "Token planning" #: classes/Gems/Default/TrackAction.php:121 +#: classes/Gems/Model/RespondentModel.php:246 #: snippets/DeleteInSourceTrackSnippet.php:82 snippets/EditTrackSnippet.php:72 msgid "Respondent number" msgstr "Patient number" @@ -3245,13 +3275,13 @@ msgstr "Adding the %s track to respondent %s: %s" #: classes/Gems/Default/TrackActionAbstract.php:221 -#: classes/Gems/Export/RespondentExport.php:237 +#: classes/Gems/Export/RespondentExport.php:240 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:148 msgid "Enter the particulars concerning the assignment to this respondent." msgstr "Enter the particulars concerning the assignment to this patient." #: classes/Gems/Default/TrackActionAbstract.php:222 -#: classes/Gems/Export/RespondentExport.php:238 +#: classes/Gems/Export/RespondentExport.php:241 #: classes/Gems/Tracker/Model/StandardTokenModel.php:207 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:151 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:149 @@ -3260,7 +3290,7 @@ msgstr "Assigned by" #: classes/Gems/Default/TrackActionAbstract.php:223 -#: classes/Gems/Export/RespondentExport.php:239 +#: classes/Gems/Export/RespondentExport.php:242 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:152 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:150 msgid "Start" @@ -3272,7 +3302,7 @@ msgstr "Ending on" #: classes/Gems/Default/TrackActionAbstract.php:231 -#: classes/Gems/Export/RespondentExport.php:243 +#: classes/Gems/Export/RespondentExport.php:246 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:161 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:278 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 @@ -3665,7 +3695,7 @@ msgid "Show all answers for this survey type" msgstr "Show all answers for this survey type" -#: classes/Gems/Event/Survey/Display/AllSingleTrack.php:73 +#: classes/Gems/Event/Survey/Display/AllSingleTrack.php:86 msgid "Show all tokens for this survey in this track type" msgstr "Show all tokens for this survey in this track type" @@ -3710,15 +3740,15 @@ msgid "Single Survey" msgstr "Single Survey" -#: classes/Gems/Export/RespondentExport.php:251 +#: classes/Gems/Export/RespondentExport.php:254 msgid "Track information" msgstr "Track information" -#: classes/Gems/Export/RespondentExport.php:326 +#: classes/Gems/Export/RespondentExport.php:329 msgid "Group surveys" msgstr "Group surveys" -#: classes/Gems/Export/RespondentExport.php:331 +#: classes/Gems/Export/RespondentExport.php:334 msgid "Output format" msgstr "Output format" @@ -3911,6 +3941,10 @@ msgid "No script for %1$s." msgstr "No script for %1$s." +#: classes/Gems/Model/RespondentModel.php:251 +msgid "de, van der, 't, etc..." +msgstr "de, van der, 't, etc..." + #: classes/Gems/Selector/DateSelectorAbstract.php:309 msgid "<<" msgstr "<<" @@ -4591,12 +4625,12 @@ msgstr "Decrease" #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:157 -#: classes/Gems/Util/Translated.php:233 +#: classes/Gems/Util/Translated.php:235 msgid "Female" msgstr "Female" #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:158 -#: classes/Gems/Util/Translated.php:233 +#: classes/Gems/Util/Translated.php:235 msgid "Male" msgstr "Male" @@ -4830,11 +4864,11 @@ msgid "User not found or no e-mail address known or user cannot be reset." msgstr "User not found or no e-mail address known or user cannot be reset." -#: classes/Gems/Util/DbLookup.php:452 +#: classes/Gems/Util/DbLookup.php:457 msgid "inactive" msgstr "inactive" -#: classes/Gems/Util/DbLookup.php:453 +#: classes/Gems/Util/DbLookup.php:458 msgid "source inactive" msgstr "source inactive" @@ -4918,88 +4952,88 @@ msgid "never" msgstr "never" -#: classes/Gems/Util/Translated.php:143 +#: classes/Gems/Util/Translated.php:148 msgid "2 days ago" msgstr "2 days ago" -#: classes/Gems/Util/Translated.php:146 +#: classes/Gems/Util/Translated.php:151 msgid "Yesterday" msgstr "Yesterday" -#: classes/Gems/Util/Translated.php:149 +#: classes/Gems/Util/Translated.php:154 msgid "Today" msgstr "Today" -#: classes/Gems/Util/Translated.php:152 +#: classes/Gems/Util/Translated.php:157 msgid "Tomorrow" msgstr "Tomorrow" -#: classes/Gems/Util/Translated.php:155 +#: classes/Gems/Util/Translated.php:160 msgid "Over 2 days" msgstr "Over 2 days" -#: classes/Gems/Util/Translated.php:160 +#: classes/Gems/Util/Translated.php:165 #, php-format msgid "Over %d days" msgstr "Over %d days" -#: classes/Gems/Util/Translated.php:162 +#: classes/Gems/Util/Translated.php:167 #, php-format msgid "%d days ago" msgstr "%d days ago" -#: classes/Gems/Util/Translated.php:190 +#: classes/Gems/Util/Translated.php:192 #, php-format msgid "%d days %d:%s:%s" msgstr "%d days %d:%s:%s" -#: classes/Gems/Util/Translated.php:192 +#: classes/Gems/Util/Translated.php:194 #, php-format msgid "%d:%s:%s" msgstr "%d:%s:%s" -#: classes/Gems/Util/Translated.php:194 +#: classes/Gems/Util/Translated.php:196 #, php-format msgid "%d:%s" msgstr "%d:%s" -#: classes/Gems/Util/Translated.php:206 +#: classes/Gems/Util/Translated.php:208 msgid "Send multiple mails per respondent, one for each checked token." msgstr "Send multiple mails per patient, one for each checked token." -#: classes/Gems/Util/Translated.php:207 +#: classes/Gems/Util/Translated.php:209 msgid "Send one mail per respondent, mark all checked tokens as send." msgstr "Send one mail per patient, mark all checked tokens as send." -#: classes/Gems/Util/Translated.php:208 +#: classes/Gems/Util/Translated.php:210 msgid "Send one mail per respondent, mark only mailed tokens as send." msgstr "Send one mail per patient, mark only mailed tokens as send." -#: classes/Gems/Util/Translated.php:233 +#: classes/Gems/Util/Translated.php:235 msgid "Unknown" msgstr "Unknown" -#: classes/Gems/Util/Translated.php:246 +#: classes/Gems/Util/Translated.php:248 msgid "mr." msgstr "Mr." -#: classes/Gems/Util/Translated.php:246 +#: classes/Gems/Util/Translated.php:248 msgid "mrs." msgstr "Mrs." -#: classes/Gems/Util/Translated.php:246 +#: classes/Gems/Util/Translated.php:248 msgid "mr./mrs." msgstr "Mr./Mrs." -#: classes/Gems/Util/Translated.php:259 +#: classes/Gems/Util/Translated.php:261 msgid "Mr." msgstr "Mr." -#: classes/Gems/Util/Translated.php:259 +#: classes/Gems/Util/Translated.php:261 msgid "Mrs." msgstr "Mrs." -#: classes/Gems/Util/Translated.php:259 +#: classes/Gems/Util/Translated.php:261 msgid "Mr./Mrs." msgstr "Mr./Mrs." @@ -5362,7 +5396,7 @@ msgstr "" "This organization cannot have any patients, please choose one that does:" -#: snippets/Organization/ChooseOrganizationSnippet.php:105 +#: snippets/Organization/ChooseOrganizationSnippet.php:101 msgid "This organization cannot have any respondents." msgstr "This organization cannot have any patients." Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2013-03-06 15:16:41 UTC (rev 1171) +++ trunk/library/languages/default-nl.po 2013-03-07 17:06:55 UTC (rev 1172) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-19 18:03+0100\n" +"POT-Creation-Date: 2013-03-07 18:05+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -73,12 +73,12 @@ msgid "You have no access to this site." msgstr "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1758 classes/Gems/Default/StaffAction.php:317 +#: classes/GemsEscort.php:1758 classes/Gems/Default/StaffAction.php:324 msgid "No access to page" msgstr "Geen toegang tot pagina" #: classes/GemsEscort.php:1760 classes/Gems/Default/OrganizationAction.php:106 -#: classes/Gems/Default/StaffAction.php:318 +#: classes/Gems/Default/StaffAction.php:325 #: classes/Gems/Model/HiddenOrganizationModel.php:115 #, php-format msgid "Access to this page is not allowed for current role: %s." @@ -258,7 +258,7 @@ #: classes/Gems/Menu.php:213 classes/Gems/Default/GroupAction.php:121 #: classes/Gems/Default/LogAction.php:193 -#: classes/Gems/Default/StaffAction.php:470 +#: classes/Gems/Default/StaffAction.php:481 msgid "Staff" msgstr "Medewerkers" @@ -323,8 +323,8 @@ #: classes/Gems/Default/TrackActionAbstract.php:219 #: classes/Gems/Default/TrackFieldsAction.php:96 #: classes/Gems/Email/OneMailForm.php:54 -#: classes/Gems/Export/RespondentExport.php:235 -#: classes/Gems/Export/RespondentExport.php:247 +#: classes/Gems/Export/RespondentExport.php:238 +#: classes/Gems/Export/RespondentExport.php:250 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:484 #: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:728 #: classes/Gems/Tracker/Model/StandardTokenModel.php:216 @@ -400,6 +400,7 @@ #: classes/Gems/Menu.php:586 classes/Gems/Default/GroupAction.php:122 #: classes/Gems/Default/OrganizationAction.php:154 #: classes/Gems/Default/RespondentAction.php:462 +#: classes/Gems/Default/RespondentNewAction.php:131 msgid "Respondents" msgstr "Patiënten" @@ -419,7 +420,7 @@ msgid "Track Builder" msgstr "Traject bouwer" -#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:341 +#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:344 msgid "Export" msgstr "Exporteer" @@ -433,6 +434,7 @@ msgstr "Changelog" #: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:93 +#: classes/Gems/Model/RespondentModel.php:179 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patiënt nr" @@ -441,7 +443,9 @@ #: classes/Gems/Default/IndexAction.php:229 #: classes/Gems/Default/LogAction.php:197 #: classes/Gems/Default/MailJobAction.php:98 -#: classes/Gems/Default/StaffAction.php:340 +#: classes/Gems/Default/StaffAction.php:347 +#: classes/Gems/Model/RespondentModel.php:174 +#: classes/Gems/Model/RespondentModel.php:227 #: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:63 #: classes/Gems/User/Form/LayeredLoginForm.php:254 #: classes/Gems/User/Form/OrganizationFormAbstract.php:166 @@ -449,36 +453,44 @@ msgid "Organization" msgstr "Organisatie" -#: classes/Gems/Model.php:217 +#: classes/Gems/Model.php:217 classes/Gems/Model/RespondentModel.php:202 +#: classes/Gems/Model/RespondentModel.php:274 msgid "Opened" msgstr "Bekeken op" -#: classes/Gems/Model.php:218 +#: classes/Gems/Model.php:218 classes/Gems/Model/RespondentModel.php:205 +#: classes/Gems/Model/RespondentModel.php:279 msgid "Consent" msgstr "Toestemming" #: classes/Gems/Model.php:220 classes/Gems/Default/OptionAction.php:130 -#: classes/Gems/Default/StaffAction.php:330 +#: classes/Gems/Default/StaffAction.php:337 +#: classes/Gems/Model/RespondentModel.php:189 +#: classes/Gems/Model/RespondentModel.php:260 msgid "E-Mail" msgstr "Email" #: classes/Gems/Model.php:225 classes/Gems/Default/OptionAction.php:134 -#: classes/Gems/Default/StaffAction.php:343 +#: classes/Gems/Default/StaffAction.php:350 +#: classes/Gems/Model/RespondentModel.php:256 msgid "Gender" msgstr "Geslacht" #: classes/Gems/Model.php:226 classes/Gems/Default/OptionAction.php:131 -#: classes/Gems/Default/StaffAction.php:185 +#: classes/Gems/Default/StaffAction.php:192 +#: classes/Gems/Model/RespondentModel.php:248 msgid "First name" msgstr "Voornaam" #: classes/Gems/Model.php:227 classes/Gems/Default/OptionAction.php:132 -#: classes/Gems/Default/StaffAction.php:187 +#: classes/Gems/Default/StaffAction.php:194 +#: classes/Gems/Model/RespondentModel.php:250 msgid "Surname prefix" msgstr "Tussenvoegsel" #: classes/Gems/Model.php:228 classes/Gems/Default/OptionAction.php:133 -#: classes/Gems/Default/StaffAction.php:188 +#: classes/Gems/Default/StaffAction.php:195 +#: classes/Gems/Model/RespondentModel.php:253 msgid "Last name" msgstr "Achternaam" @@ -488,35 +500,43 @@ #: classes/Gems/Default/OrganizationAction.php:126 #: classes/Gems/Default/RoleAction.php:252 #: classes/Gems/Default/SourceAction.php:195 -#: classes/Gems/Default/StaffAction.php:328 +#: classes/Gems/Default/StaffAction.php:335 #: classes/Gems/Default/SurveyMaintenanceAction.php:435 #: classes/Gems/Default/TokenPlanAction.php:116 #: classes/Gems/Default/TrackFieldsAction.php:98 #: classes/Gems/Default/TrackMaintenanceAction.php:318 +#: classes/Gems/Model/RespondentModel.php:182 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:60 #: classes/Gems/Tracker/Model/TrackModel.php:98 msgid "Name" msgstr "Naam" -#: classes/Gems/Model.php:234 +#: classes/Gems/Model.php:234 classes/Gems/Model/RespondentModel.php:191 +#: classes/Gems/Model/RespondentModel.php:262 msgid "Street" msgstr "Straat" -#: classes/Gems/Model.php:235 +#: classes/Gems/Model.php:235 classes/Gems/Model/RespondentModel.php:192 +#: classes/Gems/Model/RespondentModel.php:263 msgid "Zipcode" msgstr "Postcode" #: classes/Gems/Model.php:236 #: classes/Gems/Default/RespondentPlanAction.php:134 +#: classes/Gems/Model/RespondentModel.php:193 +#: classes/Gems/Model/RespondentModel.php:264 msgid "City" msgstr "Woonplaats" -#: classes/Gems/Model.php:238 +#: classes/Gems/Model.php:238 classes/Gems/Model/RespondentModel.php:195 +#: classes/Gems/Model/RespondentModel.php:266 msgid "Phone" msgstr "Telefoon" #: classes/Gems/Model.php:240 #: classes/Gems/Default/RespondentPlanAction.php:133 +#: classes/Gems/Model/RespondentModel.php:198 +#: classes/Gems/Model/RespondentModel.php:269 msgid "Birthday" msgstr "Geboren op" @@ -540,11 +560,12 @@ msgid "Unable to run PDF conversion (%s): \"%s\"" msgstr "Kan PDF conversie (%s) niet starten: \"%s\"" -#: classes/Gems/Upgrades.php:91 +#: classes/Gems/Upgrades.php:92 msgid "Syncing surveys for all sources" msgstr "Vragenlijsten synchroniseren voor alle bronnen." -#: classes/Gems/Upgrades.php:151 classes/Gems/Upgrades.php:163 +#: classes/Gems/Upgrades.php:152 classes/Gems/Upgrades.php:164 +#: classes/Gems/Upgrades.php:186 msgid "Make sure to read the changelog as it contains important instructions" msgstr "Lees de wijzigingen, er kunnen belangrijke aanwijzingen in staan" @@ -564,7 +585,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:357 #: classes/Gems/Controller/ModelSnippetActionAbstract.php:261 -#: classes/Gems/Default/StaffAction.php:228 +#: classes/Gems/Default/StaffAction.php:235 #: classes/Gems/Snippets/ModelFormSnippetAbstract.php:186 #, php-format msgid "New %s..." @@ -631,14 +652,14 @@ #: classes/Gems/Controller/BrowseEditAction.php:821 #: classes/Gems/Default/DatabaseAction.php:187 #: classes/Gems/Default/DatabaseAction.php:499 -#: classes/Gems/Default/StaffAction.php:276 +#: classes/Gems/Default/StaffAction.php:283 #: classes/Gems/Default/TrackAction.php:419 #: classes/Gems/Default/TrackRoundsAction.php:265 #: classes/Gems/Snippets/ModelItemYesNoDeleteSnippetAbstract.php:181 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:143 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:147 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:166 -#: classes/Gems/Util/Translated.php:267 +#: classes/Gems/Util/Translated.php:269 #: classes/MUtil/Snippets/ModelYesNoDeleteSnippetAbstract.php:192 #: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:124 msgid "Yes" @@ -647,7 +668,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:822 #: classes/Gems/Default/DatabaseAction.php:188 #: classes/Gems/Default/DatabaseAction.php:500 -#: classes/Gems/Default/StaffAction.php:277 +#: classes/Gems/Default/StaffAction.php:284 #: classes/Gems/Default/TrackAction.php:420 #: classes/Gems/Default/TrackRoundsAction.php:266 #: classes/Gems/Snippets/ModelItemYesNoDeleteSnippetAbstract.php:183 @@ -656,7 +677,7 @@ #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:167 #: classes/Gems/Util/ReceptionCodeLibrary.php:99 #: classes/Gems/Util/ReceptionCodeLibrary.php:123 -#: classes/Gems/Util/Translated.php:267 +#: classes/Gems/Util/Translated.php:269 #: classes/MUtil/Snippets/ModelYesNoDeleteSnippetAbstract.php:194 #: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:125 msgid "No" @@ -861,7 +882,7 @@ #: classes/Gems/Default/TrackActionAbstract.php:220 #: classes/Gems/Default/TrackFieldsAction.php:101 #: classes/Gems/Default/UpgradeAction.php:176 -#: classes/Gems/Export/RespondentExport.php:236 +#: classes/Gems/Export/RespondentExport.php:239 #: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:734 #: classes/Gems/Tracker/Model/StandardTokenModel.php:214 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:150 @@ -1495,7 +1516,7 @@ #: classes/Gems/Default/IndexAction.php:436 #: classes/Gems/Default/OptionAction.php:94 -#: classes/Gems/Default/StaffAction.php:510 +#: classes/Gems/Default/StaffAction.php:521 msgid "New password is active." msgstr "Nieuwe wachtwoord geactiveerd." @@ -1866,8 +1887,8 @@ #: classes/Gems/Default/MailTemplateAction.php:76 #: classes/Gems/Default/RespondentAction.php:386 -#: classes/Gems/Default/StaffAction.php:335 -#: classes/Gems/Default/StaffAction.php:405 +#: classes/Gems/Default/StaffAction.php:342 +#: classes/Gems/Default/StaffAction.php:416 #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:75 #: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:75 msgid "(all organizations)" @@ -1894,7 +1915,7 @@ #: classes/Gems/Default/OptionAction.php:136 #: classes/Gems/Default/OrganizationAction.php:147 #: classes/Gems/Default/RespondentAction.php:195 -#: classes/Gems/Default/StaffAction.php:351 +#: classes/Gems/Default/StaffAction.php:359 msgid "Language" msgstr "Taal" @@ -2028,7 +2049,7 @@ msgstr "Dit kan nog niet gewijzigd worden" #: classes/Gems/Default/OrganizationAction.php:192 -#: classes/Gems/Default/StaffAction.php:158 +#: classes/Gems/Default/StaffAction.php:165 msgid "User Definition" msgstr "Gebruikers definitie" @@ -2217,7 +2238,7 @@ #: classes/Gems/Email/EmailFormAbstract.php:193 #: classes/Gems/Email/EmailFormAbstract.php:251 #: classes/Gems/Email/MailTemplateForm.php:81 -#: classes/Gems/Snippets/AutosearchFormSnippet.php:112 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:108 #: classes/Gems/Tracker/Model/TrackModel.php:103 msgid "From" msgstr "Van" @@ -2330,19 +2351,23 @@ msgstr[1] "Ontvangst code" #: classes/Gems/Default/RespondentAction.php:127 +#: classes/Gems/Model/RespondentModel.php:320 #, php-format msgid "Random Example BSN: %s" msgstr "Willekeurig voorbeeld BSN: %s" #: classes/Gems/Default/RespondentAction.php:129 +#: classes/Gems/Model/RespondentModel.php:322 msgid "Enter a 9-digit SSN number." msgstr "Voer een BSN nummer van 9 cijfers in." #: classes/Gems/Default/RespondentAction.php:143 +#: classes/Gems/Model/RespondentModel.php:228 msgid "Identification" msgstr "Identificatie" #: classes/Gems/Default/RespondentAction.php:154 +#: classes/Gems/Model/RespondentModel.php:243 msgid "SSN" msgstr "BSN" @@ -2351,6 +2376,7 @@ msgstr "Patiënt nummer" #: classes/Gems/Default/RespondentAction.php:167 +#: classes/Gems/Model/RespondentModel.php:342 msgid "Medical data" msgstr "Medische gegevens" @@ -2383,11 +2409,13 @@ msgstr "Heeft de patiënt het \"informed consent\" formulier ondertekend?" #: classes/Gems/Default/RespondentAction.php:228 +#: classes/Gems/Model/RespondentModel.php:283 #: classes/Gems/Tracker/Model/StandardTokenModel.php:203 msgid "Comments" msgstr "Opmerkingen" #: classes/Gems/Default/RespondentAction.php:229 +#: classes/Gems/Model/RespondentModel.php:284 msgid "Treatment" msgstr "Behandeling" @@ -2423,6 +2451,7 @@ msgstr "Exporteer patiënt dossier" #: classes/Gems/Default/RespondentAction.php:457 +#: classes/Gems/Default/RespondentNewAction.php:142 msgid "respondent" msgid_plural "respondents" msgstr[0] "patiënt" @@ -2700,29 +2729,29 @@ msgid "Synchronize all sources." msgstr "Synchroniseer alle bronnen." -#: classes/Gems/Default/StaffAction.php:122 +#: classes/Gems/Default/StaffAction.php:129 msgid "password" msgstr "wachtwoord" -#: classes/Gems/Default/StaffAction.php:164 +#: classes/Gems/Default/StaffAction.php:171 msgid "Unsupported User Definition" msgstr "Onbekende User Definition" -#: classes/Gems/Default/StaffAction.php:193 +#: classes/Gems/Default/StaffAction.php:200 msgid "Users can only login when this box is checked." msgstr "Gebruikers kunnen alleen inloggen als dit is aangevinkt." -#: classes/Gems/Default/StaffAction.php:194 +#: classes/Gems/Default/StaffAction.php:201 msgid "If checked the user will logoff when answering a survey." msgstr "" "Indien actief, dan logt de gebruiker uit voor het beantwoorden van een " "vragenlijst." -#: classes/Gems/Default/StaffAction.php:211 +#: classes/Gems/Default/StaffAction.php:218 msgid "You are not allowed to edit this staff member." msgstr "U mag deze medewerker niet wijzigen." -#: classes/Gems/Default/StaffAction.php:268 +#: classes/Gems/Default/StaffAction.php:275 #, php-format msgid "" "User with id %s already exists but is deleted, do you want to reactivate the " @@ -2731,35 +2760,35 @@ "Gebruiker met inlognaam %s bestaat al maar is verwijderd, wilt u het account " "opnieuw activeren?" -#: classes/Gems/Default/StaffAction.php:327 classes/Gems/User/User.php:1212 +#: classes/Gems/Default/StaffAction.php:334 classes/Gems/User/User.php:1212 #: classes/Gems/User/Form/OrganizationFormAbstract.php:232 msgid "Username" msgstr "Gebruikersnaam" -#: classes/Gems/Default/StaffAction.php:342 +#: classes/Gems/Default/StaffAction.php:349 msgid "Primary function" msgstr "Primaire functie" -#: classes/Gems/Default/StaffAction.php:352 +#: classes/Gems/Default/StaffAction.php:363 msgid "Can login" msgstr "Kan inloggen" -#: classes/Gems/Default/StaffAction.php:353 +#: classes/Gems/Default/StaffAction.php:364 msgid "Logout on survey" msgstr "Logout bij beantwoorden vragenlijst" -#: classes/Gems/Default/StaffAction.php:465 +#: classes/Gems/Default/StaffAction.php:476 msgid "staff member" msgid_plural "staff members" msgstr[0] "medewerker" msgstr[1] "medewerkers" -#: classes/Gems/Default/StaffAction.php:494 +#: classes/Gems/Default/StaffAction.php:505 #, php-format msgid "Reset password for: %s" msgstr "Verander het wachtwoord voor: %s" -#: classes/Gems/Default/StaffAction.php:497 +#: classes/Gems/Default/StaffAction.php:508 msgid "You are not allowed to change this password." msgstr "U mag dit wachtwoord niet wijzigen." @@ -3160,6 +3189,7 @@ msgstr "Per kenmerk plannen" #: classes/Gems/Default/TrackAction.php:121 +#: classes/Gems/Model/RespondentModel.php:246 #: snippets/DeleteInSourceTrackSnippet.php:82 snippets/EditTrackSnippet.php:72 msgid "Respondent number" msgstr "Patiënt nummer" @@ -3264,13 +3294,13 @@ msgstr "Traject %s toewijzen aan patiënt %s: %s" #: classes/Gems/Default/TrackActionAbstract.php:221 -#: classes/Gems/Export/RespondentExport.php:237 +#: classes/Gems/Export/RespondentExport.php:240 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:148 msgid "Enter the particulars concerning the assignment to this respondent." msgstr "Beschrijf de redenen om dit aan deze patiënt toe te wijzen." #: classes/Gems/Default/TrackActionAbstract.php:222 -#: classes/Gems/Export/RespondentExport.php:238 +#: classes/Gems/Export/RespondentExport.php:241 #: classes/Gems/Tracker/Model/StandardTokenModel.php:207 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:151 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:149 @@ -3279,7 +3309,7 @@ msgstr "Toewijzer" #: classes/Gems/Default/TrackActionAbstract.php:223 -#: classes/Gems/Export/RespondentExport.php:239 +#: classes/Gems/Export/RespondentExport.php:242 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:152 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:150 msgid "Start" @@ -3291,7 +3321,7 @@ msgstr "Afgelopen op" #: classes/Gems/Default/TrackActionAbstract.php:231 -#: classes/Gems/Export/RespondentExport.php:243 +#: classes/Gems/Export/RespondentExport.php:246 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:161 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:278 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 @@ -3692,7 +3722,7 @@ msgid "Show all answers for this survey type" msgstr "Toon alle antwoorden voor deze vragenlijst" -#: classes/Gems/Event/Survey/Display/AllSingleTrack.php:73 +#: classes/Gems/Event/Survey/Display/AllSingleTrack.php:86 msgid "Show all tokens for this survey in this track type" msgstr "Toon alle antwoorden voor deze vragenlijst in dit traject type" @@ -3737,15 +3767,15 @@ msgid "Single Survey" msgstr "Losse vragenlijst" -#: classes/Gems/Export/RespondentExport.php:251 +#: classes/Gems/Export/RespondentExport.php:254 msgid "Track information" msgstr "Traject informatie" -#: classes/Gems/Export/RespondentExport.php:326 +#: classes/Gems/Export/RespondentExport.php:329 msgid "Group surveys" msgstr "Groepeer vragenlijsten" -#: classes/Gems/Export/RespondentExport.php:331 +#: classes/Gems/Export/RespondentExport.php:334 msgid "Output format" msgstr "Uitvoerformaat" @@ -3939,6 +3969,10 @@ msgid "No script for %1$s." msgstr "Geen script voor %1$s:" +#: classes/Gems/Model/RespondentModel.php:251 +msgid "de, van der, 't, etc..." +msgstr "de, van der, 't, etc..." + #: classes/Gems/Selector/DateSelectorAbstract.php:309 msgid "<<" msgstr "<<" @@ -4629,12 +4663,12 @@ msgstr "Afnemend" #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:157 -#: classes/Gems/Util/Translated.php:233 +#: classes/Gems/Util/Translated.php:235 msgid "Female" msgstr "Vrouw" #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:158 -#: classes/Gems/Util/Translated.php:233 +#: classes/Gems/Util/Translated.php:235 msgid "Male" msgstr "Man" @@ -4875,11 +4909,11 @@ "Gebruiker niet gevonden of email adres onbekend of gebruiker kan niet " "gereset worden." -#: classes/Gems/Util/DbLookup.php:452 +#: classes/Gems/Util/DbLookup.php:457 msgid "inactive" msgstr "inactief" -#: classes/Gems/Util/DbLookup.php:453 +#: classes/Gems/Util/DbLookup.php:458 msgid "source inactive" msgstr "bron inactief" @@ -4963,91 +4997,91 @@ msgid "never" msgstr "nooit" -#: classes/Gems/Util/Translated.php:143 +#: classes/Gems/Util/Translated.php:148 msgid "2 days ago" msgstr "Eergisteren" -#: classes/Gems/Util/Translated.php:146 +#: classes/Gems/Util/Translated.php:151 msgid "Yesterday" msgstr "Gisteren" -#: classes/Gems/Util/Translated.php:149 +#: classes/Gems/Util/Translated.php:154 msgid "Today" msgstr "Vandaag" -#: classes/Gems/Util/Translated.php:152 +#: classes/Gems/Util/Translated.php:157 msgid "Tomorrow" msgstr "Morgen" -#: classes/Gems/Util/Translated.php:155 +#: classes/Gems/Util/Translated.php:160 msgid "Over 2 days" msgstr "Overmorgen" -#: classes/Gems/Util/Translated.php:160 +#: classes/Gems/Util/Translated.php:165 #, php-format msgid "Over %d days" msgstr "Over %d dagen" -#: classes/Gems/Util/Translated.php:162 +#: classes/Gems/Util/Translated.php:167 #, php-format msgid "%d days ago" msgstr "%d dagen terug" -#: classes/Gems/Util/Translated.php:190 +#: classes/Gems/Util/Translated.php:192 #, php-format msgid "%d days %d:%s:%s" msgstr "%d dagen %d:%s:%s" -#: classes/Gems/Util/Translated.php:192 +#: classes/Gems/Util/Translated.php:194 #, php-format msgid "%d:%s:%s" msgstr "%d:%s:%s" -#: classes/Gems/Util/Translated.php:194 +#: classes/Gems/Util/Translated.php:196 #, php-format msgid "%d:%s" msgstr "%d:%s" -#: classes/Gems/Util/Translated.php:206 +#: classes/Gems/Util/Translated.php:208 msgid "Send multiple mails per respondent, one for each checked token." msgstr "Verstuur meerdere emails per patiënt, één per gekozen kenmerk." -#: classes/Gems/Util/Translated.php:207 +#: classes/Gems/Util/Translated.php:209 msgid "Send one mail per respondent, mark all checked tokens as send." msgstr "" "Verstuur één email per patiënt, zet alle gekozen kenmerken op verzonden." -#: classes/Gems/Util/Translated.php:208 +#: classes/Gems/Util/Translated.php:210 msgid "Send one mail per respondent, mark only mailed tokens as send." msgstr "" "Verstuur één email per patiënt, zet alleen de verzonden kenmerken op " "verzonden." -#: classes/Gems/Util/Translated.php:233 +#: classes/Gems/Util/Translated.php:235 msgid "Unknown" msgstr "Onbekend" -#: classes/Gems/Util/Translated.php:246 +#: classes/Gems/Util/Translated.php:248 msgid "mr." msgstr "meneer" -#: classes/Gems/Util/Translated.php:246 +#: classes/Gems/Util/Translated.php:248 msgid "mrs." msgstr "mevrouw" -#: classes/Gems/Util/Translated.php:246 +#: classes/Gems/Util/Translated.php:248 msgid "mr./mrs." msgstr "heer/mevrouw" -#: classes/Gems/Util/Translated.php:259 +#: classes/Gems/Util/Translated.php:261 msgid "Mr." msgstr "De heer" -#: classes/Gems/Util/Translated.php:259 +#: classes/Gems/Util/Translated.php:261 msgid "Mrs." msgstr "Mevrouw" -#: classes/Gems/Util/Translated.php:259 +#: classes/Gems/Util/Translated.php:261 msgid "Mr./Mrs." msgstr "De heer/Mevrouw" @@ -5416,7 +5450,7 @@ msgstr "" "Deze organisatie heeft geen patiënten. Kies een organisatie met patiënten." -#: snippets/Organization/ChooseOrganizationSnippet.php:105 +#: snippets/Organization/ChooseOrganizationSnippet.php:101 msgid "This organization cannot have any respondents." msgstr "Deze organisatie heeft geen patiënten." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |