From: <gem...@li...> - 2012-02-14 14:36:56
|
Revision: 473 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=473&view=rev Author: mennodekker Date: 2012-02-14 14:36:43 +0000 (Tue, 14 Feb 2012) Log Message: ----------- Merged revision(s) 458-472 from branches/1.5.x: Fixed recalc problem: always saving the completion time, even when it was the same as before ........ Fixed #55: Do not allow reset email when person has no email ........ ........ Icons for track rounds ........ Standard button use for BrowseEditAction.php Added Icons for track rounds ........ Icons for track rounds ........ Removed reference to getPhysician() ........ Small corrections ........ Version numbers update to 1.5.1 Track fields with code names added to mail template variables New _layoutLogin moved to GemsEscort ........ Fix E_NOTICE ........ Fixed crash on respondent/show without pr.respondent.result ........ Merge r467 from 1.5.0-pulse ........ updated translations ........ minor display fixes and added login to project.ini ........ Hide 'salt' from project information overview ........ Revision Links: -------------- http://gemstracker.svn.sourceforge.net/gemstracker/?rev=467&view=rev Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Default/MailJobAction.php trunk/library/classes/Gems/Default/ProjectInformationAction.php trunk/library/classes/Gems/Default/RespondentAction.php trunk/library/classes/Gems/Email/EmailFormAbstract.php trunk/library/classes/Gems/Html.php trunk/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php trunk/library/classes/Gems/Tracker/Model/StandardTokenModel.php trunk/library/classes/Gems/Tracker/Token.php trunk/library/classes/Gems/Tracker.php trunk/library/classes/Gems/Upgrades.php trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php trunk/library/classes/Gems/Versions.php trunk/library/classes/GemsEscort.php trunk/library/classes/MUtil/Model/FormBridge.php trunk/library/classes/MUtil/Version.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__rounds.40.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 trunk/library/snippets/RespondentTokenSnippet.php trunk/library/snippets/ShowRoundStepSnippet.php trunk/library/snippets/TrackSurveyOverviewSnippet.php trunk/library/snippets/TrackTokenOverviewSnippet.php trunk/new_project/application/configs/project.ini trunk/new_project/htdocs/gems/css/gems-new.css Added Paths: ----------- trunk/library/classes/MUtil/Form/Element/Multiselect.php trunk/library/classes/MUtil/Form/Element/Select.php trunk/library/classes/MUtil/View/Helper/FormSelectHtml.php Property Changed: ---------------- trunk/ trunk/library/ Property changes on: trunk ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse:306-430 /branches/1.5.x:426-455 /tags/1.5.0beta1:305 + /branches/1.5.0-pulse:306-430,467 /branches/1.5.x:426-455,458-472 /tags/1.5.0beta1:305 Property changes on: trunk/library ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/library:306-344,346 /branches/1.5.x/library:426-455 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 + /branches/1.5.0-pulse/library:306-344,346,467 /branches/1.5.x/library:426-455,458-472 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-02-14 14:36:43 UTC (rev 473) @@ -186,11 +186,16 @@ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { // Add edit button if allowed, otherwise show, again if allowed - if ($menuItem = $this->findAllowedMenuItem('edit', 'show')) { + if ($menuItem = $this->findAllowedMenuItem('show')) { $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); } parent::addBrowseTableColumns($bridge, $model); + + // Add edit button if allowed, otherwise show, again if allowed + if ($menuItem = $this->findAllowedMenuItem('edit')) { + $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); + } } /** @@ -959,7 +964,12 @@ $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1))); $table->setRepeater($repeater); $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign')); + + if ($menuItem = $this->findAllowedMenuItem('edit')) { + $table->tbody()->onclick = array('location.href=\'', $menuItem->toHRefAttribute($this->getRequest()), '\';'); + } + $this->html[] = $table; } } Modified: trunk/library/classes/Gems/Default/MailJobAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailJobAction.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Default/MailJobAction.php 2012-02-14 14:36:43 UTC (rev 473) @@ -111,7 +111,7 @@ $model->set('gmj_from_fixed', 'label', $this->_('From other'), 'description', sprintf($this->_("Only when '%s' is '%s'."), $model->get('gmj_from_method', 'label'), end($fromMethods))); } - $model->set('gmj_process_method', 'label', $this->_('Processing Method'), 'multiOptions', $unselected + $translated->getBulkMailProcessOptions()); + $model->set('gmj_process_method', 'label', $this->_('Processing Method'), 'default', 'O', 'multiOptions', $translated->getBulkMailProcessOptions()); $model->set('gmj_filter_mode', 'label', $this->_('Filter for'), 'multiOptions', $unselected + $this->getBulkMailFilterOptions()); $model->set('gmj_filter_days_between', 'label', $this->_('Days between reminders'), 'validators[]', 'Digits'); Modified: trunk/library/classes/Gems/Default/ProjectInformationAction.php =================================================================== --- trunk/library/classes/Gems/Default/ProjectInformationAction.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Default/ProjectInformationAction.php 2012-02-14 14:36:43 UTC (rev 473) @@ -202,8 +202,12 @@ public function projectAction() { - $project = $this->project; + //Clone the object, we don't want to modify the original + $project = clone $this->escort->project; + + //Now remove some keys want want to keep for ourselves unset($project['admin']); + unset($project['salt']); $this->html->h2($this->_('Project settings')); $this->_showTable(GEMS_PROJECT_NAME . 'Project.ini', $project); Modified: trunk/library/classes/Gems/Default/RespondentAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentAction.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-02-14 14:36:43 UTC (rev 473) @@ -148,7 +148,7 @@ $bridge->addDate( 'grs_birthday', 'jQueryParams', array('defaultDate' => '-30y', 'maxDate' => 0, 'yearRange' => ($year - 130) . ':' . $year)) ->addValidator(new MUtil_Validate_Date_DateBefore()); - $bridge->addSelect( 'gr2o_id_physician'); + //$bridge->addSelect( 'gr2o_id_physician'); $bridge->addText( 'gr2o_treatment', 'size', 30, 'description', $this->_('DBC\'s, etc...')); $bridge->addTextarea('gr2o_comments', 'rows', 4, 'cols', 60); @@ -202,7 +202,6 @@ if ($detailed) { $model->set('gr2o_comments', 'label', $this->_('Comments')); - $model->set('gr2o_id_physician', 'label', $this->_('Physician'), 'multiOptions', MUtil_Lazy::call(array($this, 'getPhysicians'))); $model->set('gr2o_treatment', 'label', $this->_('Treatment')); $model->addColumn('CASE WHEN grs_email IS NULL OR LENGTH(TRIM(grs_email)) = 0 THEN 1 ELSE 0 END', 'calc_email'); @@ -405,4 +404,4 @@ $params['respondentData'] = $data; $this->addSnippets($this->showSnippets, $params); } -} \ No newline at end of file +} Modified: trunk/library/classes/Gems/Email/EmailFormAbstract.php =================================================================== --- trunk/library/classes/Gems/Email/EmailFormAbstract.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Email/EmailFormAbstract.php 2012-02-14 14:36:43 UTC (rev 473) @@ -54,7 +54,7 @@ */ protected $escort; - protected $messages; + protected $messages = array(); protected $model; Modified: trunk/library/classes/Gems/Html.php =================================================================== --- trunk/library/classes/Gems/Html.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Html.php 2012-02-14 14:36:43 UTC (rev 473) @@ -1,49 +1,49 @@ <?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. - */ - + /** - * File description of Gems_Html + * Copyright (c) 2011, Erasmus MC + * All rights reserved. * - * @author Matijs de Jong <mj...@ma...> - * @since 1.0 - * @version 1.4 - * @package Gems + * 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 Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** - * Class description of Gems_Html + * Gems specific Html elements and settings * - * @author Matijs de Jong <mj...@ma...> - * @package Gems + * @package Gems * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 */ class Gems_Html { @@ -87,6 +87,7 @@ // Set the image directories MUtil_Html_ImgElement::addImageDir('gems/images'); + MUtil_Html_ImgElement::addImageDir('gems/icons'); $escort = GemsEscort::getInstance(); if (isset($escort->project->imagedir)) { MUtil_Html_ImgElement::addImageDir($escort->project->imagedir); @@ -146,7 +147,7 @@ } else { $args['class'] = new MUtil_Html_ClassArrayAttribute('browselink'); } - + // MUtil_Echo::r($args); $pager = new MUtil_Html_PagePanel($panel_args); Modified: trunk/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php 2012-02-14 14:36:43 UTC (rev 473) @@ -54,6 +54,26 @@ */ public $loader; + protected function addTokenLinks(MUtil_Model_TableBridge $bridge) + { + $title = MUtil_Html::create()->strong($this->_('+')); + + $showLinks[] = $this->createMenuLink($bridge, 'track', 'show', $title); + $showLinks[] = $this->createMenuLink($bridge, 'survey', 'show', $title); + + // Remove nulls + $showLinks = array_filter($showLinks); + + if ($showLinks) { + foreach ($showLinks as $showLink) { + if ($showLink) { + $showLink->title = array($this->_('Token'), $bridge->gto_id_token->strtoupper()); + } + } + } + $bridge->addItemLink($showLinks); + } + /** * Creates the model * @@ -71,10 +91,12 @@ 'calc_valid_from', 'gto_valid_from'); $model->addColumn( - 'CASE WHEN gto_completion_time IS NULL THEN gto_id_token ELSE NULL END', + 'CASE WHEN gto_completion_time IS NULL AND grc_success = 1 AND gto_valid_from <= CURRENT_TIMESTAMP AND gto_completion_time IS NULL AND (gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP) THEN gto_id_token ELSE NULL END', 'calc_id_token', 'gto_id_token'); - + $model->addColumn( + 'CASE WHEN gto_completion_time IS NULL AND grc_success = 1 AND gto_valid_from <= CURRENT_TIMESTAMP AND gto_completion_time IS NULL AND gto_valid_until < CURRENT_TIMESTAMP THEN 1 ELSE 0 END', + 'was_missed'); return $model; } Modified: trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-14 14:36:43 UTC (rev 473) @@ -438,6 +438,7 @@ $model->set('gro_id_survey'); $model->set('gro_round_description'); $model->set('gro_id_order'); + $model->set('gro_icon_file'); // Calculate valid from $model->set('valid_after', 'elementClass', 'html', 'label', ' ', 'value', MUTil_Html::create()->h4($this->_('Valid from calculation'))); Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-02-14 14:36:43 UTC (rev 473) @@ -112,6 +112,12 @@ protected $util; /** + * + * @var Zend_View + */ + protected $view; + + /** * Copy from Zend_Translate_Adapter * * Translates the given string @@ -191,6 +197,27 @@ } /** + * Returns a list of available icons under 'htdocs/pulse/icons' + * @return string[] + */ + protected function _getAvailableIcons() + { + $icons = array(); + $iterator = new DirectoryIterator(realpath(GEMS_WEB_DIR . '/gems/icons')); + + foreach ($iterator as $fileinfo) { + if ($fileinfo->isFile()) { + // $icons[$fileinfo->getFilename()] = $fileinfo->getFilename(); + $filename = $fileinfo->getFilename(); + $url = $this->view->baseUrl() . MUtil_Html_ImgElement::getImageDir($filename); + $icons[$fileinfo->getFilename()] = MUtil_Html::create('span', $filename, array('style' => 'background: transparent url(' . $url . $filename . ') center right no-repeat; padding-right: 20px;')); + } + } + + return $icons; + } + + /** * Update the track, both in the database and in memory. * * @param array $values The values that this token should be set to @@ -707,17 +734,29 @@ } $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'); - if ($action == 'create') { - $this->_ensureRounds(); + switch ($action) { + case 'create': + $this->_ensureRounds(); - if ($this->_rounds && ($round = end($this->_rounds))) { - $model->set('gro_id_order', 'default', $round['gro_id_order'] + 10); - } + if ($this->_rounds && ($round = end($this->_rounds))) { + $model->set('gro_id_order', 'default', $round['gro_id_order'] + 10); + } + // Intentional fall through + // break; + case 'edit': + $model->set('gro_icon_file', 'multiOptions', $this->util->getTranslated()->getEmptyDropdownArray() + $this->_getAvailableIcons()); + break; + + default: + $model->set('gro_icon_file', 'formatFunction', array('MUtil_Html_ImgElement', 'imgFile')); + break; + } return $model; Modified: trunk/library/classes/Gems/Tracker/Model/StandardTokenModel.php =================================================================== --- trunk/library/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-14 14:36:43 UTC (rev 473) @@ -167,10 +167,16 @@ } //If we are allowed to see who filled out a survey, modify the model accordingly - if (GemsEscort::getInstance()->hasPrivilege('pr.respondent.who')) { + $escort = GemsEscort::getInstance(); + if ($escort->hasPrivilege('pr.respondent.who')) { $this->addLeftTable('gems__staff', array('gto_by' => 'gems__staff_2.gsf_id_user')); $this->addColumn('CASE WHEN gems__staff_2.gsf_id_user IS NULL THEN ggp_name ELSE COALESCE(CONCAT_WS(" ", CONCAT(COALESCE(gems__staff_2.gsf_last_name,"-"),","), gems__staff_2.gsf_first_name, gems__staff_2.gsf_surname_prefix)) END', 'ggp_name'); } + if ($escort->hasPrivilege('pr.respondent.result')) { + $this->addColumn('gto_result', 'calc_result', 'gto_result'); + } else { + $this->addColumn(new Zend_Db_Expr('NULL'), 'calc_result', 'gto_result'); + } $this->useTokenAsKey(); } Modified: trunk/library/classes/Gems/Tracker/Token.php =================================================================== --- trunk/library/classes/Gems/Tracker/Token.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Tracker/Token.php 2012-02-14 14:36:43 UTC (rev 473) @@ -349,6 +349,8 @@ //Set completion time for completion event if ($setCompletionTime) { $values['gto_completion_time'] = $complTime->toString(Gems_Tracker::DB_DATETIME_FORMAT); + //Save the old value + $originalCompletionTime = $this->_gemsData['gto_completion_time']; $this->_gemsData['gto_completion_time'] = $values['gto_completion_time']; } @@ -364,8 +366,8 @@ } if ($setCompletionTime) { - //Make sure to unset otherwise it won't get saved - $this->_gemsData['gto_completion_time'] = null; + //Reset to old value, so changes will be picked up + $this->_gemsData['gto_completion_time'] = $originalCompletionTime; } $values['gto_duration_in_sec'] = max($complTime->diffSeconds($startTime), 0); @@ -1233,4 +1235,4 @@ public function cacheSet($key, $value) { $this->_cache[$key] = $value; } -} +} \ No newline at end of file Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Tracker.php 2012-02-14 14:36:43 UTC (rev 473) @@ -168,7 +168,7 @@ */ private function _checkUserId($userId = null) { if (empty($userId)) { - $userId = $this->session->user_id; + $userId = isset($this->session->user_id) ? $this->session->user_id : 0; } return $userId; } Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Upgrades.php 2012-02-14 14:36:43 UTC (rev 473) @@ -66,9 +66,9 @@ */ public function Upgrade143to15() { - $this->addMessage($this->_('Executing patchlevel 42')); + $this->addMessage(sprintf($this->_('Executing patchlevel %d'),42)); $this->patcher->executePatch(42); - $this->addMessage($this->_('Executing patchlevel 43')); + $this->addMessage(sprintf($this->_('Executing patchlevel %d'),43)); $this->patcher->executePatch(43); $this->invalidateCache(); Modified: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php =================================================================== --- trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-02-14 14:36:43 UTC (rev 473) @@ -71,7 +71,14 @@ { if ($user) { // Depends on the user. - return $user->hasEmailAddress() && $user->canSetPassword(); + if ($user->hasEmailAddress() && $user->canSetPassword()) { + $email = $user->getEmailAddress(); + if (empty($email)) { + return false; + } else { + return true; + } + } } else { return true; } Modified: trunk/library/classes/Gems/Versions.php =================================================================== --- trunk/library/classes/Gems/Versions.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/Gems/Versions.php 2012-02-14 14:36:43 UTC (rev 473) @@ -43,12 +43,12 @@ { public final function getBuild() { - return 43; + return 44; } public final function getGemsVersion() { - return '1.5'; + return '1.5.1'; } public function getProjectVersion() Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/GemsEscort.php 2012-02-14 14:36:43 UTC (rev 473) @@ -719,12 +719,42 @@ } /** + * Display either a link to the login screen or displays the name of the current user + * and a logoff link. + * * 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. * * @return mixed If null nothing is set, otherwise the name of * the function is used as Zend_View variable name. */ + protected function _layoutLogin(array $args = null) + { + $user = $this->getLoader()->getCurrentUser(); + + $div = MUtil_Html::create('div', array('id' => 'login'), $args); + + $p = $div->p(); + if ($user->isActive()) { + $p->append(sprintf($this->_('You are logged in as %s'), $user->getFullName())); + $item = $this->menu->findFirst(array($this->request->getControllerKey() => 'index', $this->request->getActionKey() => 'logoff')); + $p->a($item->toHRefAttribute(), $this->_('Logoff'), array('class' => 'logout')); + } else { + $item = $this->menu->findFirst(array($this->request->getControllerKey() => 'index', $this->request->getActionKey() => 'login')); + $p->a($item->toHRefAttribute(), $this->_('You are not logged in'), array('class' => 'logout')); + } + $item->set('visible', false); + + return $div; + } + + /** + * 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. + * + * @return mixed If null nothing is set, otherwise the name of + * the function is used as Zend_View variable name. + */ protected function _layoutMessages(array $args = null) { // Do not trust $messenger being set in the view, @@ -1609,6 +1639,13 @@ return $this; } + /** + * Returns an array of {field_names} => values for this token for + * use in an e-mail tamplate. + * + * @param array $tokenData + * @return array + */ public function tokenMailFields(array $tokenData) { $locale = isset($tokenData['grs_iso_lang']) ? $tokenData['grs_iso_lang'] : $this->locale; @@ -1668,6 +1705,19 @@ $result['{track}'] = $tokenData['gtr_track_name']; + $join = $this->db->quoteInto('gtf_id_field = gr2t2f_id_field AND gr2t2f_id_respondent_track = ?', $tokenData['gto_id_respondent_track']); + $select = $this->db->select(); + $select->from('gems__track_fields', array(new Zend_Db_Expr("CONCAT('{track.', gtf_field_code, '}')"))) + ->joinLeft('gems__respondent2track2field', $join, array('gr2t2f_value')) + ->distinct() + ->where('gtf_field_code IS NOT NULL') + ->order('gtf_field_code'); + $codes = $this->db->fetchPairs($select); + + $result = $result + $codes; + // MUtil_Echo::track($codes); + + return $result; } } Copied: trunk/library/classes/MUtil/Form/Element/Multiselect.php (from rev 472, branches/1.5.x/library/classes/MUtil/Form/Element/Multiselect.php) =================================================================== --- trunk/library/classes/MUtil/Form/Element/Multiselect.php (rev 0) +++ trunk/library/classes/MUtil/Form/Element/Multiselect.php 2012-02-14 14:36:43 UTC (rev 473) @@ -0,0 +1,54 @@ +<?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 Form + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: MultiselectRaw.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Add Html labels to standard parent + * + * @package MUtil + * @subpackage Form + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class MUtil_Form_Element_Multiselect extends Zend_Form_Element_Multiselect +{ + /** + * Use formSelect view helper by default + * @var string + */ + public $helper = 'formSelectHtml'; +} Copied: trunk/library/classes/MUtil/Form/Element/Select.php (from rev 472, branches/1.5.x/library/classes/MUtil/Form/Element/Select.php) =================================================================== --- trunk/library/classes/MUtil/Form/Element/Select.php (rev 0) +++ trunk/library/classes/MUtil/Form/Element/Select.php 2012-02-14 14:36:43 UTC (rev 473) @@ -0,0 +1,54 @@ +<?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 Form + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: Select.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Add Html labels to standard parent + * + * @package MUtil + * @subpackage Form + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class MUtil_Form_Element_Select extends Zend_Form_Element_Select +{ + /** + * Use formSelect view helper by default + * @var string + */ + public $helper = 'formSelectHtml'; +} Modified: trunk/library/classes/MUtil/Model/FormBridge.php =================================================================== --- trunk/library/classes/MUtil/Model/FormBridge.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/MUtil/Model/FormBridge.php 2012-02-14 14:36:43 UTC (rev 473) @@ -553,7 +553,7 @@ $options = $this->_mergeOptions($name, $options, self::DISPLAY_OPTIONS, self::MULTI_OPTIONS); - $element = new Zend_Form_Element_Select($name, $options); + $element = new MUtil_Form_Element_Select($name, $options); return $this->_addToForm($name, $element); } @@ -603,7 +603,7 @@ $options = $this->_mergeOptions($name, $options, self::DISPLAY_OPTIONS, self::MULTI_OPTIONS); - $element = new Zend_Form_Element_Multiselect($name, $options); + $element = new MUtil_Form_Element_Multiselect($name, $options); return $this->_addToForm($name, $element); } Modified: trunk/library/classes/MUtil/Version.php =================================================================== --- trunk/library/classes/MUtil/Version.php 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/classes/MUtil/Version.php 2012-02-14 14:36:43 UTC (rev 473) @@ -34,7 +34,7 @@ { const MAJOR = 1; const MINOR = 0; - const BUILD = 30; + const BUILD = 31; public static function get() { Copied: trunk/library/classes/MUtil/View/Helper/FormSelectHtml.php (from rev 472, branches/1.5.x/library/classes/MUtil/View/Helper/FormSelectHtml.php) =================================================================== --- trunk/library/classes/MUtil/View/Helper/FormSelectHtml.php (rev 0) +++ trunk/library/classes/MUtil/View/Helper/FormSelectHtml.php 2012-02-14 14:36:43 UTC (rev 473) @@ -0,0 +1,132 @@ +<?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 View + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: FormSelectHtml.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package MUtil + * @subpackage View + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class MUtil_View_Helper_FormSelectHtml extends Zend_View_Helper_FormSelect +{ + /** + * Builds the actual <option> tag + * + * @param string $value Options Value + * @param string $label Options Label + * @param array $selected The option value(s) to mark as 'selected' + * @param array|bool $disable Whether the select is disabled, or individual options are + * @return string Option Tag XHTML + */ + protected function _build($value, $label, $selected, $disable) + { + if (is_bool($disable)) { + $disable = array(); + } + + $opt = '<option' + . ' value="' . $this->view->escape($value) . '"'; + + if ($label instanceof MUtil_Html_HtmlElement) { + // Element not allowed, get parts that are allowed + foreach (array('class', 'dir', 'id', 'label', 'lang', 'style', 'title') as $attr) { + if (isset($label->$attr)) { + $opt .= ' ' . $attr . '="' . $this->view->escape($label->$attr) . '"'; + } + } + + // Now get the content + $renderer = MUtil_Html::getRenderer(); + $content = ''; + foreach ($label->getIterator() as $part) { + $content .= $renderer->renderAny($this->view, $part); + } + + } elseif ($label instanceof MUtil_Html_HtmlInterface) { + $content = $label->render($this->view); + } else { + $content = $this->view->escape($label); + $opt .= ' label="' . $this->view->escape($label) . '"'; + + } + + // selected? + if (in_array((string) $value, $selected)) { + $opt .= ' selected="selected"'; + } + + // disabled? + if (in_array($value, $disable)) { + $opt .= ' disabled="disabled"'; + } + + $opt .= '>' . $content . "</option>"; + + return $opt; + } + /** + * Generates 'select' list of options. + * + * @access public + * + * @param string|array $name If a string, the element name. If an + * array, all other parameters are ignored, and the array elements + * are extracted in place of added parameters. + * + * @param mixed $value The option value to mark as 'selected'; if an + * array, will mark all values in the array as 'selected' (used for + * multiple-select elements). + * + * @param array|string $attribs Attributes added to the 'select' tag. + * + * @param array $options An array of key-value pairs where the array + * key is the radio value, and the array value is the radio text. + * + * @param string $listsep When disabled, use this list separator string + * between list values. + * + * @return string The select tag and options XHTML. + */ + public function formSelectHtml($name, $value = null, $attribs = null, + $options = null, $listsep = "<br />\n") + { + return parent::formSelect($name, $value, $attribs, $options, $listsep); + } +} Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/configs/db/patches.sql 2012-02-14 14:36:43 UTC (rev 473) @@ -364,4 +364,8 @@ -- PATCH: Default userdefinition per organization ALTER TABLE gems__organizations ADD `gor_user_class` VARCHAR( 30 ) NOT NULL DEFAULT 'StaffUser' AFTER `gor_code`; -ALTER TABLE `gems__radius_config` CHANGE `grcfg_ip` `grcfg_ip` VARCHAR( 39 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL \ No newline at end of file +ALTER TABLE `gems__radius_config` CHANGE `grcfg_ip` `grcfg_ip` VARCHAR( 39 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL + +-- GEMS VERSION: 44 +-- PATCH: Add icon field to rounds +ALTER TABLE `gems__rounds` ADD gro_icon_file VARCHAR(100) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null AFTER `gro_round_description`; Modified: trunk/library/configs/db/tables/gems__rounds.40.sql =================================================================== --- trunk/library/configs/db/tables/gems__rounds.40.sql 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/configs/db/tables/gems__rounds.40.sql 2012-02-14 14:36:43 UTC (rev 473) @@ -12,6 +12,7 @@ gro_survey_name varchar(100) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, 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, -- depreciated Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-02-14 14:03:35 UTC (rev 472) +++ trunk/library/languages/default-en.po 2012-02-14 14:36:43 UTC (rev 473) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-01-24 12:42+0100\n" +"POT-Creation-Date: 2012-02-14 10:57+0100\n" "PO-Revision-Date: \n" "Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -18,58 +18,72 @@ "X-Poedit-KeywordsList: plural:1,2\n" "X-Poedit-SearchPath-0: .\n" -#: classes/GemsEscort.php:207 +#: classes/GemsEscort.php:211 #, php-format msgid "Path %s not writable" msgstr "Path %s not writable" -#: classes/GemsEscort.php:893 +#: classes/GemsEscort.php:739 #, php-format +msgid "You are logged in as %s" +msgstr "You are logged in as %s" + +#: classes/GemsEscort.php:741 +#: classes/Gems/Menu.php:248 +msgid "Logoff" +msgstr "Logoff" + +#: classes/GemsEscort.php:744 +msgid "You are not logged in" +msgstr "You are not logged in" + +#: classes/GemsEscort.php:927 +#, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:918 +#: classes/GemsEscort.php:952 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1349 +#: classes/GemsEscort.php:1383 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:1479 +#: classes/GemsEscort.php:1513 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1481 -#: classes/GemsEscort.php:1485 -#: classes/GemsEscort.php:1486 +#: classes/GemsEscort.php:1515 +#: classes/GemsEscort.php:1519 +#: classes/GemsEscort.php:1520 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1496 +#: classes/GemsEscort.php:1530 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1498 -#: classes/GemsEscort.php:1540 +#: classes/GemsEscort.php:1532 +#: classes/GemsEscort.php:1574 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1514 +#: classes/GemsEscort.php:1548 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1516 +#: classes/GemsEscort.php:1550 #, 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:1526 -#: classes/GemsEscort.php:1538 +#: classes/GemsEscort.php:1560 +#: classes/GemsEscort.php:1572 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1527 +#: classes/GemsEscort.php:1561 msgid "You must login to access this page." msgstr "You must login to access this page." @@ -81,31 +95,31 @@ msgid "Combination of organization, username and password not found." msgstr "Combination of organization, username and password not found." -#: classes/Gems/Html.php:154 +#: classes/Gems/Html.php:155 msgid "<< First" msgstr "<< First" -#: classes/Gems/Html.php:155 +#: classes/Gems/Html.php:156 msgid "< Previous" msgstr "< Previous" -#: classes/Gems/Html.php:156 +#: classes/Gems/Html.php:157 msgid "Next >" msgstr "Next >" -#: classes/Gems/Html.php:157 +#: classes/Gems/Html.php:158 msgid "Last >>" msgstr "Last >>" -#: classes/Gems/Html.php:158 +#: classes/Gems/Html.php:159 msgid " | " msgstr " | " -#: classes/Gems/Html.php:162 +#: classes/Gems/Html.php:163 msgid "to" msgstr "to" -#: classes/Gems/Html.php:163 +#: classes/Gems/Html.php:164 msgid "of" msgstr "of" @@ -251,10 +265,6 @@ msgid "Token" msgstr "Token" -#: classes/Gems/Menu.php:248 -msgid "Logoff" -msgstr "Logoff" - #: classes/Gems/Menu.php:283 msgid "Track" msgstr "Track" @@ -413,114 +423,138 @@ msgid "Checks performed" msgstr "Checks performed" -#: classes/Gems/UpgradesAbstract.php:164 +#: classes/Gems/Upgrades.php:69 +#: classes/Gems/Upgrades.php:71 +#, php-format +msgid "Executing patchlevel %d" +msgstr "Executing patchlevel %d" + +#: classes/Gems/Upgrades.php:76 +msgid "Creating new tables" +msgstr "Creating new tables" + +#: classes/Gems/Upgrades.php:81 +msgid "Syncing surveys for all sources" +msgstr "Syncing surveys for all sources" + +#: classes/Gems/UpgradesAbstract.php:175 +#, php-format +msgid "Finished %s creation script for object %d of %d" +msgstr "Finished %s creation script for object %d of %d" + +#: classes/Gems/UpgradesAbstract.php:206 msgid "Already at max. level." msgstr "Already at max. level." -#: classes/Gems/UpgradesAbstract.php:171 +#: classes/Gems/UpgradesAbstract.php:213 #, php-format msgid "Trying upgrade for %s from level %s to level %s" msgstr "Trying upgrade for %s from level %s to level %s" -#: classes/Gems/UpgradesAbstract.php:179 +#: classes/Gems/UpgradesAbstract.php:221 #, php-format msgid "Trying upgrade for %s to level %s: %s" msgstr "Trying upgrade for %s to level %s: %s" -#: classes/Gems/UpgradesAbstract.php:337 +#: classes/Gems/UpgradesAbstract.php:379 msgid "Cache cleaned" msgstr "Cache cleaned" -#: classes/Gems/Controller/BrowseEditAction.php:346 +#: classes/Gems/Controller/BrowseEditAction.php:352 #, php-format msgid "New %s..." msgstr "New %s..." -#: classes/Gems/Controller/BrowseEditAction.php:378 +#: classes/Gems/Controller/BrowseEditAction.php:385 #, php-format msgid "Delete %s" msgstr "Delete %s" -#: classes/Gems/Controller/BrowseEditAction.php:382 +#: classes/Gems/Controller/BrowseEditAction.php:389 #, php-format msgid "%2$u %1$s deleted" msgstr "%2$u %1$s deleted" -#: classes/Gems/Controller/BrowseEditAction.php:396 +#: classes/Gems/Controller/BrowseEditAction.php:403 #, php-format msgid "Edit %s" msgstr "Edit %s" -#: classes/Gems/Controller/BrowseEditAction.php:493 +#: classes/Gems/Controller/BrowseEditAction.php:500 msgid "Free search text" msgstr "Free search text" -#: classes/Gems/Controller/BrowseEditAction.php:564 +#: classes/Gems/Controller/BrowseEditAction.php:571 msgid "Search" msgstr "Search" -#: classes/Gems/Controller/BrowseEditAction.php:580 +#: classes/Gems/Controller/BrowseEditAction.php:587 #, php-format msgid "No %s found" msgstr "No %s found" -#: classes/Gems/Controller/BrowseEditAction.php:653 +#: classes/Gems/Controller/BrowseEditAction.php:660 +#: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "No %s found." -#: classes/Gems/Controller/BrowseEditAction.php:768 +#: classes/Gems/Controller/BrowseEditAction.php:778 msgid "Are you sure?" msgstr "Are you sure?" -#: classes/Gems/Controller/BrowseEditAction.php:784 +#: classes/Gems/Controller/BrowseEditAction.php:794 +#: classes/Gems/Default/DatabaseAction.php:171 +#: classes/Gems/Default/DatabaseAction.php:483 msgid "Yes" msgstr "Yes" -#: classes/Gems/Controller/BrowseEditAction.php:785 +#: classes/Gems/Controller/BrowseEditAction.php:795 +#: classes/Gems/Default/DatabaseAction.php:172 +#: classes/Gems/Default/DatabaseAction.php:484 msgid "No" msgstr "No" -#: classes/Gems/Controller/BrowseEditAction.php:838 +#: classes/Gems/Controller/BrowseEditAction.php:848 #, php-format msgid "Unknown %s requested" msgstr "Unknown %s requested" -#: classes/Gems/Controller/BrowseEditAction.php:861 +#: classes/Gems/Controller/BrowseEditAction.php:871 #, php-format msgid "New %1$s..." msgstr "New %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:869 +#: classes/Gems/Controller/BrowseEditAction.php:879 msgid "Save" msgstr "Save" -#: classes/Gems/Controller/BrowseEditAction.php:905 +#: classes/Gems/Controller/BrowseEditAction.php:915 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s saved" -#: classes/Gems/Controller/BrowseEditAction.php:908 +#: classes/Gems/Controller/BrowseEditAction.php:918 msgid "No changes to save." msgstr "No changes to save." -#: classes/Gems/Controller/BrowseEditAction.php:917 +#: classes/Gems/Controller/BrowseEditAction.php:927 msgid "Input error! No changes saved!" msgstr "Input error! No changes saved!" -#: classes/Gems/Controller/BrowseEditAction.php:945 +#: classes/Gems/Controller/BrowseEditAction.php:955 #, php-format msgid "Show %s" msgstr "Show %s" -#: classes/Gems/Controller/BrowseEditAction.php:952 +#: classes/Gems/Controller/BrowseEditAction.php:962 #, php-format msgid "Unknown %s." msgstr "Unknown %s." #: classes/Gems/Controller/ModelActionAbstract.php:97 #: classes/Gems/Default/AskAction.php:150 -#: classes/Gems/Default/DatabaseAction.php:532 +#: classes/Gems/Default/DatabaseAction.php:487 msgid "Cancel" msgstr "Cancel" @@ -634,7 +668,7 @@ msgstr "Description" #: classes/Gems/Default/ConsentAction.php:70 -#: classes/Gems/Default/DatabaseAction.php:167 +#: classes/Gems/Default/DatabaseAction.php:123 msgid "Order" msgstr "Order" @@ -700,306 +734,260 @@ msgid "On this test system all mail will be delivered to the from address." msgstr "On this test system all mail will be delivered to the from address." -#: classes/Gems/Default/DatabaseAction.php:64 -#, php-format -msgid "Executed %2$s creation script %1$s:" -msgstr "Executed %2$s creation script %1$s:" - -#: classes/Gems/Default/DatabaseAction.php:74 -#, php-format -msgid "%d record(s) returned as result set %d in step %d of %d." -msgstr "%d record(s) returned as result set %d in step %d of %d." - -#: classes/Gems/Default/DatabaseAction.php:78 -#, php-format -msgid "%d record(s) updated in step %d of %d." -msgstr "%d record(s) updated in step %d of %d." - -#: classes/Gems/Default/DatabaseAction.php:81 -#, php-format -msgid "Script ran step %d of %d succesfully." -msgstr "Script ran step %d of %d succesfully." - -#: classes/Gems/Default/DatabaseAction.php:84 -msgid " in step " -msgstr " in step " - #: classes/Gems/Default/DatabaseAction.php:89 #, php-format -msgid "No script for %1$s." -msgstr "No script for %1$s." - -#: classes/Gems/Default/DatabaseAction.php:133 -#, php-format msgid "No rows in %s." msgstr "No rows in %s." -#: classes/Gems/Default/DatabaseAction.php:162 +#: classes/Gems/Default/DatabaseAction.php:118 msgid "Type" msgstr "Type" -#: classes/Gems/Default/DatabaseAction.php:166 +#: classes/Gems/Default/DatabaseAction.php:122 msgid "Group" msgstr "Group" -#: classes/Gems/Default/DatabaseAction.php:168 +#: classes/Gems/Default/DatabaseAction.php:124 msgid "Location" msgstr "Location" -#: classes/Gems/Default/DatabaseAction.php:171 +#: classes/Gems/Default/DatabaseAction.php:127 msgid "Status" msgstr "Status" -#: classes/Gems/Default/DatabaseAction.php:172 -msgid "created" -msgstr "created" - -#: classes/Gems/Default/DatabaseAction.php:173 -msgid "not created" -msgstr "not created" - -#: classes/Gems/Default/DatabaseAction.php:174 -msgid "unknown" -msgstr "unknown" - -#: classes/Gems/Default/DatabaseAction.php:177 +#: classes/Gems/Default/DatabaseAction.php:130 msgid "Script" msgstr "Script" -#: classes/Gems/Default/DatabaseAction.php:179 +#: classes/Gems/Default/DatabaseAction.php:132 msgid "Changed on" msgstr "Changed on" -#: classes/Gems/Default/DatabaseAction.php:198 +#: classes/Gems/Default/DatabaseAction.php:151 msgid "This database object does not exist. You cannot delete it." msgstr "This database object does not exist. You cannot delete it." -#: classes/Gems/Default/DatabaseAction.php:203 +#: classes/Gems/Default/DatabaseAction.php:156 #, php-format msgid "Drop %s" msgstr "Drop %s" -#: classes/Gems/Default/DatabaseAction.php:211 +#: classes/Gems/Default/DatabaseAction.php:164 #, php-format msgid "There are %d rows in the table." msgstr "There are %d rows in the table." -#: classes/Gems/Default/DatabaseAction.php:213 +#: classes/Gems/Default/DatabaseAction.php:166 #, php-format msgid "Drop table with %d rows" msgstr "Drop table with %d rows" -#: classes/Gems/Default/DatabaseAction.php:214 +#: classes/Gems/Default/DatabaseAction.php:167 msgid "Are you really sure?" msgstr "Are you really sure?" -#: classes/Gems/Default/DatabaseAction.php:230 +#: classes/Gems/Default/DatabaseAction.php:183 #, php-format msgid "%1$s %2$s dropped" msgstr "%1$s %2$s dropped" -#: classes/Gems/Default/DatabaseAction.php:235 +#: classes/Gems/Default/DatabaseAction.php:188 msgid " during statement " msgstr " during statement " -#: classes/Gems/Default/DatabaseAction.php:246 +#: classes/Gems/Default/DatabaseAction.php:199 #, php-format msgid "%s no longer exists in the database." msgstr "%s no longer exists in the database." -#: classes/Gems/Default/DatabaseAction.php:249 +#: classes/Gems/Default/DatabaseAction.php:202 #, php-format msgid "%s does not yet exist in the database." msgstr "%s does not yet exist in the database." -#: classes/Gems/Default/DatabaseAction.php:252 +#: classes/Gems/Default/DatabaseAction.php:205 #, php-format msgid "%s object does exist." msgstr "%s object does exist." -#: classes/Gems/Default/DatabaseAction.php:270 +#: classes/Gems/Default/DatabaseAction.php:223 msgid "Object is not a table." msgstr "Object is not a table." -#: classes/Gems/Default/DatabaseAction.php:293 +#: classes/Gems/Default/DatabaseAction.php:246 msgid "Structure" msgstr "Structure" -#: classes/Gems/Default/DatabaseAction.php:302 +#: classes/Gems/Default/DatabaseAction.php:255 msgid "database object" msgid_plural "database objects" msgstr[0] "database object" msgstr[1] "database objects" -#: classes/Gems/Default/DatabaseAction.php:307 +#: classes/Gems/Default/DatabaseAction.php:260 msgid "Database object overview" msgstr "Database object overview" -#: classes/Gems/Default/DatabaseAction.php:316 -#: classes/Gems/Default/DatabaseAction.php:368 +#: classes/Gems/Default/DatabaseAction.php:269 +#: classes/Gems/Default/DatabaseAction.php:321 msgid "Level" msgstr "Level" -#: classes/Gems/Default/DatabaseAction.php:317 -#: classes/Gems/Default/DatabaseAction.php:369 +#: classes/Gems/Default/DatabaseAction.php:270 +#: classes/Gems/Default/DatabaseAction.php:322 msgid "Subtype" msgstr "Subtype" -#: classes/Gems/Default/DatabaseAction.php:319 +#: classes/Gems/Default/DatabaseAction.php:272 msgid "To be executed" msgstr "To be executed" -#: classes/Gems/Default/DatabaseAction.php:320 -#: classes/Gems/Default/DatabaseAction.php:372 +#: classes/Gems/Default/DatabaseAction.php:273 +#: classes/Gems/Default/DatabaseAction.php:325 msgid "Executed" msgstr "Executed" -#: classes/Gems/Default/DatabaseAction.php:321 -#: classes/Gems/Default/DatabaseAction.php:373 +#: classes/Gems/Default/DatabaseAction.php:274 +#: classes/Gems/Default/DatabaseAction.php:326 msgid "Finished" msgstr "Finished" -#: classes/Gems/Default/DatabaseAction.php:324 +#: classes/Gems/Default/DatabaseAction.php:277 msgid "Create the patch table!" msgstr "Create the patch table!" -#: classes/Gems/Default/DatabaseAction.php:326 +#: classes/Gems/Default/DatabaseAction.php:279 #, php-format msgid "%d new or changed patch(es)." msgstr "%d new or changed patch(es)." -#: classes/Gems/Default/DatabaseAction.php:331 +#: classes/Gems/Default/DatabaseAction.php:284 msgid "Gems build" msgstr "Gems build" -#: classes/Gems/Default/DatabaseAction.php:332 +#: classes/Gems/Default/DatabaseAction.php:285 msgid "Database build" msgstr "Database build" -#: classes/Gems/Default/DatabaseAction.php:334 +#: classes/Gems/Default/DatabaseAction.php:287 msgid "Execute level" msgstr "Execute level" -#: classes/Gems/Default/DatabaseAction.php:338 +#: classes/Gems/Default/DatabaseAction.php:291 msgid "Ignore finished" msgstr "Ignore finished" -#: classes/Gems/Default/DatabaseAction.php:339 +#: classes/Gems/Default/DatabaseAction.php:292 msgid "Ignore executed" msgstr "Ignore executed" -#: classes/Gems/Default/DatabaseAction.php:340 +#: classes/Gems/Default/DatabaseAction.php:293 msgid "Show patches" msgstr "Show patches" -#: classes/Gems/Default/DatabaseAction.php:354 +#: classes/Gems/Default/DatabaseAction.php:307 #, php-format msgid "%d patch(es) executed." msgstr "%d patch(es) executed." -#: classes/Gems/Default/DatabaseAction.php:367 +#: classes/Gems/Default/DatabaseAction.php:320 msgid "Patch" msgstr "Patch" -#: classes/Gems/Default/DatabaseAction.php:371 +#: classes/Gems/Default/DatabaseAction.php:324 msgid "Query" msgstr "Query" -#: classes/Gems/Default/DatabaseAction.php:374 +#: classes/Gems/Default/DatabaseAction.php:327 msgid "Result" msgstr "Result" -#: classes/Gems/Default/DatabaseAction.php:398 +#: classes/Gems/Default/DatabaseAction.php:351 msgid "Patch maintenance" msgstr "Patch maintenance" -#: classes/Gems/Default/DatabaseAction.php:402 +#: classes/Gems/Default/DatabaseAction.php:355 msgid "Patch overview" msgstr "Patch overview" -#: classes/Gems/Default/DatabaseAction.php:464 +#: classes/Gems/Default/DatabaseAction.php:417 msgid "This database object does not exist. You cannot create it." msgstr "This database object does not exist. You cannot create it." -#: classes/Gems/Default/DatabaseAction.... [truncated message content] |