You can subscribe to this list here.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
(70) |
Nov
(164) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(52) |
Feb
(77) |
Mar
(70) |
Apr
(58) |
May
(81) |
Jun
(74) |
Jul
(87) |
Aug
(30) |
Sep
(45) |
Oct
(37) |
Nov
(51) |
Dec
(31) |
2013 |
Jan
(47) |
Feb
(29) |
Mar
(40) |
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <gem...@li...> - 2012-02-15 14:10:24
|
Revision: 480 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=480&view=rev Author: matijsdejong Date: 2012-02-15 14:10:14 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Added generic event class (copies all answers if a previous version of the survey exists in the track) Added Paths: ----------- trunk/new_project/application/events/survey/beforeanswering/GetPreviousAnswers.php Added: trunk/new_project/application/events/survey/beforeanswering/GetPreviousAnswers.php =================================================================== --- trunk/new_project/application/events/survey/beforeanswering/GetPreviousAnswers.php (rev 0) +++ trunk/new_project/application/events/survey/beforeanswering/GetPreviousAnswers.php 2012-02-15 14:10:14 UTC (rev 480) @@ -0,0 +1,93 @@ +<?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 Events + * @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 $ + */ + +/** + * This events look for a previous copy of the same + * + * + * @package Gems + * @subpackage Events + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4.4 + */ +class GetPreviousAnswers extends MUtil_Registry_TargetAbstract implements Gems_Event_SurveyBeforeAnsweringEventInterface +{ + /** + * Set as this is a MUtil_Registry_TargetInterface + * + * @var Zend_Translate $translate + */ + protected $translate; + + /** + * A pretty name for use in dropdown selection boxes. + * + * @return string Name + */ + public function getEventName() + { + return $this->translate->_('Previous Version Answers Lookup'); + } + + /** + * Process the data and return the answers that should be filled in beforehand. + * + * Storing the changed values is handled by the calling function. + * + * @param Gems_Tracker_Token $token Gems token object + * @return array Containing the changed values + */ + public function processTokenInsertion(Gems_Tracker_Token $token) + { + if ($token->hasSuccesCode() && (! $token->isCompleted())) { + // Preparation for a more general object class + $surveyId = $token->getSurveyId(); + + $prev = $token; + while ($prev = $prev->getPreviousToken()) { + + if ($prev->hasSuccesCode() && $prev->isCompleted()) { + // Check first on survey id and when that does not work by name. + if ($prev->getSurveyId() == $surveyId) { + return $prev->getRawAnswers(); + } + } + } + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-15 13:59:47
|
Revision: 479 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=479&view=rev Author: mennodekker Date: 2012-02-15 13:59:36 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Reuse transaltion from suvey completed event :) And provide changed values only Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php Modified: branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 13:32:43 UTC (rev 478) +++ branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 13:59:36 UTC (rev 479) @@ -124,7 +124,7 @@ if ($detailed) { $this->setIfExists('gtr_completed_event', - 'label', $this->translate->_('Track completion event'), + 'label', $this->translate->_('After completion'), 'multiOptions', $this->loader->getEvents()->listTrackCompletionEvents()); } Modified: branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 13:32:43 UTC (rev 478) +++ branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 13:59:36 UTC (rev 479) @@ -143,7 +143,8 @@ $values['gr2t_end_date'] = $tokenSelect->fetchOne(); - //Handle TrackCompletionEvent + //Handle TrackCompletionEvent, send only changed fields in $values array + $this->tracker->filterChangesOnly($this->_respTrackData, $values); $this->handleTrackCompletion($values, $userId); } else { $values['gr2t_end_date'] = null; @@ -628,7 +629,7 @@ /** * Find out if there are track completion events and delegate to the event if needed * - * @param array $values + * @param array $values The values changed before entering this event * @param int $userId */ public function handleTrackCompletion(&$values, $userId) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-15 13:32:55
|
Revision: 478 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=478&view=rev Author: matijsdejong Date: 2012-02-15 13:32:43 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Translation made up to date Modified Paths: -------------- branches/1.5.x/library/languages/default-en.mo branches/1.5.x/library/languages/default-en.po branches/1.5.x/library/languages/default-nl.mo branches/1.5.x/library/languages/default-nl.po Modified: branches/1.5.x/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: branches/1.5.x/library/languages/default-en.po =================================================================== --- branches/1.5.x/library/languages/default-en.po 2012-02-15 13:07:26 UTC (rev 477) +++ branches/1.5.x/library/languages/default-en.po 2012-02-15 13:32:43 UTC (rev 478) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-02-14 10:57+0100\n" +"POT-Creation-Date: 2012-02-15 14:22+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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -87,6 +87,14 @@ msgid "You must login to access this page." msgstr "You must login to access this page." +#: classes/GemsEscort.php:1705 +#: classes/GemsEscort.php:1707 +#, php-format +msgid "%d survey" +msgid_plural "%d surveys" +msgstr[0] "%d survey" +msgstr[1] "%d surveys" + #: classes/Gems/AccessLog.php:236 msgid "Database needs to be updated!" msgstr "Database needs to be updated!" @@ -460,94 +468,89 @@ msgid "Cache cleaned" msgstr "Cache cleaned" -#: classes/Gems/Controller/BrowseEditAction.php:352 +#: classes/Gems/Controller/BrowseEditAction.php:354 #, php-format msgid "New %s..." msgstr "New %s..." -#: classes/Gems/Controller/BrowseEditAction.php:385 +#: classes/Gems/Controller/BrowseEditAction.php:387 #, php-format msgid "Delete %s" msgstr "Delete %s" -#: classes/Gems/Controller/BrowseEditAction.php:389 +#: classes/Gems/Controller/BrowseEditAction.php:391 #, php-format msgid "%2$u %1$s deleted" msgstr "%2$u %1$s deleted" -#: classes/Gems/Controller/BrowseEditAction.php:403 +#: classes/Gems/Controller/BrowseEditAction.php:405 #, php-format msgid "Edit %s" msgstr "Edit %s" -#: classes/Gems/Controller/BrowseEditAction.php:500 +#: classes/Gems/Controller/BrowseEditAction.php:502 msgid "Free search text" msgstr "Free search text" -#: classes/Gems/Controller/BrowseEditAction.php:571 +#: classes/Gems/Controller/BrowseEditAction.php:573 msgid "Search" msgstr "Search" -#: classes/Gems/Controller/BrowseEditAction.php:587 +#: classes/Gems/Controller/BrowseEditAction.php:589 #, php-format msgid "No %s found" msgstr "No %s found" -#: classes/Gems/Controller/BrowseEditAction.php:660 -#: classes/Gems/Default/ExportAction.php:234 +#: classes/Gems/Controller/BrowseEditAction.php:662 #, php-format msgid "No %s found." msgstr "No %s found." -#: classes/Gems/Controller/BrowseEditAction.php:778 +#: classes/Gems/Controller/BrowseEditAction.php:780 msgid "Are you sure?" msgstr "Are you sure?" -#: classes/Gems/Controller/BrowseEditAction.php:794 -#: classes/Gems/Default/DatabaseAction.php:171 -#: classes/Gems/Default/DatabaseAction.php:483 +#: classes/Gems/Controller/BrowseEditAction.php:796 msgid "Yes" msgstr "Yes" -#: classes/Gems/Controller/BrowseEditAction.php:795 -#: classes/Gems/Default/DatabaseAction.php:172 -#: classes/Gems/Default/DatabaseAction.php:484 +#: classes/Gems/Controller/BrowseEditAction.php:797 msgid "No" msgstr "No" -#: classes/Gems/Controller/BrowseEditAction.php:848 +#: classes/Gems/Controller/BrowseEditAction.php:850 #, php-format msgid "Unknown %s requested" msgstr "Unknown %s requested" -#: classes/Gems/Controller/BrowseEditAction.php:871 +#: classes/Gems/Controller/BrowseEditAction.php:873 #, php-format msgid "New %1$s..." msgstr "New %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:879 +#: classes/Gems/Controller/BrowseEditAction.php:881 msgid "Save" msgstr "Save" -#: classes/Gems/Controller/BrowseEditAction.php:915 +#: classes/Gems/Controller/BrowseEditAction.php:917 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s saved" -#: classes/Gems/Controller/BrowseEditAction.php:918 +#: classes/Gems/Controller/BrowseEditAction.php:920 msgid "No changes to save." msgstr "No changes to save." -#: classes/Gems/Controller/BrowseEditAction.php:927 +#: classes/Gems/Controller/BrowseEditAction.php:929 msgid "Input error! No changes saved!" msgstr "Input error! No changes saved!" -#: classes/Gems/Controller/BrowseEditAction.php:955 +#: classes/Gems/Controller/BrowseEditAction.php:957 #, php-format msgid "Show %s" msgstr "Show %s" -#: classes/Gems/Controller/BrowseEditAction.php:962 +#: classes/Gems/Controller/BrowseEditAction.php:964 #, php-format msgid "Unknown %s." msgstr "Unknown %s." @@ -1001,6 +1004,7 @@ msgstr "Export data" #: classes/Gems/Default/ExportAction.php:153 +#: classes/Gems/Default/MailJobAction.php:121 msgid "Survey" msgstr "Survey" @@ -1012,6 +1016,7 @@ #: classes/Gems/Default/ExportAction.php:172 #: classes/Gems/Default/IndexAction.php:203 #: classes/Gems/Default/LogAction.php:197 +#: classes/Gems/Default/MailJobAction.php:119 msgid "Organization" msgstr "Organization" @@ -1025,6 +1030,7 @@ msgstr "Role" #: classes/Gems/Default/GroupAction.php:92 +#: classes/Gems/Default/MailJobAction.php:104 msgid "Active" msgstr "Active" @@ -1250,7 +1256,6 @@ msgstr "New automatic mail job..." #: classes/Gems/Default/MailJobAction.php:100 -#: classes/Gems/Default/MailLogAction.php:116 msgid "Template" msgstr "Template" @@ -1634,6 +1639,7 @@ #: classes/Gems/Default/OverviewPlanAction.php:115 #: classes/Gems/Default/ProjectSurveysAction.php:88 +#: classes/Gems/Default/SurveyAction.php:203 msgid "survey" msgid_plural "surveys" msgstr[0] "survey" @@ -1743,29 +1749,32 @@ msgid "Server PHP Info" msgstr "Server PHP Info" -#: classes/Gems/Default/ProjectInformationAction.php:208 +#: classes/Gems/Default/ProjectInformationAction.php:212 msgid "Project settings" msgstr "Project settings" -#: classes/Gems/Default/ProjectInformationAction.php:215 +#: classes/Gems/Default/ProjectInformationAction.php:219 msgid "Session content" msgstr "Session content" -#: classes/Gems/Default/ProjectInformationAction.php:216 +#: classes/Gems/Default/ProjectInformationAction.php:220 msgid "Session" msgstr "Session" #: classes/Gems/Default/ProjectSurveysAction.php:68 +#: classes/Gems/Default/SurveyAction.php:192 msgid "By" msgstr "By" #: classes/Gems/Default/ProjectSurveysAction.php:69 #: classes/Gems/Default/ProjectTracksAction.php:67 +#: classes/Gems/Default/SurveyAction.php:193 msgid "From" msgstr "From" #: classes/Gems/Default/ProjectSurveysAction.php:70 #: classes/Gems/Default/ProjectTracksAction.php:68 +#: classes/Gems/Default/SurveyAction.php:195 msgid "Until" msgstr "Until" @@ -1793,6 +1802,7 @@ msgstr "Questions in survey %s" #: classes/Gems/Default/ProjectTracksAction.php:118 +#: classes/Gems/Default/SurveyAction.php:85 #, php-format msgid "Survey %s does not exist." msgstr "Survey %s does not exist." @@ -1968,6 +1978,7 @@ msgstr "Please settle the informed consent form for this patient." #: classes/Gems/Default/RespondentPlanAction.php:67 +#: classes/Gems/Default/SurveyAction.php:171 msgid "Show respondent" msgstr "Show patient" @@ -4071,9 +4082,8 @@ msgid "Can access" msgstr "Can access" -#: views/scripts/index/login.phtml:12 -msgid "The Pulse software was made possible thanks to support from " -msgstr "The Pulse software was made possible thanks to support from " +#~ msgid "The Pulse software was made possible thanks to support from " +#~ msgstr "The Pulse software was made possible thanks to support from " #~ msgid "Physician" #~ msgstr "Physician" Modified: branches/1.5.x/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: branches/1.5.x/library/languages/default-nl.po =================================================================== --- branches/1.5.x/library/languages/default-nl.po 2012-02-15 13:07:26 UTC (rev 477) +++ branches/1.5.x/library/languages/default-nl.po 2012-02-15 13:32:43 UTC (rev 478) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: Pulse NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-02-14 10:56+0100\n" +"POT-Creation-Date: 2012-02-15 14:22+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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -87,6 +87,14 @@ msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." +#: classes/GemsEscort.php:1705 +#: classes/GemsEscort.php:1707 +#, php-format +msgid "%d survey" +msgid_plural "%d surveys" +msgstr[0] "%d vragenlijst" +msgstr[1] "%d vragenlijsten" + #: classes/Gems/AccessLog.php:236 msgid "Database needs to be updated!" msgstr "Database dient ververst te worden!" @@ -354,7 +362,7 @@ #: classes/Gems/Model.php:206 msgid "Opened" -msgstr "Bekeken" +msgstr "Bekeken op" #: classes/Gems/Model.php:207 msgid "Consent" @@ -460,94 +468,89 @@ msgid "Cache cleaned" msgstr "Cache opgeschoond" -#: classes/Gems/Controller/BrowseEditAction.php:352 +#: classes/Gems/Controller/BrowseEditAction.php:354 #, php-format msgid "New %s..." msgstr "Nieuw %s..." -#: classes/Gems/Controller/BrowseEditAction.php:385 +#: classes/Gems/Controller/BrowseEditAction.php:387 #, php-format msgid "Delete %s" msgstr "Verwijder %s" -#: classes/Gems/Controller/BrowseEditAction.php:389 +#: classes/Gems/Controller/BrowseEditAction.php:391 #, php-format msgid "%2$u %1$s deleted" msgstr "%2$u %1$s verwijderd" -#: classes/Gems/Controller/BrowseEditAction.php:403 +#: classes/Gems/Controller/BrowseEditAction.php:405 #, php-format msgid "Edit %s" msgstr "Bewerk %s" -#: classes/Gems/Controller/BrowseEditAction.php:500 +#: classes/Gems/Controller/BrowseEditAction.php:502 msgid "Free search text" msgstr "Vrije zoek tekst" -#: classes/Gems/Controller/BrowseEditAction.php:571 +#: classes/Gems/Controller/BrowseEditAction.php:573 msgid "Search" msgstr "Zoeken" -#: classes/Gems/Controller/BrowseEditAction.php:587 +#: classes/Gems/Controller/BrowseEditAction.php:589 #, php-format msgid "No %s found" msgstr "Geen %s gevonden" -#: classes/Gems/Controller/BrowseEditAction.php:660 -#: classes/Gems/Default/ExportAction.php:234 +#: classes/Gems/Controller/BrowseEditAction.php:662 #, php-format msgid "No %s found." msgstr "Geen %s gevonden." -#: classes/Gems/Controller/BrowseEditAction.php:778 +#: classes/Gems/Controller/BrowseEditAction.php:780 msgid "Are you sure?" msgstr "Weet u het zeker?" -#: classes/Gems/Controller/BrowseEditAction.php:794 -#: classes/Gems/Default/DatabaseAction.php:171 -#: classes/Gems/Default/DatabaseAction.php:483 +#: classes/Gems/Controller/BrowseEditAction.php:796 msgid "Yes" msgstr "Ja" -#: classes/Gems/Controller/BrowseEditAction.php:795 -#: classes/Gems/Default/DatabaseAction.php:172 -#: classes/Gems/Default/DatabaseAction.php:484 +#: classes/Gems/Controller/BrowseEditAction.php:797 msgid "No" msgstr "Nee" -#: classes/Gems/Controller/BrowseEditAction.php:848 +#: classes/Gems/Controller/BrowseEditAction.php:850 #, php-format msgid "Unknown %s requested" msgstr "Onjuist %s verzoek" -#: classes/Gems/Controller/BrowseEditAction.php:871 +#: classes/Gems/Controller/BrowseEditAction.php:873 #, php-format msgid "New %1$s..." msgstr "Nieuwe %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:879 +#: classes/Gems/Controller/BrowseEditAction.php:881 msgid "Save" msgstr "Opslaan" -#: classes/Gems/Controller/BrowseEditAction.php:915 +#: classes/Gems/Controller/BrowseEditAction.php:917 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s opgeslagen" -#: classes/Gems/Controller/BrowseEditAction.php:918 +#: classes/Gems/Controller/BrowseEditAction.php:920 msgid "No changes to save." msgstr "Geen verandering om op te slaan." -#: classes/Gems/Controller/BrowseEditAction.php:927 +#: classes/Gems/Controller/BrowseEditAction.php:929 msgid "Input error! No changes saved!" msgstr "Invoer fout! Veranderingen niet opgeslagen!" -#: classes/Gems/Controller/BrowseEditAction.php:955 +#: classes/Gems/Controller/BrowseEditAction.php:957 #, php-format msgid "Show %s" msgstr "Toon %s" -#: classes/Gems/Controller/BrowseEditAction.php:962 +#: classes/Gems/Controller/BrowseEditAction.php:964 #, php-format msgid "Unknown %s." msgstr "%s is onbekend." @@ -1001,6 +1004,7 @@ msgstr "Exporteer gegevens" #: classes/Gems/Default/ExportAction.php:153 +#: classes/Gems/Default/MailJobAction.php:121 msgid "Survey" msgstr "Vragenlijst" @@ -1012,6 +1016,7 @@ #: classes/Gems/Default/ExportAction.php:172 #: classes/Gems/Default/IndexAction.php:203 #: classes/Gems/Default/LogAction.php:197 +#: classes/Gems/Default/MailJobAction.php:119 msgid "Organization" msgstr "Organisatie" @@ -1025,6 +1030,7 @@ msgstr "Rol" #: classes/Gems/Default/GroupAction.php:92 +#: classes/Gems/Default/MailJobAction.php:104 msgid "Active" msgstr "Actief" @@ -1250,7 +1256,6 @@ msgstr "Nieuwe automatische mail opdracht..." #: classes/Gems/Default/MailJobAction.php:100 -#: classes/Gems/Default/MailLogAction.php:116 msgid "Template" msgstr "Sjabloon" @@ -1634,6 +1639,7 @@ #: classes/Gems/Default/OverviewPlanAction.php:115 #: classes/Gems/Default/ProjectSurveysAction.php:88 +#: classes/Gems/Default/SurveyAction.php:203 msgid "survey" msgid_plural "surveys" msgstr[0] "vragenlijst" @@ -1743,29 +1749,32 @@ msgid "Server PHP Info" msgstr "Server PHP Info" -#: classes/Gems/Default/ProjectInformationAction.php:208 +#: classes/Gems/Default/ProjectInformationAction.php:212 msgid "Project settings" msgstr "Project instellingen" -#: classes/Gems/Default/ProjectInformationAction.php:215 +#: classes/Gems/Default/ProjectInformationAction.php:219 msgid "Session content" msgstr "Sessie inhoud" -#: classes/Gems/Default/ProjectInformationAction.php:216 +#: classes/Gems/Default/ProjectInformationAction.php:220 msgid "Session" msgstr "Sessie" #: classes/Gems/Default/ProjectSurveysAction.php:68 +#: classes/Gems/Default/SurveyAction.php:192 msgid "By" msgstr "Door" #: classes/Gems/Default/ProjectSurveysAction.php:69 #: classes/Gems/Default/ProjectTracksAction.php:67 +#: classes/Gems/Default/SurveyAction.php:193 msgid "From" msgstr "Van" #: classes/Gems/Default/ProjectSurveysAction.php:70 #: classes/Gems/Default/ProjectTracksAction.php:68 +#: classes/Gems/Default/SurveyAction.php:195 msgid "Until" msgstr "Tot" @@ -1793,6 +1802,7 @@ msgstr "Vragen in vragenlijsten %s" #: classes/Gems/Default/ProjectTracksAction.php:118 +#: classes/Gems/Default/SurveyAction.php:85 #, php-format msgid "Survey %s does not exist." msgstr "Vragenlijst %s bestaat niet." @@ -1968,6 +1978,7 @@ msgstr "A.u.b. het informed consent formulier doornemen met deze patiënt" #: classes/Gems/Default/RespondentPlanAction.php:67 +#: classes/Gems/Default/SurveyAction.php:171 msgid "Show respondent" msgstr "Toon patiënt" @@ -4071,9 +4082,8 @@ msgid "Can access" msgstr "Toegang tot" -#: views/scripts/index/login.phtml:12 -msgid "The Pulse software was made possible thanks to support from " -msgstr "De PULSE software is mede mogelijk gemaakt met steun van " +#~ msgid "The Pulse software was made possible thanks to support from " +#~ msgstr "De PULSE software is mede mogelijk gemaakt met steun van " #, fuzzy #~ msgid "Executing patchlevel 43" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-15 13:07:35
|
Revision: 477 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=477&view=rev Author: mennodekker Date: 2012-02-15 13:07:26 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Fxing sloppy commit, TrackCompletedEvent should work now Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php branches/1.5.x/library/classes/Gems/Events.php branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php Modified: branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php =================================================================== --- branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php 2012-02-15 13:07:26 UTC (rev 477) @@ -43,7 +43,7 @@ * @license New BSD License * @since Class available since version 1.5.1 */ -class Gems_Event_TrackCompletedEventInterface extends Gems_Event_EventInterface +interface Gems_Event_TrackCompletedEventInterface extends Gems_Event_EventInterface { /** * Process the data and return the answers that should be changed. @@ -56,4 +56,4 @@ * @return void */ public function processTrackCompletion(Gems_Tracker_RespondentTrack $track, &$values, $userId); -} +} Modified: branches/1.5.x/library/classes/Gems/Events.php =================================================================== --- branches/1.5.x/library/classes/Gems/Events.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Events.php 2012-02-15 13:07:26 UTC (rev 477) @@ -236,7 +236,7 @@ * @param string $eventName * @return Gems_Event_TrackCompletedEventInterface */ - public function loadTrackCompletionEvent($evetName) + public function loadTrackCompletionEvent($eventName) { return $this->_loadEvent($eventName, self::TRACK_COMPLETION_EVENT); } Modified: branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 13:07:26 UTC (rev 477) @@ -187,7 +187,7 @@ if (array_key_exists('gtr_completed_event', $track)) { if (!empty($track['gtr_completed_event'])) { - return $track['gtr_completed_event']; + return $this->loader->getEvents()->loadTrackCompletionEvent($track['gtr_completed_event']); } } } Modified: branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 13:07:26 UTC (rev 477) @@ -633,11 +633,11 @@ */ public function handleTrackCompletion(&$values, $userId) { // Process any events - $trackEngine = $this->getTrackEngine(); + $trackModel = $this->tracker->getTrackModel(); //to be backward compatible, first check if the engine has a - if (is_callable(array($trackEngine, 'getTrackCompletionEvent'))) { - if ($event = $this->tracker->getTrackModel()->getTrackCompletionEvent($this->getTrackId())) { + if (is_callable(array($trackModel, 'getTrackCompletionEvent'))) { + if ($event = $trackModel->getTrackCompletionEvent($this->getTrackId())) { $event->processTrackCompletion($this, $values, $userId); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-15 12:43:09
|
Revision: 476 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=476&view=rev Author: mennodekker Date: 2012-02-15 12:42:58 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Introducing TrackCompletedEvent Modified Paths: -------------- branches/1.5.x/library/changelog.txt branches/1.5.x/library/classes/Gems/Events.php branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php branches/1.5.x/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php branches/1.5.x/library/configs/db/patches.sql Added Paths: ----------- branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php Modified: branches/1.5.x/library/changelog.txt =================================================================== --- branches/1.5.x/library/changelog.txt 2012-02-15 11:29:55 UTC (rev 475) +++ branches/1.5.x/library/changelog.txt 2012-02-15 12:42:58 UTC (rev 476) @@ -1,3 +1,7 @@ +Important changes from 1.5.0 => 1.5.1 +============================================================ +New event introduced: TrackCompletedEvent + Important changes from 1.4.3 => 1.5 ============================================================ Passwords should be set with a project.ini->salt. Salt is now a required project setting! Added: branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php =================================================================== --- branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php (rev 0) +++ branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php 2012-02-15 12:42:58 UTC (rev 476) @@ -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 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 Event + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Track completed event interface + * + * Run on completion of an event + * + * @package Gems + * @subpackage Event + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.1 + */ +class Gems_Event_TrackCompletedEventInterface extends Gems_Event_EventInterface +{ + /** + * Process the data and return the answers that should be changed. + * + * Storing the changed $values is handled by the calling function. + * + * @param Gems_Tracker_RespondentTrack $track Gems repsondent track object + * @param array $values The values to update the track with, before they were saved + * @param int $userId The current userId + * @return void + */ + public function processTrackCompletion(Gems_Tracker_RespondentTrack $track, &$values, $userId); +} Modified: branches/1.5.x/library/classes/Gems/Events.php =================================================================== --- branches/1.5.x/library/classes/Gems/Events.php 2012-02-15 11:29:55 UTC (rev 475) +++ branches/1.5.x/library/classes/Gems/Events.php 2012-02-15 12:42:58 UTC (rev 476) @@ -48,6 +48,7 @@ { const EVENTS_DIR = 'events'; + const TRACK_COMPLETION_EVENT = 'track/completed'; const ROUND_CHANGED_EVENT = 'round/changed'; const SURVEY_BEFORE_ANSWERING_EVENT = 'survey/beforeanswering'; const SURVEY_COMPLETION_EVENT = 'survey/completed'; @@ -61,6 +62,7 @@ * @var array containing eventType => eventClass for all event classes */ protected $_eventClasses = array( + self::TRACK_COMPLETION_EVENT => 'Gems_Event_TrackCompletedEventInterface', self::ROUND_CHANGED_EVENT => 'Gems_Event_RoundChangedEventInterface', self::SURVEY_BEFORE_ANSWERING_EVENT => 'Gems_Event_SurveyBeforeAnsweringEventInterface', self::SURVEY_COMPLETION_EVENT => 'Gems_Event_SurveyCompletedEventInterface', @@ -174,35 +176,44 @@ /** * - * @param string $eventName - * @return Gems_Event_RoundChangedEventInterface + * @return Gems_Event_SurveyCompletedEventInterface */ - public function loadRoundChangedEvent($eventName) + public function listSurveyBeforeAnsweringEvents() { - return $this->_loadEvent($eventName, self::ROUND_CHANGED_EVENT); + return $this->_listEvents(self::SURVEY_BEFORE_ANSWERING_EVENT); } /** * * @return Gems_Event_SurveyCompletedEventInterface */ - public function listSurveyBeforeAnsweringEvents() + public function listSurveyCompletionEvents() { - return $this->_listEvents(self::SURVEY_BEFORE_ANSWERING_EVENT); + return $this->_listEvents(self::SURVEY_COMPLETION_EVENT); } /** * - * @return Gems_Event_SurveyCompletedEventInterface + * @return Gems_Event_TrackCompletedEventInterface */ - public function listSurveyCompletionEvents() + public function listTrackCompletionEvents() { - return $this->_listEvents(self::SURVEY_COMPLETION_EVENT); + return $this->_listEvents(self::TRACK_COMPLETION_EVENT); } /** * * @param string $eventName + * @return Gems_Event_RoundChangedEventInterface + */ + public function loadRoundChangedEvent($eventName) + { + return $this->_loadEvent($eventName, self::ROUND_CHANGED_EVENT); + } + + /** + * + * @param string $eventName * @return Gems_Event_SurveyBeforeAnsweringEventInterface */ public function loadSurveyBeforeAnsweringEvent($eventName) @@ -219,4 +230,14 @@ { return $this->_loadEvent($eventName, self::SURVEY_COMPLETION_EVENT); } + + /** + * + * @param string $eventName + * @return Gems_Event_TrackCompletedEventInterface + */ + public function loadTrackCompletionEvent($evetName) + { + return $this->_loadEvent($eventName, self::TRACK_COMPLETION_EVENT); + } } Modified: branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 11:29:55 UTC (rev 475) +++ branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 12:42:58 UTC (rev 476) @@ -48,7 +48,18 @@ class Gems_Tracker_Model_TrackModel extends MUtil_Model_TableModel implements MUtil_Registry_TargetInterface { /** - * + * Holds the trackData in array with key trackId, for internal caching use only + * + * @var array + */ + protected $_trackData = array(); + + /** + * @var Gems_Loader + */ + protected $loader; + + /** * @var Gems_Tracker */ protected $tracker; @@ -111,6 +122,12 @@ $this->set('gtr_date_start', 'label', $this->translate->_('From'), 'dateFormat', $translated->dateFormatString, 'formatFunction', $translated->formatDate); $this->set('gtr_date_until', 'label', $this->translate->_('Use until'), 'dateFormat', $translated->dateFormatString, 'formatFunction', $translated->formatDateForever); + if ($detailed) { + $this->setIfExists('gtr_completed_event', + 'label', $this->translate->_('Track completion event'), + 'multiOptions', $this->loader->getEvents()->listTrackCompletionEvents()); + } + return $this; } @@ -147,4 +164,31 @@ { return array_filter(array_keys(get_object_vars($this)), array($this, 'filterRequestNames')); } + + /** + * Get the TrackCompletedEvent for the given trackId + * + * @param int $trackId + * @return Gems_Event_TrackCompletedEventInterface|null + */ + public function getTrackCompletionEvent($trackId) + { + static $trackData = array(); + + if (array_key_exists($trackId, $trackData)) { + $track = $trackData[$trackId]; + } else { + if ($track = $this->loadFirst(array('gtr_id_track' => $trackId))) { + $trackData[$trackId] = $track; + } else { + $track = array(); + } + } + + if (array_key_exists('gtr_completed_event', $track)) { + if (!empty($track['gtr_completed_event'])) { + return $track['gtr_completed_event']; + } + } + } } Modified: branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 11:29:55 UTC (rev 475) +++ branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 12:42:58 UTC (rev 476) @@ -126,7 +126,7 @@ */ public function _checkTrackCount($userId) { - $sqlCount = 'SELECT COUNT(*) AS count, COALESCE(SUM(CASE WHEN gto_completion_time IS NULL THEN 0 ELSE 1 END), 0) AS completed + $sqlCount = 'SELECT COUNT(*) AS count, SUM(CASE WHEN gto_completion_time IS NULL THEN 0 ELSE 1 END) AS completed FROM gems__tokens JOIN gems__reception_codes ON gto_reception_code = grc_id_reception_code AND grc_success = 1 WHERE gto_id_respondent_track = ?'; @@ -142,6 +142,9 @@ ->onlySucces(); $values['gr2t_end_date'] = $tokenSelect->fetchOne(); + + //Handle TrackCompletionEvent + $this->handleTrackCompletion($values, $userId); } else { $values['gr2t_end_date'] = null; } @@ -623,7 +626,25 @@ } /** + * Find out if there are track completion events and delegate to the event if needed * + * @param array $values + * @param int $userId + */ + public function handleTrackCompletion(&$values, $userId) { + // Process any events + $trackEngine = $this->getTrackEngine(); + + //to be backward compatible, first check if the engine has a + if (is_callable(array($trackEngine, 'getTrackCompletionEvent'))) { + if ($event = $this->tracker->getTrackModel()->getTrackCompletionEvent($this->getTrackId())) { + $event->processTrackCompletion($this, $values, $userId); + } + } + } + + /** + * * @return boolean */ public function hasSuccesCode() Modified: branches/1.5.x/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php 2012-02-15 11:29:55 UTC (rev 475) +++ branches/1.5.x/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php 2012-02-15 12:42:58 UTC (rev 476) @@ -134,6 +134,9 @@ if (! $this->createData) { $bridge->addCheckbox('gtr_active'); } + if ($model->has('gtr_completed_event')) { + $bridge->add('gtr_completed_event'); + } $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); } Modified: branches/1.5.x/library/configs/db/patches.sql =================================================================== --- branches/1.5.x/library/configs/db/patches.sql 2012-02-15 11:29:55 UTC (rev 475) +++ branches/1.5.x/library/configs/db/patches.sql 2012-02-15 12:42:58 UTC (rev 476) @@ -369,3 +369,9 @@ -- 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`; + +-- PATCH: Add index for receptioncode to token table +ALTER TABLE `gems__tokens` ADD INDEX ( `gto_reception_code` ) + +-- PATCH: Add track completion event +ALTER TABLE `gems__tracks` ADD gtr_completed_event varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' AFTER gtr_track_class; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-15 11:30:06
|
Revision: 475 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=475&view=rev Author: matijsdejong Date: 2012-02-15 11:29:55 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Translated function can now be called with specific locale Added todo fields to tokenMailFields(), removed Pulse field physician Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Util/Translated.php branches/1.5.x/library/classes/GemsEscort.php Modified: branches/1.5.x/library/classes/Gems/Util/Translated.php =================================================================== --- branches/1.5.x/library/classes/Gems/Util/Translated.php 2012-02-15 10:54:01 UTC (rev 474) +++ branches/1.5.x/library/classes/Gems/Util/Translated.php 2012-02-15 11:29:55 UTC (rev 475) @@ -193,27 +193,27 @@ return self::$emptyDropdownArray; } - public function getGenders() + public function getGenders($locale = null) { - return array('M' => $this->_('Male'), 'F' => $this->_('Female'), 'U' => $this->_('Unknown')); + return array('M' => $this->_('Male', $locale), 'F' => $this->_('Female', $locale), 'U' => $this->_('Unknown', $locale)); } - public function getGenderGreeting() + public function getGenderGreeting($locale = null) { - return array('M' => $this->_('mr.'), 'F' => $this->_('mrs.'), 'U' => $this->_('mr./mrs.')); + return array('M' => $this->_('mr.', $locale), 'F' => $this->_('mrs.', $locale), 'U' => $this->_('mr./mrs.', $locale)); } - public function getGenderHello() + public function getGenderHello($locale = null) { - return array('M' => $this->_('Mr.'), 'F' => $this->_('Mrs.'), 'U' => $this->_('Mr./Mrs.')); + return array('M' => $this->_('Mr.', $locale), 'F' => $this->_('Mrs.', $locale), 'U' => $this->_('Mr./Mrs.', $locale)); } - public function getYesNo() + public function getYesNo($locale = null) { static $data; if (! $data) { - $data = array(1 => $this->_('Yes'), 0 => $this->_('No')); + $data = array(1 => $this->_('Yes', $locale), 0 => $this->_('No', $locale)); } return $data; Modified: branches/1.5.x/library/classes/GemsEscort.php =================================================================== --- branches/1.5.x/library/classes/GemsEscort.php 2012-02-15 10:54:01 UTC (rev 474) +++ branches/1.5.x/library/classes/GemsEscort.php 2012-02-15 11:29:55 UTC (rev 475) @@ -1650,7 +1650,8 @@ { $locale = isset($tokenData['grs_iso_lang']) ? $tokenData['grs_iso_lang'] : $this->locale; - $genderHello = $this->getUtil()->getTranslated()->getGenderHello(); + // Prepare values + $genderHello = $this->getUtil()->getTranslated()->getGenderHello($locale); $hello[] = $genderHello[$tokenData['grs_gender']]; $hello[] = $tokenData['grs_first_name']; if ($tokenData['grs_surname_prefix']) { @@ -1658,13 +1659,24 @@ } $hello[] = $tokenData['grs_last_name']; - $genderGreeting = $this->getUtil()->getTranslated()->getGenderGreeting(); + $genderGreeting = $this->getUtil()->getTranslated()->getGenderGreeting($locale); $greeting[] = $genderGreeting[$tokenData['grs_gender']]; if ($tokenData['grs_surname_prefix']) { $greeting[] = $tokenData['grs_surname_prefix']; } $greeting[] = $tokenData['grs_last_name']; + // Count todo + $tSelect = $this->getLoader()->getTracker()->getTokenSelect(array( + 'all' => 'COUNT(*)', + 'track' => $this->db->quoteInto('SUM(CASE WHEN gto_id_respondent_track = ? THEN 1 ELSE 0 END)', $tokenData['gto_id_respondent_track']))); + $tSelect->andSurveys(array()) + ->forRespondent($tokenData['gto_id_respondent'], $tokenData['gto_id_organization']) + ->forGroupId($tokenData['gsu_id_primary_group']) + ->onlyValid(); + $todo = $tSelect->fetchRow(); + + // Set the basic fields $result['{email}'] = $tokenData['grs_email']; $result['{first_name}'] = $tokenData['grs_first_name']; $result['{full_name}'] = implode(' ', $hello); @@ -1681,30 +1693,34 @@ $result['{organization_url}'] = $tokenData['gor_url']; $result['{organization_welcome}'] = $tokenData['gor_welcome']; - $result['{physician}'] = ($tokenData['gsf_surname_prefix'] ? $tokenData['grs_surname_prefix'] . ' ' : '') . $tokenData['gsf_last_name']; + $result['{round}'] = $tokenData['gto_round_description']; - $result['{round}'] = $tokenData['gto_round_description']; + $result['{site_ask_url}'] = $this->util->getCurrentURI('ask/'); + // Url's + $url = $this->util->getCurrentURI('ask/forward/' . MUtil_Model::REQUEST_ID . '/' . $tokenData['gto_id_token']); + $url_input = $result['{site_ask_url}'] . 'index/' . MUtil_Model::REQUEST_ID . '/' . $tokenData['gto_id_token']; - $result['{site_ask_url}'] = $this->util->getCurrentURI('ask/'); + $result['{survey}'] = $tokenData['gsu_survey_name']; - $result['{survey}'] = $tokenData['gsu_survey_name']; + $result['{todo_all}'] = sprintf($this->translate->plural('%d survey', '%d surveys', $todo['all'], $locale), $todo['all']); + $result['{todo_all_count}'] = $todo['all']; + $result['{todo_track}'] = sprintf($this->translate->plural('%d survey', '%d surveys', $todo['track'], $locale), $todo['track']); + $result['{todo_track_count}'] = $todo['track']; - $url = $this->util->getCurrentURI('ask/forward/' . MUtil_Model::REQUEST_ID . '/' . $tokenData['gto_id_token']); - $url_input = $result['{site_ask_url}'] . 'index/' . MUtil_Model::REQUEST_ID . '/' . $tokenData['gto_id_token']; + $result['{token}'] = strtoupper($tokenData['gto_id_token']); + $result['{token_from}'] = MUtil_Date::format($tokenData['gto_valid_from'], Zend_Date::DATE_LONG, 'yyyy-MM-dd', $locale); + // $result['{token_input}'] = MUtil_Html::create()->a($url_input, $tokenData['gsu_survey_name']); + // $result['{token_link}'] = MUtil_Html::create()->a($url, $tokenData['gsu_survey_name']); + // $result['{token_link}'] = '<a href="' . $url . '">' . $tokenData['gsu_survey_name'] . '</a>'; + $result['{token_link}'] = '[url=' . $url . ']' . $tokenData['gsu_survey_name'] . '[/url]'; - $result['{token}'] = strtoupper($tokenData['gto_id_token']); - $result['{token_from}'] = MUtil_Date::format($tokenData['gto_valid_from'], Zend_Date::DATE_LONG, 'yyyy-MM-dd', $locale); - // $result['{token_input}'] = MUtil_Html::create()->a($url_input, $tokenData['gsu_survey_name']); - // $result['{token_link}'] = MUtil_Html::create()->a($url, $tokenData['gsu_survey_name']); - // $result['{token_link}'] = '<a href="' . $url . '">' . $tokenData['gsu_survey_name'] . '</a>'; - $result['{token_link}'] = '[url=' . $url . ']' . $tokenData['gsu_survey_name'] . '[/url]'; + $result['{token_until}'] = MUtil_Date::format($tokenData['gto_valid_until'], Zend_Date::DATE_LONG, 'yyyy-MM-dd', $locale); + $result['{token_url}'] = $url; + $result['{token_url_input}'] = $url_input; - $result['{token_until}'] = MUtil_Date::format($tokenData['gto_valid_until'], Zend_Date::DATE_LONG, 'yyyy-MM-dd', $locale); - $result['{token_url}'] = $url; - $result['{token_url_input}'] = $url_input; + $result['{track}'] = $tokenData['gtr_track_name']; - $result['{track}'] = $tokenData['gtr_track_name']; - + // Add the code fields $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, '}')"))) @@ -1721,4 +1737,3 @@ return $result; } } - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-15 10:54:10
|
Revision: 474 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=474&view=rev Author: mennodekker Date: 2012-02-15 10:54:01 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Introduced the DisplayVars event, to help code new events (doc's will be added to the wiki shortly, using this event) Set keywords Added Paths: ----------- trunk/new_project/application/events/survey/completed/DisplayVars.php Property Changed: ---------------- trunk/new_project/application/classes/NewProject/Escort.php trunk/new_project/application/classes/NewProject/Menu.php trunk/new_project/htdocs/index.php trunk/new_project/var/settings/db.inc.php Property changes on: trunk/new_project/application/classes/NewProject/Escort.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Property changes on: trunk/new_project/application/classes/NewProject/Menu.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Added: trunk/new_project/application/events/survey/completed/DisplayVars.php =================================================================== --- trunk/new_project/application/events/survey/completed/DisplayVars.php (rev 0) +++ trunk/new_project/application/events/survey/completed/DisplayVars.php 2012-02-15 10:54:01 UTC (rev 474) @@ -0,0 +1,74 @@ +<?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 Event + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Displays the variables and their values to help create a new calculation + * + * To start a new calculation you need to know the exact name of the variables returned + * by the survey source. This event will show this information and the values for each + * token it finds. + * + * @package Gems + * @subpackage Event + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.1 + */ +class DisplayVars extends Gems_Event_EventCalculations implements Gems_Event_SurveyCompletedEventInterface +{ + + /** + * A pretty name for use in dropdown selection boxes. + * + * @return string Name + */ + public function getEventName() + { + return "Echo the variables"; + } + + /** + * Process the data and return the answers that should be changed. + * + * Storing the changed values is handled by the calling function. + * + * @param Gems_Tracker_Token $token Gems token object + * @return array Containing the changed values + */ + public function processTokenData(Gems_Tracker_Token $token) + { + MUtil_Echo::r($token->getRawAnswers(), $token->getTokenId()); + return false; + } +} \ No newline at end of file Property changes on: trunk/new_project/htdocs/index.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Property changes on: trunk/new_project/var/settings/db.inc.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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] |
From: <gem...@li...> - 2012-02-14 14:03:44
|
Revision: 472 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=472&view=rev Author: mennodekker Date: 2012-02-14 14:03:35 +0000 (Tue, 14 Feb 2012) Log Message: ----------- Hide 'salt' from project information overview Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Default/ProjectInformationAction.php Modified: branches/1.5.x/library/classes/Gems/Default/ProjectInformationAction.php =================================================================== --- branches/1.5.x/library/classes/Gems/Default/ProjectInformationAction.php 2012-02-14 10:34:21 UTC (rev 471) +++ branches/1.5.x/library/classes/Gems/Default/ProjectInformationAction.php 2012-02-14 14:03:35 UTC (rev 472) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-14 10:34:32
|
Revision: 471 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=471&view=rev Author: mennodekker Date: 2012-02-14 10:34:21 +0000 (Tue, 14 Feb 2012) Log Message: ----------- minor display fixes and added login to project.ini Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Default/RespondentAction.php branches/1.5.x/new_project/application/configs/project.ini branches/1.5.x/new_project/htdocs/gems/css/gems-new.css Modified: branches/1.5.x/library/classes/Gems/Default/RespondentAction.php =================================================================== --- branches/1.5.x/library/classes/Gems/Default/RespondentAction.php 2012-02-14 10:20:56 UTC (rev 470) +++ branches/1.5.x/library/classes/Gems/Default/RespondentAction.php 2012-02-14 10:34:21 UTC (rev 471) @@ -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); @@ -404,4 +404,4 @@ $params['respondentData'] = $data; $this->addSnippets($this->showSnippets, $params); } -} \ No newline at end of file +} Modified: branches/1.5.x/new_project/application/configs/project.ini =================================================================== --- branches/1.5.x/new_project/application/configs/project.ini 2012-02-14 10:20:56 UTC (rev 470) +++ branches/1.5.x/new_project/application/configs/project.ini 2012-02-14 10:34:21 UTC (rev 471) @@ -171,6 +171,7 @@ layoutPrepare.title = 1 layoutPrepare.projectName = header +layoutPrepare.login = header_bar layoutPrepare.contact = header_bar layoutPrepare.localeSet = header_bar layoutPrepare.organizationSwitcher = header_bar @@ -185,6 +186,7 @@ layoutPrepare.dojo = 0 layoutPrepare.jQuery = 1 +layoutPrepare.login.class = rightFloat layoutPrepareArgs.contact.class = rightFloat layoutPrepareArgs.time.class = rightFloat layoutPrepareArgs.user.class = rightFloat Modified: branches/1.5.x/new_project/htdocs/gems/css/gems-new.css =================================================================== --- branches/1.5.x/new_project/htdocs/gems/css/gems-new.css 2012-02-14 10:20:56 UTC (rev 470) +++ branches/1.5.x/new_project/htdocs/gems/css/gems-new.css 2012-02-14 10:34:21 UTC (rev 471) @@ -224,6 +224,11 @@ width: 100%; } +#login .logout { + margin-left: 1em; + margin-right: .5em; +} + img { border: 0 solid transparent; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-14 10:21:09
|
Revision: 470 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=470&view=rev Author: mennodekker Date: 2012-02-14 10:20:56 +0000 (Tue, 14 Feb 2012) Log Message: ----------- updated translations Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Upgrades.php branches/1.5.x/library/languages/default-en.mo branches/1.5.x/library/languages/default-en.po branches/1.5.x/library/languages/default-nl.mo branches/1.5.x/library/languages/default-nl.po Modified: branches/1.5.x/library/classes/Gems/Upgrades.php =================================================================== --- branches/1.5.x/library/classes/Gems/Upgrades.php 2012-02-13 15:44:10 UTC (rev 469) +++ branches/1.5.x/library/classes/Gems/Upgrades.php 2012-02-14 10:20:56 UTC (rev 470) @@ -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: branches/1.5.x/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: branches/1.5.x/library/languages/default-en.po =================================================================== --- branches/1.5.x/library/languages/default-en.po 2012-02-13 15:44:10 UTC (rev 469) +++ branches/1.5.x/library/languages/default-en.po 2012-02-14 10:20:56 UTC (rev 470) @@ -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.php:470 +#: classes/Gems/Default/DatabaseAction.php:423 msgid "This database object has no script. You cannot execute it." msgstr "This database object has no script. You cannot execute it." -#: classes/Gems/Default/DatabaseAction.php:481 +#: classes/Gems/Default/DatabaseAction.php:434 #, php-format msgid "Run %s" msgstr "Run %s" -#: classes/Gems/Default/DatabaseAction.php:500 +#: classes/Gems/Default/DatabaseAction.php:454 #, php-format msgid "Starting %d object creation scripts." msgstr "Starting %d object creation scripts." -#: classes/Gems/Default/DatabaseAction.php:505 -#, php-format -msgid "Finished %s creation script for object %d of %d" -msgstr "Finished %s creation script for object %d of %d" - -#: classes/Gems/Default/DatabaseAction.php:509 +#: classes/Gems/Default/DatabaseAction.php:464 msgid "All objects exist. Nothing was executed." msgstr "All objects exist. Nothing was executed." -#: classes/Gems/Default/DatabaseAction.php:515 +#: classes/Gems/Default/DatabaseAction.php:470 msgid "Create not-existing database objects" msgstr "Create not-existing database objects" -#: classes/Gems/Default/DatabaseAction.php:517 +#: classes/Gems/Default/DatabaseAction.php:472 #, php-format msgid "One database object does not exist." msgid_plural "These %d database objects do not exist." msgstr[0] "One database object does not exist." msgstr[1] "These %d database objects do not exist." -#: classes/Gems/Default/DatabaseAction.php:518 +#: classes/Gems/Default/DatabaseAction.php:473 msgid "Are you sure you want to create it?" msgid_plural "Are you sure you want to create them all?" msgstr[0] "Are you sure you want to create it?" msgstr[1] "Are you sure you want to create them all?" -#: classes/Gems/Default/DatabaseAction.php:531 +#: classes/Gems/Default/DatabaseAction.php:486 msgid "All database objects exist. There is nothing to create." msgstr "All database objects exist. There is nothing to create." -#: classes/Gems/Default/DatabaseAction.php:544 +#: classes/Gems/Default/DatabaseAction.php:499 msgid "Separate multiple commands with semicolons (;)." msgstr "Separate multiple commands with semicolons (;)." -#: classes/Gems/Default/DatabaseAction.php:551 +#: classes/Gems/Default/DatabaseAction.php:506 msgid "Run" msgstr "Run" -#: classes/Gems/Default/DatabaseAction.php:560 +#: classes/Gems/Default/DatabaseAction.php:515 msgid "raw" msgstr "raw" -#: classes/Gems/Default/DatabaseAction.php:569 +#: classes/Gems/Default/DatabaseAction.php:525 #, php-format msgid "Result set %s." msgstr "Result set %s." -#: classes/Gems/Default/DatabaseAction.php:592 +#: classes/Gems/Default/DatabaseAction.php:548 msgid "Execute raw SQL" msgstr "Execute raw SQL" -#: classes/Gems/Default/DatabaseAction.php:595 +#: classes/Gems/Default/DatabaseAction.php:551 msgid "Result sets" msgstr "Result sets" -#: classes/Gems/Default/DatabaseAction.php:620 +#: classes/Gems/Default/DatabaseAction.php:576 msgid "This database object does not exist. You cannot view it." msgstr "This database object does not exist. You cannot view it." -#: classes/Gems/Default/DatabaseAction.php:625 +#: classes/Gems/Default/DatabaseAction.php:581 #, php-format msgid "The data in table %s" msgstr "The data in table %s" -#: classes/Gems/Default/DatabaseAction.php:626 +#: classes/Gems/Default/DatabaseAction.php:582 #, php-format msgid "Contents of %s %s" msgstr "Contents of %s %s" @@ -1013,7 +1001,6 @@ msgstr "Export data" #: classes/Gems/Default/ExportAction.php:153 -#: classes/Gems/Default/MailJobAction.php:121 msgid "Survey" msgstr "Survey" @@ -1023,9 +1010,8 @@ msgstr "%s records found." #: classes/Gems/Default/ExportAction.php:172 -#: classes/Gems/Default/IndexAction.php:200 +#: classes/Gems/Default/IndexAction.php:203 #: classes/Gems/Default/LogAction.php:197 -#: classes/Gems/Default/MailJobAction.php:119 msgid "Organization" msgstr "Organization" @@ -1039,21 +1025,24 @@ msgstr "Role" #: classes/Gems/Default/GroupAction.php:92 -#: classes/Gems/Default/MailJobAction.php:104 msgid "Active" msgstr "Active" -#: classes/Gems/Default/GroupAction.php:96 +#: classes/Gems/Default/GroupAction.php:97 msgid "Allowed IP Ranges" msgstr "Allowed IP Ranges" -#: classes/Gems/Default/GroupAction.php:105 +#: classes/Gems/Default/GroupAction.php:98 +msgid "Separate with | example: 10.0.0.0-10.0.0.255 (subnet masks are not supported)" +msgstr "Separate with | example: 10.0.0.0-10.0.0.255 (subnet masks are not supported)" + +#: classes/Gems/Default/GroupAction.php:108 msgid "group" msgid_plural "groups" msgstr[0] "group" msgstr[1] "groups" -#: classes/Gems/Default/GroupAction.php:110 +#: classes/Gems/Default/GroupAction.php:113 msgid "Administrative groups" msgstr "Administrative groups" @@ -1074,71 +1063,71 @@ msgid "Back to login" msgstr "Back to login" -#: classes/Gems/Default/IndexAction.php:224 +#: classes/Gems/Default/IndexAction.php:227 msgid "Password" msgstr "Password" -#: classes/Gems/Default/IndexAction.php:239 +#: classes/Gems/Default/IndexAction.php:242 #, php-format msgid "Reset password for %s application" msgstr "Reset password for %s application" -#: classes/Gems/Default/IndexAction.php:243 +#: classes/Gems/Default/IndexAction.php:246 msgid "Reset password" msgstr "Reset password" -#: classes/Gems/Default/IndexAction.php:289 +#: classes/Gems/Default/IndexAction.php:292 msgid "Username" msgstr "Username" -#: classes/Gems/Default/IndexAction.php:355 +#: classes/Gems/Default/IndexAction.php:358 msgid "Your password must be changed." msgstr "Your password must be changed." -#: classes/Gems/Default/IndexAction.php:367 +#: classes/Gems/Default/IndexAction.php:370 #, php-format msgid "Login successful, welcome %s." msgstr "Login successful, welcome %s." -#: classes/Gems/Default/IndexAction.php:407 +#: classes/Gems/Default/IndexAction.php:410 #, php-format msgid "Good bye: %s." msgstr "Good bye: %s." -#: classes/Gems/Default/IndexAction.php:432 +#: classes/Gems/Default/IndexAction.php:435 msgid "Reset accepted, enter your new password." msgstr "Reset accepted, enter your new password." -#: classes/Gems/Default/IndexAction.php:436 +#: classes/Gems/Default/IndexAction.php:439 msgid "This key timed out or does not belong to this user." msgstr "This key timed out or does not belong to this user." -#: classes/Gems/Default/IndexAction.php:459 +#: classes/Gems/Default/IndexAction.php:462 msgid "Password reset requested" msgstr "Password reset requested" -#: classes/Gems/Default/IndexAction.php:460 +#: classes/Gems/Default/IndexAction.php:463 #, php-format msgid "To reset your password for %s, please click this link: %s" msgstr "To reset your password for %s, please click this link: %s" -#: classes/Gems/Default/IndexAction.php:465 +#: classes/Gems/Default/IndexAction.php:468 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:467 +#: classes/Gems/Default/IndexAction.php:470 msgid "Unable to send e-mail." msgstr "Unable to send e-mail." -#: classes/Gems/Default/IndexAction.php:472 +#: classes/Gems/Default/IndexAction.php:475 msgid "No such user found or no e-mail address known or user cannot be reset." msgstr "No such user found or no e-mail address known or user cannot be reset." -#: classes/Gems/Default/IndexAction.php:476 +#: classes/Gems/Default/IndexAction.php:479 msgid "We received your password reset key." msgstr "We received your password reset key." -#: classes/Gems/Default/IndexAction.php:477 +#: classes/Gems/Default/IndexAction.php:480 msgid "Please enter the organization and username belonging to this key." msgstr "Please enter the organization and username belonging to this key." @@ -1261,6 +1250,7 @@ msgstr "New automatic mail job..." #: classes/Gems/Default/MailJobAction.php:100 +#: classes/Gems/Default/MailLogAction.php:116 msgid "Template" msgstr "Template" @@ -1432,7 +1422,7 @@ #: classes/Gems/Default/OptionAction.php:113 #: classes/Gems/Default/OptionAction.php:118 #: classes/Gems/Default/SourceAction.php:95 -#: classes/Gems/Default/StaffAction.php:153 +#: classes/Gems/Default/StaffAction.php:161 msgid "Repeat password" msgstr "Repeat password" @@ -1453,8 +1443,8 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 -#: classes/Gems/Default/StaffAction.php:298 -#: classes/Gems/Default/StaffAction.php:331 +#: classes/Gems/Default/StaffAction.php:303 +#: classes/Gems/Default/StaffAction.php:336 msgid "(all organizations)" msgstr "(all organizations)" @@ -1496,7 +1486,7 @@ #: classes/Gems/Default/OptionAction.php:188 #: classes/Gems/Default/OrganizationAction.php:139 #: classes/Gems/Default/RespondentAction.php:173 -#: classes/Gems/Default/StaffAction.php:314 +#: classes/Gems/Default/StaffAction.php:319 msgid "Language" msgstr "Language" @@ -1617,34 +1607,33 @@ msgid "Only for programmers." msgstr "Only for programmers." -#: classes/Gems/Default/OrganizationAction.php:173 +#: classes/Gems/Default/OrganizationAction.php:174 msgid "This can not be changed yet" msgstr "This can not be changed yet" -#: classes/Gems/Default/OrganizationAction.php:175 +#: classes/Gems/Default/OrganizationAction.php:176 #: classes/Gems/Default/StaffAction.php:131 msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:193 +#: classes/Gems/Default/OrganizationAction.php:194 msgid "Delete organization" msgstr "Delete organization" -#: classes/Gems/Default/OrganizationAction.php:203 +#: classes/Gems/Default/OrganizationAction.php:204 msgid "Edit organization" msgstr "Edit organization" -#: classes/Gems/Default/OrganizationAction.php:213 +#: classes/Gems/Default/OrganizationAction.php:214 msgid "Participating organizations" msgstr "Participating organizations" -#: classes/Gems/Default/OrganizationAction.php:223 +#: classes/Gems/Default/OrganizationAction.php:224 msgid "Show organization" msgstr "Show organization" #: classes/Gems/Default/OverviewPlanAction.php:115 #: classes/Gems/Default/ProjectSurveysAction.php:88 -#: classes/Gems/Default/SurveyAction.php:203 msgid "survey" msgid_plural "surveys" msgstr[0] "survey" @@ -1767,19 +1756,16 @@ msgstr "Session" #: classes/Gems/Default/ProjectSurveysAction.php:68 -#: classes/Gems/Default/SurveyAction.php:192 msgid "By" msgstr "By" #: classes/Gems/Default/ProjectSurveysAction.php:69 #: classes/Gems/Default/ProjectTracksAction.php:67 -#: classes/Gems/Default/SurveyAction.php:193 msgid "From" msgstr "From" #: classes/Gems/Default/ProjectSurveysAction.php:70 #: classes/Gems/Default/ProjectTracksAction.php:68 -#: classes/Gems/Default/SurveyAction.php:195 msgid "Until" msgstr "Until" @@ -1807,7 +1793,6 @@ msgstr "Questions in survey %s" #: classes/Gems/Default/ProjectTracksAction.php:118 -#: classes/Gems/Default/SurveyAction.php:85 #, php-format msgid "Survey %s does not exist." msgstr "Survey %s does not exist." @@ -1949,45 +1934,40 @@ msgstr "Comments" #: classes/Gems/Default/RespondentAction.php:205 -msgid "Physician" -msgstr "Physician" - -#: classes/Gems/Default/RespondentAction.php:206 msgid "Treatment" msgstr "Treatment" -#: classes/Gems/Default/RespondentAction.php:234 +#: classes/Gems/Default/RespondentAction.php:233 msgid "Rejection code" msgstr "Rejection code" -#: classes/Gems/Default/RespondentAction.php:241 +#: classes/Gems/Default/RespondentAction.php:240 msgid "Delete respondent" msgstr "Delete patient" -#: classes/Gems/Default/RespondentAction.php:273 +#: classes/Gems/Default/RespondentAction.php:272 msgid "Respondent deleted." msgstr "Patient deleted" -#: classes/Gems/Default/RespondentAction.php:277 +#: classes/Gems/Default/RespondentAction.php:276 msgid "Respondent tracks stopped." msgstr "Patient tracks stopped." -#: classes/Gems/Default/RespondentAction.php:281 +#: classes/Gems/Default/RespondentAction.php:280 msgid "Choose a reception code to delete." msgstr "Choose a reception code to delete." -#: classes/Gems/Default/RespondentAction.php:325 +#: classes/Gems/Default/RespondentAction.php:324 msgid "respondent" msgid_plural "respondents" msgstr[0] "patient" msgstr[1] "patients" -#: classes/Gems/Default/RespondentAction.php:395 +#: classes/Gems/Default/RespondentAction.php:394 msgid "Please settle the informed consent form for this respondent." msgstr "Please settle the informed consent form for this patient." #: classes/Gems/Default/RespondentPlanAction.php:67 -#: classes/Gems/Default/SurveyAction.php:171 msgid "Show respondent" msgstr "Show patient" @@ -2169,36 +2149,40 @@ msgid "Are you sure you want to synchronize all survey sources?" msgstr "Are you sure you want to synchronize all survey sources?" -#: classes/Gems/Default/StaffAction.php:171 +#: classes/Gems/Default/StaffAction.php:137 +msgid "Unsupported UserDefinition" +msgstr "Unsupported UserDefinition" + +#: classes/Gems/Default/StaffAction.php:179 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:172 +#: classes/Gems/Default/StaffAction.php:180 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:192 +#: classes/Gems/Default/StaffAction.php:197 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:249 +#: classes/Gems/Default/StaffAction.php:254 #, php-format msgid "User with id %s already exists but is deleted, do you want to reactivate the account?" msgstr "User with id %s already exists but is deleted, do you want to reactivate the account?" -#: classes/Gems/Default/StaffAction.php:305 +#: classes/Gems/Default/StaffAction.php:310 msgid "Primary function" msgstr "Primary function" -#: classes/Gems/Default/StaffAction.php:315 +#: classes/Gems/Default/StaffAction.php:320 msgid "Can login" msgstr "Can login" -#: classes/Gems/Default/StaffAction.php:316 +#: classes/Gems/Default/StaffAction.php:321 msgid "Logout on survey" msgstr "Logout on survey" -#: classes/Gems/Default/StaffAction.php:391 +#: classes/Gems/Default/StaffAction.php:396 msgid "staff member" msgid_plural "staff members" msgstr[0] "staff member" @@ -2440,7 +2424,7 @@ msgstr "+" #: classes/Gems/Default/TokenPlanAction.php:483 -#: classes/Gems/Default/TrackAction.php:449 +#: classes/Gems/Default/TrackAction.php:450 msgid "token" msgid_plural "tokens" msgstr[0] "token" @@ -2450,68 +2434,68 @@ msgid "Token planning" msgstr "Token planning" -#: classes/Gems/Default/TrackAction.php:120 +#: classes/Gems/Default/TrackAction.php:121 msgid "Respondent number" msgstr "Patient number" -#: classes/Gems/Default/TrackAction.php:121 +#: classes/Gems/Default/TrackAction.php:122 msgid "Respondent name" msgstr "Patient name" -#: classes/Gems/Default/TrackAction.php:171 +#: classes/Gems/Default/TrackAction.php:172 #, php-format msgid "Assignments of this track to %s" msgstr "Assignments of this track to %s" -#: classes/Gems/Default/TrackAction.php:268 -#: classes/Gems/Default/TrackAction.php:281 +#: classes/Gems/Default/TrackAction.php:269 +#: classes/Gems/Default/TrackAction.php:282 msgid "Show tracks" msgstr "Show tracks" -#: classes/Gems/Default/TrackAction.php:273 +#: classes/Gems/Default/TrackAction.php:274 msgid "Show token" msgstr "Show token" -#: classes/Gems/Default/TrackAction.php:366 +#: classes/Gems/Default/TrackAction.php:367 msgid "Track deleted!" msgstr "Track deleted!" -#: classes/Gems/Default/TrackAction.php:386 +#: classes/Gems/Default/TrackAction.php:387 msgid "Track was already deleted." msgstr "Track was already deleted." -#: classes/Gems/Default/TrackAction.php:394 +#: classes/Gems/Default/TrackAction.php:395 #, php-format msgid "Delete %s!" msgstr "Delete %s!" -#: classes/Gems/Default/TrackAction.php:398 +#: classes/Gems/Default/TrackAction.php:399 #, php-format msgid "Watch out! You cannot undo a %s deletion!" msgstr "Watch out! You cannot undo a %s deletion!" -#: classes/Gems/Default/TrackAction.php:409 +#: classes/Gems/Default/TrackAction.php:410 msgid "Do you want to delete this track?" msgstr "Do you want to delete this track?" -#: classes/Gems/Default/TrackAction.php:411 +#: classes/Gems/Default/TrackAction.php:412 msgid "Delete track" msgstr "Delete track" -#: classes/Gems/Default/TrackAction.php:460 +#: classes/Gems/Default/TrackAction.php:461 msgid "Assigned tracks" msgstr "Assigned tracks" -#: classes/Gems/Default/TrackAction.php:482 +#: classes/Gems/Default/TrackAction.php:486 #, php-format msgid "%s track for respondent nr %s" msgstr "%s track for patient nr %s" -#: classes/Gems/Default/TrackAction.php:538 +#: classes/Gems/Default/TrackAction.php:542 msgid "Add track" msgstr "Add track" -#: classes/Gems/Default/TrackAction.php:539 +#: classes/Gems/Default/TrackAction.php:543 msgid "This respondent does not yet have an active track. Add one here." msgstr "This paitent does not yet have an active track. Add one here." @@ -2533,38 +2517,38 @@ msgid "Adding the %s track to respondent %s" msgstr "Adding the %s track to patient %s" -#: classes/Gems/Default/TrackActionAbstract.php:208 +#: classes/Gems/Default/TrackActionAbstract.php:209 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:209 +#: classes/Gems/Default/TrackActionAbstract.php:210 msgid "Assigned by" msgstr "Assigned by" -#: classes/Gems/Default/TrackActionAbstract.php:210 +#: classes/Gems/Default/TrackActionAbstract.php:211 msgid "Start" msgstr "Start" -#: classes/Gems/Default/TrackActionAbstract.php:214 +#: classes/Gems/Default/TrackActionAbstract.php:215 msgid "Comment" msgstr "Comment" -#: classes/Gems/Default/TrackActionAbstract.php:301 +#: classes/Gems/Default/TrackActionAbstract.php:302 #, php-format msgid "Email %s %s" msgstr "Email %s %s" -#: classes/Gems/Default/TrackActionAbstract.php:307 +#: classes/Gems/Default/TrackActionAbstract.php:308 #, php-format msgid "%s %s not found." msgstr "%s %s not found." -#: classes/Gems/Default/TrackActionAbstract.php:487 +#: classes/Gems/Default/TrackActionAbstract.php:488 #, php-format msgid "Overview of %s track for respondent %s" msgstr "Overview of %s track for patient %s" -#: classes/Gems/Default/TrackActionAbstract.php:491 +#: classes/Gems/Default/TrackActionAbstract.php:492 msgid "This track is currently not assigned to this respondent." msgstr "This track is currently not assigned to this patient." @@ -2601,12 +2585,12 @@ msgstr "Code Name" #: classes/Gems/Default/TrackFieldsAction.php:121 -#: classes/Gems/Default/TrackMaintenanceAction.php:211 +#: classes/Gems/Default/TrackMaintenanceAction.php:224 msgid "Values" msgstr "Values" #: classes/Gems/Default/TrackFieldsAction.php:123 -#: classes/Gems/Default/TrackMaintenanceAction.php:213 +#: classes/Gems/Default/TrackMaintenanceAction.php:226 msgid "Required" msgstr "Required" @@ -2624,31 +2608,31 @@ msgid "Fields" msgstr "Fields" -#: classes/Gems/Default/TrackMaintenanceAction.php:149 +#: classes/Gems/Default/TrackMaintenanceAction.php:162 msgid "This may take a while!" msgstr "This may take a while!" -#: classes/Gems/Default/TrackMaintenanceAction.php:150 +#: classes/Gems/Default/TrackMaintenanceAction.php:163 msgid "Check all tracks" msgstr "Check all tracks" -#: classes/Gems/Default/TrackMaintenanceAction.php:151 +#: classes/Gems/Default/TrackMaintenanceAction.php:164 msgid "Checking all tracks will update all existing rounds to the current surveys in the tracks instead of those in use when the track was created." msgstr "Checking all tracks will update all existing rounds to the current surveys in the tracks instead of those in use when the track was created." -#: classes/Gems/Default/TrackMaintenanceAction.php:152 +#: classes/Gems/Default/TrackMaintenanceAction.php:165 msgid "Completed tracks will not be changed. No new tokens will be created when later tokens were completed." msgstr "Completed tracks will not be changed. No new tokens will be created when later tokens were completed." -#: classes/Gems/Default/TrackMaintenanceAction.php:266 +#: classes/Gems/Default/TrackMaintenanceAction.php:279 msgid "fields" msgstr "fields" -#: classes/Gems/Default/TrackMaintenanceAction.php:267 +#: classes/Gems/Default/TrackMaintenanceAction.php:280 msgid "rounds" msgstr "rounds" -#: classes/Gems/Default/TrackMaintenanceAction.php:304 +#: classes/Gems/Default/TrackMaintenanceAction.php:306 #, php-format msgid "%s in track" msgstr "%s in track" @@ -2946,6 +2930,47 @@ msgid "Excel export" msgstr "Excel export" +#: classes/Gems/Model/DbaModel.php:97 +msgid "created" +msgstr "created" + +#: classes/Gems/Model/DbaModel.php:98 +msgid "not created" +msgstr "not created" + +#: classes/Gems/Model/DbaModel.php:99 +msgid "unknown" +msgstr "unknown" + +#: classes/Gems/Model/DbaModel.php:420 +#, php-format +msgid "Executed %2$s creation script %1$s:" +msgstr "Executed %2$s creation script %1$s:" + +#: classes/Gems/Model/DbaModel.php:430 +#, 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/Model/DbaModel.php:434 +#, php-format +msgid "%d record(s) updated in step %d of %d." +msgstr "%d record(s) updated in step %d of %d." + +#: classes/Gems/Model/DbaModel.php:437 +#, php-format +msgid "Script ran step %d of %d succesfully." +msgstr "Script ran step %d of %d succesfully." + +#: classes/Gems/Model/DbaModel.php:440 +msgid " in step " +msgstr " in step " + +#: classes/Gems/Model/DbaModel.php:445 +#, php-format +msgid "No script for %1$s." +msgstr "No script for %1$s." + #: classes/Gems/Selector/DateSelectorAbstract.php:309 msgid "<<" msgstr "<<" @@ -3166,141 +3191,145 @@ msgid "This track type does not allow the creation of new rounds." msgstr "This track type does not allow the creation of new rounds." -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:365 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:370 msgid "Track start" msgstr "Track start" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:366 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:371 msgid "Track end" msgstr "Track end" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:382 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:387 msgid "Start time" msgstr "Start time" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:383 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:388 msgid "Completion time" msgstr "Completion time" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:398 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:403 msgid "Minutes" msgstr "Minutes" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:399 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:404 msgid "Hours" msgstr "Hours" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:400 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:405 msgid "Days" msgstr "Days" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:401 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:406 msgid "Weeks" msgstr "Weeks" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:402 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:407 msgid "Months" msgstr "Months" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:403 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:408 msgid "Quarters" msgstr "Quarters" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:404 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:409 msgid "Years" msgstr "Years" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:438 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:444 msgid "Valid from calculation" msgstr "Valid from calculation" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:439 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:447 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:445 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:453 msgid "Date source" msgstr "Date source" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:440 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:448 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:446 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:454 msgid "Round used" msgstr "Round used" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:441 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:449 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:447 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:455 msgid "Date used" msgstr "Date used" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:442 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:450 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:448 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:456 msgid "Add to date" msgstr "Add to date" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:443 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:451 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:449 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:457 msgid "Add to date unit" msgstr "Add to date unit" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:446 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:452 msgid "Valid for calculation" msgstr "Valid for calculation" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:480 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:486 msgid "Does not expire" msgstr "Does not expire" -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:483 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:489 msgid "Use an answer from a survey." msgstr "Use an answer from a survey." -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:484 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:490 msgid "Use a standard token date." msgstr "Use a standard token date." -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:486 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:492 msgid "Use a track level date." msgstr "Use a track level date." -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:418 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:445 #, php-format msgid "%s track engines cannot be converted to %s track engines." msgstr "%s track engines cannot be converted to %s track engines." -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:661 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:688 #, php-format msgid "%d: %s - %s" msgstr "%d: %s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:664 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:667 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:691 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:694 #, php-format msgid "%d: %s" msgstr "%d: %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:670 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:697 #, php-format msgid "%s - %s" msgstr "%s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:712 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:737 +msgid "Icon" +msgstr "Icon" + +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:740 msgid "After change" msgstr "After change" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:209 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:215 msgid "Measure(d) on" msgstr "Measure(d) on" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:212 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:218 msgid "Completed" msgstr "Completed" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:213 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:219 msgid "Duration in seconds" msgstr "Duration in seconds" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:214 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:220 msgid "Score" msgstr "Score" -#: classes/Gems/Tracker/Model/StandardTokenModel.php:223 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:229 msgid "Assigned to" msgstr "Assigned to" @@ -3312,38 +3341,38 @@ msgid "Use until" msgstr "Use until" -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:138 +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:145 msgid "Question" msgstr "Question" -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:207 +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:215 #, php-format msgid "%s answers for patient number %s" msgstr "%s answers for patient number %s" -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:210 +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:218 #, php-format msgid "Answers for token %s, patient number %s: %s." msgstr "Answers for token %s, patient number %s: %s." -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:223 +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:232 #: 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:227 +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:236 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:128 #: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:168 msgid "No token specified." msgstr "No token specified." -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:232 +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:241 msgid "Close" msgstr "Close" -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:233 +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:242 msgid "Print" msgstr "Print" @@ -3351,6 +3380,11 @@ msgid "Add new round" msgstr "Add new round" +#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:198 +#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:234 +msgid "Add new track" +msgstr "Add new track" + #: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:132 #, php-format msgid "%s round" @@ -3529,7 +3563,7 @@ msgstr[0] "A password should contain at least one number." msgstr[1] "A password should contain at least %d numbers." -#: classes/Gems/User/RadiusUserDefinition.php:174 +#: classes/Gems/User/RadiusUserDefinition.php:175 msgid "Shared secret" msgstr "Shared secret" @@ -3839,19 +3873,19 @@ msgid "One or more IPs are illegal." msgstr "One or more IPs are illegal." -#: snippets/AddTracksSnippet.php:95 +#: snippets/AddTracksSnippet.php:117 msgid "by Respondents" msgstr "by Patients" -#: snippets/AddTracksSnippet.php:99 +#: snippets/AddTracksSnippet.php:121 msgid "by Staff" msgstr "by Staff" -#: snippets/AddTracksSnippet.php:173 +#: snippets/AddTracksSnippet.php:195 msgid "info" msgstr "info" -#: snippets/AddTracksSnippet.php:178 +#: snippets/AddTracksSnippet.php:200 msgid "None available" msgstr "None available" @@ -3892,6 +3926,7 @@ msgstr "Deleted token %s for survey %s." #: snippets/DeleteTrackTokenSnippet.php:286 +#: snippets/EditTrackTokenSnippet.php:174 #, php-format msgid "%d token changed by recalculation." msgid_plural "%d tokens changed by recalculation." @@ -3903,15 +3938,9 @@ msgstr "Lists choices changed." #: snippets/EditSingleSurveyTokenSnippet.php:132 -#: snippets/ShowSingleSurveyTokenSnippet.php:150 msgid "Show survey" msgstr "Show survey" -#: snippets/EditTrackEngineSnippet.php:198 -#: snippets/EditTrackEngineSnippet.php:234 -msgid "Add new track" -msgstr "Add new track" - #: snippets/EditTrackTokenSnippet.php:129 msgid "Recalculate track" msgstr "Recalculate track" @@ -3981,7 +4010,7 @@ msgid "Surveys in %s track" msgstr "Surveys in %s track" -#: snippets/TrackSurveyOverviewSnippet.php:109 +#: snippets/TrackSurveyOverviewSnippet.php:112 msgid "Details" msgstr "Details" @@ -4046,6 +4075,9 @@ msgid "The Pulse software was made possible thanks to support from " msgstr "The Pulse software was made possible thanks to support from " +#~ msgid "Physician" +#~ msgstr "Physician" + #~ msgid "Track deleted." #~ msgstr "Track deleted." @@ -4273,9 +4305,6 @@ #~ msgid "Left" #~ msgstr "Left" -#~ msgid "Creation date" -#~ msgstr "Creation date" - #~ msgid "Created by" #~ msgstr "Created by" Modified: branches/1.5.x/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: branches/1.5.x/library/languages/default-nl.po =================================================================== --- branches/1.5.x/library/languages/default-nl.po 2012-02-13 15:44:10 UTC (rev 469) +++ branches/1.5.x/library/languages/default-nl.po 2012-02-14 10:20:56 UTC (rev 470) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-01-24 12:43+0100\n" +"POT-Creation-Date: 2012-02-14 10:56+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 niet schrijfbaar" -#: classes/GemsEscort.php:893 +#: classes/GemsEscort.php:739 #, php-format +msgid "You are logged in as %s" +msgstr "Ingelogd als %s" + +#: classes/GemsEscort.php:741 +#: classes/Gems/Menu.php:248 +msgid "Logoff" +msgstr "Uitloggen" + +#: classes/GemsEscort.php:744 +msgid "You are not logged in" +msgstr "U bent niet ingelogd" + +#: classes/GemsEscort.php:927 +#, php-format msgid "User: %s" msgstr "Login: %s" -#: classes/GemsEscort.php:918 +#: classes/GemsEscort.php:952 msgid "version" msgstr "versie" -#: 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 "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." -#: classes/GemsEscort.php:1479 +#: classes/GemsEscort.php:1513 msgid "Please check back later." msgstr "Probeer het later opnieuw." -#: 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 "Systeem is in onderhoudsmodus" -#: classes/GemsEscort.php:1496 +#: classes/GemsEscort.php:1530 msgid "No access to site." msgstr "Geen toegang tot website." -#: 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 "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1514 +#: classes/GemsEscort.php:1548 msgid "No access to page" msgstr "Geen toegang tot pagina" -#: classes/GemsEscort.php:1516 +#: classes/GemsEscort.php:1550 #, 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:1526 -#: classes/GemsEscort.php:1538 +#: classes/GemsEscort.php:1560 +#: classes/GemsEscort.php:1572 msgid "You are no longer logged in." msgstr "U bent niet meer ingelogd." -#: classes/GemsEscort.php:1527 +#: classes/GemsEscort.php:1561 msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." @@ -81,31 +95,31 @@ msgid "Combination of organization, username and password not found." msgstr "Combinatie van organisatie, gebruikersnaam en wachtwoord niet gevonden." -#: classes/Gems/Html.php:154 +#: classes/Gems/Html.php:155 msgid "<< First" msgstr "<< Eerste" -#: classes/Gems/Html.php:155 +#: classes/Gems/Html.php:156 msgid "< Previous" msgstr "< Terug" -#: classes/Gems/Html.php:156 +#: classes/Gems/Html.php:157 msgid "Next >" msgstr "Verder >" -#: classes/Gems/Html.php:157 +#: classes/Gems/Html.php:158 msgid "Last >>" msgstr "Laatste >>" -#: 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 "tot" -#: classes/Gems/Html.php:163 +#: classes/Gems/Html.php:164 msgid "of" msgstr "van" @@ -251,10 +265,6 @@ msgid "Token" msgstr "Kenmerk" -#: classes/Gems/Menu.php:248 -msgid "Logoff" -msgstr "Uitloggen" - #: classes/Gems/Menu.php:283 msgid "Track" msgstr "Traject" @@ -413,114 +423,138 @@ msgid "Checks performed" msgstr "Controle uitgevoerd" -#: classes/Gems/UpgradesAbstract.php:164 +#: classes/Gems/Upgrades.php:69 +#: classes/Gems/Upgrades.php:71 +#, php-format +msgid "Executing patchlevel %d" +msgstr "Uitvoeren patchlevel %d" + +#: classes/Gems/Upgrades.php:76 +msgid "Creating new tables" +msgstr "aanmaken nieuwe tabellen" + +#: classes/Gems/Upgrades.php:81 +msgid "Syncing surveys for all sources" +msgstr "Vragenlijsten synchroniseren voor alle bronnen." + +#: classes/Gems/UpgradesAbstract.php:175 +#, php-format +msgid "Finished %s creation script for object %d of %d" +msgstr "Klaar %s met aanmaak script voor object %d van %d" + +#: classes/Gems/UpgradesAbstract.php:206 msgid "Already at max. level." msgstr "Al op het hoogste niveau." -#: classes/Gems/UpgradesAbstract.php:171 +#: classes/Gems/UpgradesAbstract.php:213 #, php-format msgid "Trying upgrade for %s from level %s to level %s" msgstr "Probeert upgrade voor %s van niveau %s naar niveau %s uit te voeren" -#: classes/Gems/UpgradesAbstract.php:179 +#: classes/Gems/UpgradesAbstract.php:221 #, php-format msgid "Trying upgrade for %s to level %s: %s" msgstr "Probeert upgrade voor %s naar niveau %s: %s" -#: classes/Gems/UpgradesAbstract.php:337 +#: classes/Gems/UpgradesAbstract.php:379 msgid "Cache cleaned" msgstr "Cache opgeschoond" -#: classes/Gems/Controller/BrowseEditAction.php:346 +#: classes/Gems/Controller/BrowseEditAction.php:352 #, php-format msgid "New %s..." msgstr "Nieuw %s..." -#: classes/Gems/Controller/BrowseEditAction.php:378 +#: classes/Gems/Controller/BrowseEditAction.php:385 #, php-format msgid "Delete %s" msgstr "Verwijder %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 verwijderd" -#: classes/Gems/Controller/BrowseEditAction.php:396 +#: classes/Gems/Controller/BrowseEditAction.php:403 #, php-format msgid "Edit %s" msgstr "Bewerk %s" -#: classes/Gems/Controller/BrowseEditAction.php:493 +#: classes/Gems/Controller/BrowseEditAction.php:500 msgid "Free search text" msgstr "Vrije zoek tekst" -#: classes/Gems/Controller/BrowseEditAction.php:564 +#: classes/Gems/Controller/BrowseEditAction.php:571 msgid "Search" msgstr "Zoeken" -#: classes/Gems/Controller/BrowseEditAction.php:580 +#: classes/Gems/Controller/BrowseEditAction.php:587 #, php-format msgid "No %s found" msgstr "Geen %s gevonden" -#: 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 "Geen %s gevonden." -#: classes/Gems/Controller/BrowseEditAction.php:768 +#: classes/Gems/Controller/BrowseEditAction.php:778 msgid "Are you sure?" msgstr "Weet u het zeker?" -#: 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 "Ja" -#: 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 "Nee" -#: classes/Gems/Controller/BrowseEditAction.php:838 +#: classes/Gems/Controller/BrowseEditAction.php:848 #, php-format msgid "Unknown %s requested" msgstr "Onjuist %s verzoek" -#: classes/Gems/Controller/BrowseEditAction.php:861 +#: classes/Gems/Controller/BrowseEditAction.php:871 #, php-format msgid "New %1$s..." msgstr "Nieuwe %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:869 +#: classes/Gems/Controller/BrowseEditAction.php:879 msgid "Save" msgstr "Opslaan" -#: 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 opgeslagen" -#: classes/Gems/Controller/BrowseEditAction.php:908 +#: classes/Gems/Controller/BrowseEditAction.php:918 msgid "No changes to save." msgstr "Geen verandering om op te slaan." -#: classes/Gems/Controller/BrowseEditAction.php:917 +#: classes/Gems/Controller/BrowseEditAction.php:927 msgid "Input error! No changes saved!" msgstr "Invoer fout! Veranderingen niet opgeslagen!" -#: classes/Gems/Controller/BrowseEditAction.php:945 +#: classes/Gems/Controller/BrowseEditAction.php:955 #, php-format msgid "Show %s" m... [truncated message content] |
From: <gem...@li...> - 2012-02-13 15:44:17
|
Revision: 469 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=469&view=rev Author: michieltcs Date: 2012-02-13 15:44:10 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Merge r467 from 1.5.0-pulse Revision Links: -------------- http://gemstracker.svn.sourceforge.net/gemstracker/?rev=467&view=rev Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Email/EmailFormAbstract.php Property Changed: ---------------- branches/1.5.x/ branches/1.5.x/library/ branches/1.5.x/new_project/htdocs/gems/ Property changes on: branches/1.5.x ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse:306-430 /tags/1.5.0beta1:305 + /branches/1.5.0-pulse:306-430,467 /tags/1.5.0beta1:305 Property changes on: branches/1.5.x/library ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/library:306-344,346 /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/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 Modified: branches/1.5.x/library/classes/Gems/Email/EmailFormAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/Email/EmailFormAbstract.php 2012-02-13 15:02:18 UTC (rev 468) +++ branches/1.5.x/library/classes/Gems/Email/EmailFormAbstract.php 2012-02-13 15:44:10 UTC (rev 469) @@ -54,7 +54,7 @@ */ protected $escort; - protected $messages; + protected $messages = array(); protected $model; Property changes on: branches/1.5.x/new_project/htdocs/gems ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/new_project/htdocs/gems:306-430 /tags/1.5.0beta1/new_project/htdocs/gems:305 /trunk/new_project/htdocs/gems:461 + /branches/1.5.0-pulse/new_project/htdocs/gems:306-430,467 /tags/1.5.0beta1/new_project/htdocs/gems:305 /trunk/new_project/htdocs/gems:461 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-13 15:02:25
|
Revision: 468 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=468&view=rev Author: mennodekker Date: 2012-02-13 15:02:18 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Fixed crash on respondent/show without pr.respondent.result Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php Modified: branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-13 08:59:49 UTC (rev 467) +++ branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-13 15:02:18 UTC (rev 468) @@ -175,7 +175,7 @@ if ($escort->hasPrivilege('pr.respondent.result')) { $this->addColumn('gto_result', 'calc_result', 'gto_result'); } else { - $this->addColumn('NULL', 'calc_result', 'gto_result'); + $this->addColumn(new Zend_Db_Expr('NULL'), 'calc_result', 'gto_result'); } $this->useTokenAsKey(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-13 09:00:00
|
Revision: 467 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=467&view=rev Author: michieltcs Date: 2012-02-13 08:59:49 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Fix E_NOTICE Modified Paths: -------------- branches/1.5.0-pulse/library/classes/Gems/Email/EmailFormAbstract.php branches/1.5.0-pulse/library/snippets/Organization/OrganizationEditSnippet.php Modified: branches/1.5.0-pulse/library/classes/Gems/Email/EmailFormAbstract.php =================================================================== --- branches/1.5.0-pulse/library/classes/Gems/Email/EmailFormAbstract.php 2012-02-09 11:46:23 UTC (rev 466) +++ branches/1.5.0-pulse/library/classes/Gems/Email/EmailFormAbstract.php 2012-02-13 08:59:49 UTC (rev 467) @@ -54,7 +54,7 @@ */ protected $escort; - protected $messages; + protected $messages = array(); protected $model; Modified: branches/1.5.0-pulse/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- branches/1.5.0-pulse/library/snippets/Organization/OrganizationEditSnippet.php 2012-02-09 11:46:23 UTC (rev 466) +++ branches/1.5.0-pulse/library/snippets/Organization/OrganizationEditSnippet.php 2012-02-13 08:59:49 UTC (rev 467) @@ -54,7 +54,7 @@ public function afterSave($changed) { - $org = $this->loader->getOrganization($data['gor_id_organization']); + $org = $this->loader->getOrganization($changed['gor_id_organization']); $org->invalidateCache(); // Make sure any changes in the allowed list are reflected. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-09 11:46:33
|
Revision: 466 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=466&view=rev Author: matijsdejong Date: 2012-02-09 11:46:23 +0000 (Thu, 09 Feb 2012) Log Message: ----------- Version numbers update to 1.5.1 Track fields with code names added to mail template variables New _layoutLogin moved to GemsEscort Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Default/MailJobAction.php branches/1.5.x/library/classes/Gems/Versions.php branches/1.5.x/library/classes/GemsEscort.php branches/1.5.x/library/classes/MUtil/Version.php branches/1.5.x/library/configs/db/patches.sql Modified: branches/1.5.x/library/classes/Gems/Default/MailJobAction.php =================================================================== --- branches/1.5.x/library/classes/Gems/Default/MailJobAction.php 2012-02-08 17:52:07 UTC (rev 465) +++ branches/1.5.x/library/classes/Gems/Default/MailJobAction.php 2012-02-09 11:46:23 UTC (rev 466) @@ -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: branches/1.5.x/library/classes/Gems/Versions.php =================================================================== --- branches/1.5.x/library/classes/Gems/Versions.php 2012-02-08 17:52:07 UTC (rev 465) +++ branches/1.5.x/library/classes/Gems/Versions.php 2012-02-09 11:46:23 UTC (rev 466) @@ -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: branches/1.5.x/library/classes/GemsEscort.php =================================================================== --- branches/1.5.x/library/classes/GemsEscort.php 2012-02-08 17:52:07 UTC (rev 465) +++ branches/1.5.x/library/classes/GemsEscort.php 2012-02-09 11:46:23 UTC (rev 466) @@ -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; } } Modified: branches/1.5.x/library/classes/MUtil/Version.php =================================================================== --- branches/1.5.x/library/classes/MUtil/Version.php 2012-02-08 17:52:07 UTC (rev 465) +++ branches/1.5.x/library/classes/MUtil/Version.php 2012-02-09 11:46:23 UTC (rev 466) @@ -34,7 +34,7 @@ { const MAJOR = 1; const MINOR = 0; - const BUILD = 30; + const BUILD = 31; public static function get() { Modified: branches/1.5.x/library/configs/db/patches.sql =================================================================== --- branches/1.5.x/library/configs/db/patches.sql 2012-02-08 17:52:07 UTC (rev 465) +++ branches/1.5.x/library/configs/db/patches.sql 2012-02-09 11:46:23 UTC (rev 466) @@ -366,5 +366,6 @@ 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 +-- 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`; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-08 17:52:17
|
Revision: 465 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=465&view=rev Author: matijsdejong Date: 2012-02-08 17:52:07 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Small corrections Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Tracker.php branches/1.5.x/library/languages/default-nl.po Modified: branches/1.5.x/library/classes/Gems/Tracker.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker.php 2012-02-08 12:30:31 UTC (rev 464) +++ branches/1.5.x/library/classes/Gems/Tracker.php 2012-02-08 17:52:07 UTC (rev 465) @@ -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: branches/1.5.x/library/languages/default-nl.po =================================================================== --- branches/1.5.x/library/languages/default-nl.po 2012-02-08 12:30:31 UTC (rev 464) +++ branches/1.5.x/library/languages/default-nl.po 2012-02-08 17:52:07 UTC (rev 465) @@ -384,7 +384,7 @@ #: classes/Gems/Model.php:224 msgid "City" -msgstr "Stad" +msgstr "Woonplaats" #: classes/Gems/Model.php:226 msgid "Phone" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-08 12:30:41
|
Revision: 464 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=464&view=rev Author: matijsdejong Date: 2012-02-08 12:30:31 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Removed reference to getPhysician() Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Default/RespondentAction.php Modified: branches/1.5.x/library/classes/Gems/Default/RespondentAction.php =================================================================== --- branches/1.5.x/library/classes/Gems/Default/RespondentAction.php 2012-02-08 12:30:08 UTC (rev 463) +++ branches/1.5.x/library/classes/Gems/Default/RespondentAction.php 2012-02-08 12:30:31 UTC (rev 464) @@ -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'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-08 12:30:17
|
Revision: 463 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=463&view=rev Author: matijsdejong Date: 2012-02-08 12:30:08 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Icons for track rounds Modified Paths: -------------- branches/1.5.x/new_project/htdocs/gems/css/gems-new.css branches/1.5.x/new_project/htdocs/gems/css/gems.css Added Paths: ----------- branches/1.5.x/new_project/htdocs/gems/icons/ Property Changed: ---------------- branches/1.5.x/new_project/htdocs/gems/ Property changes on: branches/1.5.x/new_project/htdocs/gems ___________________________________________________________________ Added: svn:mergeinfo + /branches/1.5.0-pulse/new_project/htdocs/gems:306-430 /tags/1.5.0beta1/new_project/htdocs/gems:305 /trunk/new_project/htdocs/gems:461 Modified: branches/1.5.x/new_project/htdocs/gems/css/gems-new.css =================================================================== --- branches/1.5.x/new_project/htdocs/gems/css/gems-new.css 2012-02-08 12:24:32 UTC (rev 462) +++ branches/1.5.x/new_project/htdocs/gems/css/gems-new.css 2012-02-08 12:30:08 UTC (rev 463) @@ -131,6 +131,11 @@ text-decoration: line-through; /* Bug in Firefox: line-through remains on for descending inline elements */ } +.icon { + float: right; + padding-right: 4px; +} + input[disabled], .disabled { color: #737373; font-style: italic; Modified: branches/1.5.x/new_project/htdocs/gems/css/gems.css =================================================================== --- branches/1.5.x/new_project/htdocs/gems/css/gems.css 2012-02-08 12:24:32 UTC (rev 462) +++ branches/1.5.x/new_project/htdocs/gems/css/gems.css 2012-02-08 12:30:08 UTC (rev 463) @@ -147,6 +147,11 @@ margin-top: 0; } +.icon { + float: right; + padding-right: 4px; +} + img { border: 0 solid transparent; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-08 12:24:44
|
Revision: 462 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=462&view=rev Author: matijsdejong Date: 2012-02-08 12:24:32 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Standard button use for BrowseEditAction.php Added Icons for track rounds Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php branches/1.5.x/library/classes/Gems/Html.php branches/1.5.x/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php branches/1.5.x/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php branches/1.5.x/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php branches/1.5.x/library/classes/MUtil/Model/FormBridge.php branches/1.5.x/library/configs/db/patches.sql branches/1.5.x/library/configs/db/tables/gems__rounds.40.sql branches/1.5.x/library/snippets/RespondentTokenSnippet.php branches/1.5.x/library/snippets/ShowRoundStepSnippet.php branches/1.5.x/library/snippets/TrackSurveyOverviewSnippet.php branches/1.5.x/library/snippets/TrackTokenOverviewSnippet.php Added Paths: ----------- branches/1.5.x/library/classes/MUtil/Form/Element/Multiselect.php branches/1.5.x/library/classes/MUtil/Form/Element/Select.php branches/1.5.x/library/classes/MUtil/View/Helper/FormSelectHtml.php Modified: branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/classes/Gems/Html.php =================================================================== --- branches/1.5.x/library/classes/Gems/Html.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/classes/Gems/Html.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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('NULL', 'calc_result', 'gto_result'); + } $this->useTokenAsKey(); } Added: branches/1.5.x/library/classes/MUtil/Form/Element/Multiselect.php =================================================================== --- branches/1.5.x/library/classes/MUtil/Form/Element/Multiselect.php (rev 0) +++ branches/1.5.x/library/classes/MUtil/Form/Element/Multiselect.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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'; +} Added: branches/1.5.x/library/classes/MUtil/Form/Element/Select.php =================================================================== --- branches/1.5.x/library/classes/MUtil/Form/Element/Select.php (rev 0) +++ branches/1.5.x/library/classes/MUtil/Form/Element/Select.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/classes/MUtil/Model/FormBridge.php =================================================================== --- branches/1.5.x/library/classes/MUtil/Model/FormBridge.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/classes/MUtil/Model/FormBridge.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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); } Added: branches/1.5.x/library/classes/MUtil/View/Helper/FormSelectHtml.php =================================================================== --- branches/1.5.x/library/classes/MUtil/View/Helper/FormSelectHtml.php (rev 0) +++ branches/1.5.x/library/classes/MUtil/View/Helper/FormSelectHtml.php 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/configs/db/patches.sql =================================================================== --- branches/1.5.x/library/configs/db/patches.sql 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/configs/db/patches.sql 2012-02-08 12:24:32 UTC (rev 462) @@ -364,4 +364,7 @@ -- 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 + +-- 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: branches/1.5.x/library/configs/db/tables/gems__rounds.40.sql =================================================================== --- branches/1.5.x/library/configs/db/tables/gems__rounds.40.sql 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/configs/db/tables/gems__rounds.40.sql 2012-02-08 12:24:32 UTC (rev 462) @@ -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: branches/1.5.x/library/snippets/RespondentTokenSnippet.php =================================================================== --- branches/1.5.x/library/snippets/RespondentTokenSnippet.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/snippets/RespondentTokenSnippet.php 2012-02-08 12:24:32 UTC (rev 462) @@ -104,6 +104,8 @@ $roundDescription[] = $HTML->if($bridge->calc_round_description, $HTML->small(' [', $bridge->calc_round_description, ']')); $roundDescription[] = $HTML->small(' [', $bridge->createSortLink('calc_round_description'), ']'); + $roundIcon[] = MUtil_Lazy::iif($bridge->gro_icon_file, MUtil_Html::create('img', array('src' => $bridge->gro_icon_file, 'class' => 'icon'))); + 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)); @@ -120,7 +122,7 @@ // $bridge->colgroup(array('span' => 3, 'width' => '9em')); $bridge->addMultiSort($track); - $bridge->addMultiSort('gsu_survey_name', $roundDescription); + $bridge->addMultiSort('gsu_survey_name', $roundDescription, $roundIcon); $bridge->addSortable('ggp_name'); $bridge->addSortable('calc_used_date', null, $HTML->if($bridge->is_completed, 'disabled date', 'enabled date')); $bridge->addSortable('gto_changed'); @@ -135,10 +137,6 @@ $bridge->useRowHref = false; - $title = $HTML->strong($this->_('+')); - - $showLinks[] = $this->createMenuLink($bridge, 'track', 'show', $title); - $showLinks[] = $this->createMenuLink($bridge, 'survey', 'show', $title); $actionLinks[] = $this->createMenuLink($bridge, 'track', 'answer'); $actionLinks[] = $this->createMenuLink($bridge, 'survey', 'answer'); $actionLinks[] = array( @@ -149,18 +147,13 @@ // MUtil_Lazy::comp($bridge->val1, '==', $bridge->val2)->if($bridge->val3, 'broehaha'); // Remove nulls - $showLinks = array_filter($showLinks); $actionLinks = array_filter($actionLinks); - if ($showLinks || $actionLinks) { - foreach ($showLinks as $showLink) { - if ($showLink) { - $showLink->title = array($this->_('Token'), $bridge->gto_id_token->strtoupper()); - } - } + if ($actionLinks) { $bridge->addItemLink($actionLinks); - $bridge->addItemLink($showLinks); } + + $this->addTokenLinks($bridge); } /** Modified: branches/1.5.x/library/snippets/ShowRoundStepSnippet.php =================================================================== --- branches/1.5.x/library/snippets/ShowRoundStepSnippet.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/snippets/ShowRoundStepSnippet.php 2012-02-08 12:24:32 UTC (rev 462) @@ -94,6 +94,7 @@ $bridge->addItem('gro_id_survey'); $bridge->addItem('gro_round_description'); $bridge->addItem('gro_id_order'); + $bridge->addItem('gro_icon_file'); $bridge->addItem($model->get('valid_after', 'value')); $this->_addIf(array('grp_valid_after_source', 'grp_valid_after_id', 'grp_valid_after_field'), $bridge, $model); @@ -109,6 +110,13 @@ $bridge->addItem('gro_active'); $bridge->addItem('gro_changed_event'); + + $menuItem = $this->menu->find(array( + $this->request->getControllerKey() => $this->request->getControllerName(), + $this->request->getActionKey() => 'edit')); + if ($menuItem) { + $bridge->tbody()->onclick = array('location.href=\'', $menuItem->toHRefAttribute($this->request), '\';'); + } } /** Modified: branches/1.5.x/library/snippets/TrackSurveyOverviewSnippet.php =================================================================== --- branches/1.5.x/library/snippets/TrackSurveyOverviewSnippet.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/snippets/TrackSurveyOverviewSnippet.php 2012-02-08 12:24:32 UTC (rev 462) @@ -105,7 +105,10 @@ $table->addColumn($link->toActionLinkLower($trackRepeater)); } - $table->addColumn($trackRepeater->gsu_survey_name, $this->_('Survey')); + $surveyName[] = $trackRepeater->gsu_survey_name; + $surveyName[] = MUtil_Lazy::iif($trackRepeater->gro_icon_file, MUtil_Html::create('img', array('src' => $trackRepeater->gro_icon_file, 'class' => 'icon'))); + + $table->addColumn($surveyName, $this->_('Survey')); $table->addColumn($trackRepeater->gro_round_description, $this->_('Details')); $table->addColumn($trackRepeater->ggp_name, $this->_('By')); $table->addColumn($trackRepeater->gsu_survey_description->call(array(__CLASS__, 'oneLine')), @@ -116,7 +119,7 @@ private function getRepeater($trackId) { $sql = " - SELECT gro_id_round, gro_id_track, gro_round_description, gro_valid_after, gro_valid_for, gro_used_date, gro_active, + SELECT gro_id_round, gro_id_track, gro_round_description, gro_icon_file, gro_valid_after, gro_valid_for, gro_used_date, gro_active, gsu_id_survey, gsu_survey_name, gsu_survey_description, gsu_survey_pdf, gsu_active, ggp_name FROM gems__rounds LEFT JOIN gems__surveys ON gro_id_survey = gsu_id_survey Modified: branches/1.5.x/library/snippets/TrackTokenOverviewSnippet.php =================================================================== --- branches/1.5.x/library/snippets/TrackTokenOverviewSnippet.php 2012-02-08 12:15:39 UTC (rev 461) +++ branches/1.5.x/library/snippets/TrackTokenOverviewSnippet.php 2012-02-08 12:24:32 UTC (rev 462) @@ -103,7 +103,8 @@ $showLinks = array_filter($showLinks); // Columns - $bridge->addSortable('gsu_survey_name'); + $bridge->addSortable('gsu_survey_name') + ->append(MUtil_Lazy::iif($bridge->gro_icon_file, MUtil_Html::create('img', array('src' => $bridge->gro_icon_file, 'class' => 'icon')))); $bridge->addSortable('gto_round_description'); $bridge->addSortable('ggp_name'); $bridge->addSortable('gto_valid_from', null, 'date'); @@ -133,7 +134,6 @@ } $bridge->addItemLink($showLinks); } - } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-08 12:15:50
|
Revision: 461 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=461&view=rev Author: matijsdejong Date: 2012-02-08 12:15:39 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Icons for track rounds Modified Paths: -------------- trunk/new_project/htdocs/gems/css/gems-new.css trunk/new_project/htdocs/gems/css/gems.css Added Paths: ----------- trunk/new_project/htdocs/gems/icons/ trunk/new_project/htdocs/gems/icons/about.png trunk/new_project/htdocs/gems/icons/arrow_down_blue.png trunk/new_project/htdocs/gems/icons/arrow_down_green.png trunk/new_project/htdocs/gems/icons/eye.png trunk/new_project/htdocs/gems/icons/eyeglasses.png trunk/new_project/htdocs/gems/icons/flashlight.png trunk/new_project/htdocs/gems/icons/flower_blue.png trunk/new_project/htdocs/gems/icons/flower_red.png trunk/new_project/htdocs/gems/icons/heart.png trunk/new_project/htdocs/gems/icons/heart_broken.png trunk/new_project/htdocs/gems/icons/lifebelt.png trunk/new_project/htdocs/gems/icons/lightbulb.png trunk/new_project/htdocs/gems/icons/lightbulb_on.png trunk/new_project/htdocs/gems/icons/signpost.png trunk/new_project/htdocs/gems/icons/signpost2.png trunk/new_project/htdocs/gems/icons/signpost_add.png trunk/new_project/htdocs/gems/icons/star_blue.png trunk/new_project/htdocs/gems/icons/star_green.png trunk/new_project/htdocs/gems/icons/star_grey.png trunk/new_project/htdocs/gems/icons/star_red.png trunk/new_project/htdocs/gems/icons/symbol_exclamationmark.png trunk/new_project/htdocs/gems/icons/trafficlight_green.png trunk/new_project/htdocs/gems/icons/trafficlight_off.png trunk/new_project/htdocs/gems/icons/trafficlight_on.png trunk/new_project/htdocs/gems/icons/trafficlight_red.png trunk/new_project/htdocs/gems/icons/trafficlight_red_yellow.png trunk/new_project/htdocs/gems/icons/trafficlight_yellow.png Modified: trunk/new_project/htdocs/gems/css/gems-new.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems-new.css 2012-02-08 12:11:21 UTC (rev 460) +++ trunk/new_project/htdocs/gems/css/gems-new.css 2012-02-08 12:15:39 UTC (rev 461) @@ -131,6 +131,11 @@ text-decoration: line-through; /* Bug in Firefox: line-through remains on for descending inline elements */ } +.icon { + float: right; + padding-right: 4px; +} + input[disabled], .disabled { color: #737373; font-style: italic; Modified: trunk/new_project/htdocs/gems/css/gems.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems.css 2012-02-08 12:11:21 UTC (rev 460) +++ trunk/new_project/htdocs/gems/css/gems.css 2012-02-08 12:15:39 UTC (rev 461) @@ -147,6 +147,11 @@ margin-top: 0; } +.icon { + float: right; + padding-right: 4px; +} + img { border: 0 solid transparent; } Added: trunk/new_project/htdocs/gems/icons/about.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/arrow_down_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/arrow_down_blue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/arrow_down_green.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/arrow_down_green.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/eye.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/eye.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/eyeglasses.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/eyeglasses.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/flashlight.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/flashlight.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/flower_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/flower_blue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/flower_red.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/flower_red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/heart.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/heart.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/heart_broken.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/heart_broken.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/lifebelt.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/lifebelt.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/lightbulb.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/lightbulb.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/lightbulb_on.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/lightbulb_on.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/signpost.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/signpost.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/signpost2.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/signpost2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/signpost_add.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/signpost_add.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/star_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/star_blue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/star_green.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/star_green.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/star_grey.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/star_grey.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/star_red.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/star_red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/symbol_exclamationmark.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/symbol_exclamationmark.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/trafficlight_green.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/trafficlight_green.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/trafficlight_off.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/trafficlight_off.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/trafficlight_on.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/trafficlight_on.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/trafficlight_red.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/trafficlight_red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/trafficlight_red_yellow.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/trafficlight_red_yellow.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/trafficlight_yellow.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/trafficlight_yellow.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-08 12:11:31
|
Revision: 460 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=460&view=rev Author: matijsdejong Date: 2012-02-08 12:11:21 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Modified Paths: -------------- branches/tmplib/classes/Gems/Controller/BrowseEditAction.php branches/tmplib/classes/Gems/Html.php branches/tmplib/classes/Gems/Snippets/TokenModelSnippetAbstract.php branches/tmplib/classes/Gems/Tracker/Engine/StepEngineAbstract.php branches/tmplib/classes/Gems/Tracker/Engine/TrackEngineAbstract.php branches/tmplib/classes/Gems/Tracker/Model/StandardTokenModel.php branches/tmplib/classes/MUtil/Model/FormBridge.php branches/tmplib/configs/db/patches.sql branches/tmplib/configs/db/tables/gems__rounds.40.sql branches/tmplib/snippets/RespondentTokenSnippet.php branches/tmplib/snippets/ShowRoundStepSnippet.php branches/tmplib/snippets/TrackSurveyOverviewSnippet.php branches/tmplib/snippets/TrackTokenOverviewSnippet.php Added Paths: ----------- branches/tmplib/ Property changes on: branches/tmplib ___________________________________________________________________ Added: svn:mergeinfo + /branches/1.5.0-pulse/library:306-344,346 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 Modified: branches/tmplib/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/classes/Gems/Controller/BrowseEditAction.php 2012-02-08 12:11:21 UTC (rev 460) @@ -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: branches/tmplib/classes/Gems/Html.php =================================================================== --- branches/1.5.x/library/classes/Gems/Html.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/classes/Gems/Html.php 2012-02-08 12:11:21 UTC (rev 460) @@ -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: branches/tmplib/classes/Gems/Snippets/TokenModelSnippetAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/Snippets/TokenModelSnippetAbstract.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/classes/Gems/Snippets/TokenModelSnippetAbstract.php 2012-02-08 12:11:21 UTC (rev 460) @@ -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: branches/tmplib/classes/Gems/Tracker/Engine/StepEngineAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-08 12:11:21 UTC (rev 460) @@ -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: branches/tmplib/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-02-08 12:11:21 UTC (rev 460) @@ -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: branches/tmplib/classes/Gems/Tracker/Model/StandardTokenModel.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/classes/Gems/Tracker/Model/StandardTokenModel.php 2012-02-08 12:11:21 UTC (rev 460) @@ -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('NULL', 'calc_result', 'gto_result'); + } $this->useTokenAsKey(); } Modified: branches/tmplib/classes/MUtil/Model/FormBridge.php =================================================================== --- branches/1.5.x/library/classes/MUtil/Model/FormBridge.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/classes/MUtil/Model/FormBridge.php 2012-02-08 12:11:21 UTC (rev 460) @@ -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: branches/tmplib/configs/db/patches.sql =================================================================== --- branches/1.5.x/library/configs/db/patches.sql 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/configs/db/patches.sql 2012-02-08 12:11:21 UTC (rev 460) @@ -364,4 +364,7 @@ -- 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 + +-- 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: branches/tmplib/configs/db/tables/gems__rounds.40.sql =================================================================== --- branches/1.5.x/library/configs/db/tables/gems__rounds.40.sql 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/configs/db/tables/gems__rounds.40.sql 2012-02-08 12:11:21 UTC (rev 460) @@ -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: branches/tmplib/snippets/RespondentTokenSnippet.php =================================================================== --- branches/1.5.x/library/snippets/RespondentTokenSnippet.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/snippets/RespondentTokenSnippet.php 2012-02-08 12:11:21 UTC (rev 460) @@ -104,6 +104,8 @@ $roundDescription[] = $HTML->if($bridge->calc_round_description, $HTML->small(' [', $bridge->calc_round_description, ']')); $roundDescription[] = $HTML->small(' [', $bridge->createSortLink('calc_round_description'), ']'); + $roundIcon[] = MUtil_Lazy::iif($bridge->gro_icon_file, MUtil_Html::create('img', array('src' => $bridge->gro_icon_file, 'class' => 'icon'))); + 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)); @@ -120,7 +122,7 @@ // $bridge->colgroup(array('span' => 3, 'width' => '9em')); $bridge->addMultiSort($track); - $bridge->addMultiSort('gsu_survey_name', $roundDescription); + $bridge->addMultiSort('gsu_survey_name', $roundDescription, $roundIcon); $bridge->addSortable('ggp_name'); $bridge->addSortable('calc_used_date', null, $HTML->if($bridge->is_completed, 'disabled date', 'enabled date')); $bridge->addSortable('gto_changed'); @@ -135,10 +137,6 @@ $bridge->useRowHref = false; - $title = $HTML->strong($this->_('+')); - - $showLinks[] = $this->createMenuLink($bridge, 'track', 'show', $title); - $showLinks[] = $this->createMenuLink($bridge, 'survey', 'show', $title); $actionLinks[] = $this->createMenuLink($bridge, 'track', 'answer'); $actionLinks[] = $this->createMenuLink($bridge, 'survey', 'answer'); $actionLinks[] = array( @@ -149,18 +147,13 @@ // MUtil_Lazy::comp($bridge->val1, '==', $bridge->val2)->if($bridge->val3, 'broehaha'); // Remove nulls - $showLinks = array_filter($showLinks); $actionLinks = array_filter($actionLinks); - if ($showLinks || $actionLinks) { - foreach ($showLinks as $showLink) { - if ($showLink) { - $showLink->title = array($this->_('Token'), $bridge->gto_id_token->strtoupper()); - } - } + if ($actionLinks) { $bridge->addItemLink($actionLinks); - $bridge->addItemLink($showLinks); } + + $this->addTokenLinks($bridge); } /** Modified: branches/tmplib/snippets/ShowRoundStepSnippet.php =================================================================== --- branches/1.5.x/library/snippets/ShowRoundStepSnippet.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/snippets/ShowRoundStepSnippet.php 2012-02-08 12:11:21 UTC (rev 460) @@ -94,6 +94,7 @@ $bridge->addItem('gro_id_survey'); $bridge->addItem('gro_round_description'); $bridge->addItem('gro_id_order'); + $bridge->addItem('gro_icon_file'); $bridge->addItem($model->get('valid_after', 'value')); $this->_addIf(array('grp_valid_after_source', 'grp_valid_after_id', 'grp_valid_after_field'), $bridge, $model); @@ -109,6 +110,13 @@ $bridge->addItem('gro_active'); $bridge->addItem('gro_changed_event'); + + $menuItem = $this->menu->find(array( + $this->request->getControllerKey() => $this->request->getControllerName(), + $this->request->getActionKey() => 'edit')); + if ($menuItem) { + $bridge->tbody()->onclick = array('location.href=\'', $menuItem->toHRefAttribute($this->request), '\';'); + } } /** Modified: branches/tmplib/snippets/TrackSurveyOverviewSnippet.php =================================================================== --- branches/1.5.x/library/snippets/TrackSurveyOverviewSnippet.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/snippets/TrackSurveyOverviewSnippet.php 2012-02-08 12:11:21 UTC (rev 460) @@ -105,7 +105,10 @@ $table->addColumn($link->toActionLinkLower($trackRepeater)); } - $table->addColumn($trackRepeater->gsu_survey_name, $this->_('Survey')); + $surveyName[] = $trackRepeater->gsu_survey_name; + $surveyName[] = MUtil_Lazy::iif($trackRepeater->gro_icon_file, MUtil_Html::create('img', array('src' => $trackRepeater->gro_icon_file, 'class' => 'icon'))); + + $table->addColumn($surveyName, $this->_('Survey')); $table->addColumn($trackRepeater->gro_round_description, $this->_('Details')); $table->addColumn($trackRepeater->ggp_name, $this->_('By')); $table->addColumn($trackRepeater->gsu_survey_description->call(array(__CLASS__, 'oneLine')), @@ -116,7 +119,7 @@ private function getRepeater($trackId) { $sql = " - SELECT gro_id_round, gro_id_track, gro_round_description, gro_valid_after, gro_valid_for, gro_used_date, gro_active, + SELECT gro_id_round, gro_id_track, gro_round_description, gro_icon_file, gro_valid_after, gro_valid_for, gro_used_date, gro_active, gsu_id_survey, gsu_survey_name, gsu_survey_description, gsu_survey_pdf, gsu_active, ggp_name FROM gems__rounds LEFT JOIN gems__surveys ON gro_id_survey = gsu_id_survey Modified: branches/tmplib/snippets/TrackTokenOverviewSnippet.php =================================================================== --- branches/1.5.x/library/snippets/TrackTokenOverviewSnippet.php 2012-02-07 15:38:49 UTC (rev 459) +++ branches/tmplib/snippets/TrackTokenOverviewSnippet.php 2012-02-08 12:11:21 UTC (rev 460) @@ -103,7 +103,8 @@ $showLinks = array_filter($showLinks); // Columns - $bridge->addSortable('gsu_survey_name'); + $bridge->addSortable('gsu_survey_name') + ->append(MUtil_Lazy::iif($bridge->gro_icon_file, MUtil_Html::create('img', array('src' => $bridge->gro_icon_file, 'class' => 'icon')))); $bridge->addSortable('gto_round_description'); $bridge->addSortable('ggp_name'); $bridge->addSortable('gto_valid_from', null, 'date'); @@ -133,7 +134,6 @@ } $bridge->addItemLink($showLinks); } - } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-07 15:38:55
|
Revision: 459 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=459&view=rev Author: mennodekker Date: 2012-02-07 15:38:49 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Fixed #55: Do not allow reset email when person has no email Modified Paths: -------------- branches/1.5.x/library/classes/Gems/User/DbUserDefinitionAbstract.php Modified: branches/1.5.x/library/classes/Gems/User/DbUserDefinitionAbstract.php =================================================================== --- branches/1.5.x/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-02-07 15:17:46 UTC (rev 458) +++ branches/1.5.x/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-02-07 15:38:49 UTC (rev 459) @@ -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; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-07 15:17:56
|
Revision: 458 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=458&view=rev Author: mennodekker Date: 2012-02-07 15:17:46 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Fixed recalc problem: always saving the completion time, even when it was the same as before Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Tracker/Token.php Modified: branches/1.5.x/library/classes/Gems/Tracker/Token.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Token.php 2012-02-07 11:24:23 UTC (rev 457) +++ branches/1.5.x/library/classes/Gems/Tracker/Token.php 2012-02-07 15:17:46 UTC (rev 458) @@ -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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-02-07 12:27:04
|
Revision: 457 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=457&view=rev Author: mennodekker Date: 2012-02-07 11:24:23 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Merged all changes up to rev 455 (=tags/1.5.0) Revision Links: -------------- http://gemstracker.svn.sourceforge.net/gemstracker/?rev=455&view=rev Modified Paths: -------------- trunk/library/classes/Gems/Auth/Adapter/Callback.php trunk/library/classes/Gems/Communication/RespondentWriter.php trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Controller/ModelActionAbstract.php trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/DatabaseAction.php trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/Gems/Default/SourceAction.php trunk/library/classes/Gems/Default/StaffAction.php trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/Gems/Default/TrackAction.php trunk/library/classes/Gems/Default/TrackActionAbstract.php trunk/library/classes/Gems/Default/TrackMaintenanceAction.php trunk/library/classes/Gems/Form/TableForm.php trunk/library/classes/Gems/Menu.php trunk/library/classes/Gems/Model/DbaModel.php trunk/library/classes/Gems/Project/ProjectSettings.php trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php trunk/library/classes/Gems/Snippets/ModelItemTableSnippetAbstract.php trunk/library/classes/Gems/Snippets/ModelItemTableSnippetGeneric.php trunk/library/classes/Gems/Snippets/ModelItemYesNoDeleteSnippetGeneric.php trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php trunk/library/classes/Gems/Snippets/ModelTableSnippetGeneric.php trunk/library/classes/Gems/TabForm.php trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php trunk/library/classes/Gems/Tracker/Model/TrackModel.php trunk/library/classes/Gems/Tracker/RespondentTrack.php trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php trunk/library/classes/Gems/Tracker.php trunk/library/classes/Gems/Upgrades.php trunk/library/classes/Gems/UpgradesAbstract.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/MUtil/Controller/Action.php trunk/library/classes/MUtil/Html/Creator.php trunk/library/classes/MUtil/Html/HtmlElement.php trunk/library/classes/MUtil/Html/ImgElement.php trunk/library/classes/MUtil/Html/TBodyElement.php trunk/library/classes/MUtil/Html.php trunk/library/classes/MUtil/Lazy.php trunk/library/classes/MUtil/Model/FormBridge.php trunk/library/classes/MUtil/Model/VerticalTableBridge.php trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__radius_config.999.sql trunk/library/layouts/scripts/gemsnew.phtml trunk/library/snippets/AddTracksSnippet.php trunk/library/snippets/EditTrackEngineSnippet.php trunk/library/snippets/EditTrackSnippet.php trunk/library/snippets/Generic/AutosearchForm.php trunk/library/snippets/Generic/CurrentButtonRow.php trunk/library/snippets/Generic/ModelFormSnippet.php trunk/library/snippets/Generic/ModelItemTableSnippet.php trunk/library/snippets/Generic/ModelItemYesNoDeleteSnippet.php trunk/library/snippets/Generic/ModelTabFormSnippet.php trunk/library/snippets/Generic/ModelTableSnippet.php trunk/library/snippets/Mail/Log/MailLogBrowseSnippet.php trunk/library/snippets/Organization/ChooseOrganizationSnippet.php trunk/library/snippets/Organization/OrganizationEditSnippet.php trunk/library/snippets/Organization/OrganizationTableSnippet.php trunk/library/snippets/Respondent/MultiOrganizationTab.php trunk/library/snippets/RespondentTokenSnippet.php trunk/library/snippets/ShowTrackTokenSnippet.php trunk/library/snippets/Track/AvailableTracksSnippets.php trunk/new_project/htdocs/gems/css/gems-new.css trunk/new_project/htdocs/gems/css/gems.css Added Paths: ----------- trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php Property Changed: ---------------- trunk/ trunk/library/ Property changes on: trunk ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse:306-342,344,346 /tags/1.5.0beta1:305 + /branches/1.5.0-pulse:306-430 /branches/1.5.x:426-455 /tags/1.5.0beta1:305 Property changes on: trunk/library ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/library:306-344,346 /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 /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 Modified: trunk/library/classes/Gems/Auth/Adapter/Callback.php =================================================================== --- trunk/library/classes/Gems/Auth/Adapter/Callback.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Auth/Adapter/Callback.php 2012-02-07 11:24:23 UTC (rev 457) @@ -43,8 +43,25 @@ */ class Gems_Auth_Adapter_Callback implements Zend_Auth_Adapter_Interface { + /** + * The callback to use + * + * @var callback + */ private $_callback; + + /** + * The identity to check + * + * @var string + */ private $_identity; + + /** + * The optional parameters to pass to the callback + * + * @var array + */ private $_params; /** @@ -54,9 +71,9 @@ * return true or false and in that case this adapter will wrap the result * in a Zend_Auth_Result * - * @param type $callback A valid callback - * @param type $identity The identity to use - * @param type $params Array of parameters needed for the callback + * @param callback $callback A valid callback + * @param string $identity The identity to use + * @param array $params Array of parameters needed for the callback */ public function __construct($callback, $identity, $params) { Modified: trunk/library/classes/Gems/Communication/RespondentWriter.php =================================================================== --- trunk/library/classes/Gems/Communication/RespondentWriter.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Communication/RespondentWriter.php 2012-02-07 11:24:23 UTC (rev 457) @@ -41,9 +41,11 @@ interface Gems_Communication_RespondentWriter { /** - * Writes the respondent + * Writes the respondent, creating a new one or updating the existing record + * * @param Gems_Communication_RespondentContainer $respondent - * @return int The internal id of the created/updated respondent + * @param int $userId + * @return boolean True if a new respondent was added, false if one was updated * @throws Gems_Communication_Exception */ public function writeRespondent(Gems_Communication_RespondentContainer $respondent, &$userId); Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -292,7 +292,7 @@ */ public function beforeFormDisplay ($form, $isNew) { - if ($this->useTabbedForms) { + if ($this->useTabbedForms || $form instanceof Gems_Form_TableForm) { /* Not needed anymore @@TODO: Remove when proven, as there is a set tab //Create the tabs tried in $form->render() but somehow that is never reached if ($form instanceof Gems_TabForm) { @@ -304,8 +304,11 @@ $element = new MUtil_Form_Element_Html('formLinks'); $element->setValue($links); $element->setOrder(999); - $form->resetContext(); + if ($form instanceof Gems_TabForm) { + $form->resetContext(); + } $form->addElement($element); + $form->addDisplayGroup(array('formLinks'), 'form_buttons'); } } else { $table = new MUtil_Html_TableElement(array('class' => 'formTable')); @@ -359,6 +362,7 @@ $form = new Gems_TabForm($options); } else { $form = parent::createForm($options); + //$form = new Gems_Form_TableForm($options); } return $form; @@ -713,6 +717,9 @@ $data = $newData + $data; } + if ($form instanceof Gems_TabForm) { + $form->resetContext(); + } return $form; } Modified: trunk/library/classes/Gems/Controller/ModelActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelActionAbstract.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Controller/ModelActionAbstract.php 2012-02-07 11:24:23 UTC (rev 457) @@ -147,13 +147,30 @@ } } + /** + * Return the current request ID, if any. + * + * Overrule this function if the last item in the page title + * should be something other than te value of + * MUtil_Model::REQUEST_ID. + * + * @return mixed + */ public function getInstanceId() { - if ($id = $this->request->getParam(MUtil_Model::REQUEST_ID)) { + if ($id = $this->_getParam(MUtil_Model::REQUEST_ID)) { return $id; } } + /** + * Returns the current html/head/title for this page. + * + * If the title is an array the seperator concatenates the parts. + * + * @param string $separator + * @return string + */ public function getTitle($separator = null) { if ($title_set = parent::getTitle($separator)) { Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-02-07 11:24:23 UTC (rev 457) @@ -208,6 +208,47 @@ } /** + * Return the current request ID, if any. + * + * Overrule this function if the last item in the page title + * should be something other than te value of + * MUtil_Model::REQUEST_ID. + * + * @return mixed + */ + public function getInstanceId() + { + if ($id = $this->_getParam(MUtil_Model::REQUEST_ID)) { + return $id; + } + } + + /** + * Returns the current html/head/title for this page. + * + * If the title is an array the seperator concatenates the parts. + * + * @param string $separator + * @return string + */ + public function getTitle($separator = null) + { + if ($title_set = parent::getTitle($separator)) { + return $title_set; + } + + $title = array(); + foreach($this->menu->getActivePath($this->getRequest()) as $menuItem) { + $title[] = $menuItem->get('label'); + } + if ($id = $this->getInstanceId()) { + $title[] = $id; + } + + return implode($separator, $title); + } + + /** * Intializes the html component. * * @param boolean $reset Throws away any existing html output when true Modified: trunk/library/classes/Gems/Default/DatabaseAction.php =================================================================== --- trunk/library/classes/Gems/Default/DatabaseAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/DatabaseAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -48,50 +48,6 @@ { public $sortKey = array('group' => SORT_ASC, 'type' => SORT_ASC, 'name' => SORT_ASC); - private function _runScript(array $data, $includeResultSets = false) - { - $results = array(); - $this->_runScripts($data, $results, $includeResultSets); - return $results; - } - - private function _runScripts(array $data, array &$results, $includeResultSets = false) - { - if ($data['script']) { - $queries = MUtil_Parser_Sql_WordsParser::splitStatements($data['script'], false); - $qCount = count($queries); - - $results[] = sprintf($this->_('Executed %2$s creation script %1$s:'), $data['name'], $this->_(strtolower($data['type']))); - $i = 1; - $resultSet = 1; - - foreach ($queries as $query) { - $sql = (string) $query; - try { - $stmt = $this->db->query($sql); - if ($rows = $stmt->rowCount()) { - if ($includeResultSets && ($data = $stmt->fetchAll())) { - $results[] = sprintf($this->_('%d record(s) returned as result set %d in step %d of %d.'), $rows, $resultSet, $i, $qCount); - $results[] = $data; - $resultSet++; - } else { - $results[] = sprintf($this->_('%d record(s) updated in step %d of %d.'), $rows, $i, $qCount); - } - } else { - $results[] = sprintf($this->_('Script ran step %d of %d succesfully.'), $i, $qCount); - } - } catch (Zend_Db_Statement_Exception $e) { - $results[] = $e->getMessage() . $this->_(' in step ') . $i . ':<pre>' . $sql . '</pre>'; - } - $i++; - } - } else { - $results[] = sprintf($this->_('No script for %1$s.'), $data['name']); - } - - return $results; - } - /** * Set the parameters needed by the menu. * @@ -168,10 +124,7 @@ $model->set('location', 'label', $this->_('Location')); } // $model->set('path', 'label', $this->_('Path')); - $model->set('state', 'label', $this->_('Status'), 'multiOptions', array( - Gems_Model_DbaModel::STATE_CREATED => $this->_('created'), - Gems_Model_DbaModel::STATE_DEFINED => $this->_('not created'), - Gems_Model_DbaModel::STATE_UNKNOWN => $this->_('unknown'))); + $model->set('state', 'label', $this->_('Status')); if ($detailed) { $model->set('script', 'label', $this->_('Script'), 'itemDisplay', 'pre'); @@ -482,7 +435,7 @@ $model = $this->getModel(); $data = $model->loadFirst(); - $results = $this->_runScript($data); + $results = $model->runScript($data); $this->addMessage($results); $this->_reroute(array('action' => 'show')); @@ -497,11 +450,13 @@ if ($this->_getParam('confirmed')) { if ($objects) { + $results = array(); $results[] = sprintf($this->_('Starting %d object creation scripts.'), $oCount) . '<br/>'; $i = 1; foreach ($objects as $data) { - $this->_runScripts($data, $results); + $result = $model->runScript($data); + $results = array_merge($results, $result); $results[] = sprintf($this->_('Finished %s creation script for object %d of %d'), $this->_(strtolower($data['type'])), $i, $oCount) . '<br/>'; $i++; } @@ -559,7 +514,8 @@ $data['name'] = ''; $data['type'] = $this->_('raw'); - $results = $this->_runScript($data, true); + $model = $this->getModel(); + $results = $model->runScript($data, true); $resultSet = 1; $echos = MUtil_Html::create()->array(); foreach ($results as $result) { Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -166,7 +166,8 @@ if($model->has('gor_user_class')) { $definitions = $this->loader->getUserLoader()->getAvailableStaffDefinitions(); //Use first element as default - $default = array_shift(array_keys($definitions)); + $tmp = array_keys($definitions); + $default = array_shift($tmp); $model->set('gor_user_class', 'default', $default); if (count($definitions)>1) { if ($action !== 'create') { Modified: trunk/library/classes/Gems/Default/SourceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SourceAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/SourceAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -231,7 +231,7 @@ { $source = $this->getSourceById(); - if ($source->checkSourceActive($this->session->user_id)) { + if ($source->checkSourceActive($this->loader->getCurrentUser()->getUserId())) { $this->addMessage($this->_('This installation is active.')); } else { $this->addMessage($this->_('Inactive installation.')); @@ -244,7 +244,7 @@ { $source = $this->getSourceById(); - if ($messages = $source->synchronizeSurveys($this->session->user_id)) { + if ($messages = $source->synchronizeSurveys($this->loader->getCurrentUser()->getUserId())) { $this->addMessage($messages); } else { $this->addMessage($this->_('No changes.')); @@ -263,7 +263,7 @@ $source = $this->getSourceById($row['gso_id_source']); $this->addMessage(sprintf($this->_('Synchronization of source %s:'), $row['gso_source_name'])); - if ($messages = $source->synchronizeSurveys($this->session->user_id)) { + if ($messages = $source->synchronizeSurveys($this->loader->getCurrentUser()->getUserId())) { $this->addMessage($messages); } else { $this->addMessage($this->_('No changes.')); Modified: trunk/library/classes/Gems/Default/StaffAction.php =================================================================== --- trunk/library/classes/Gems/Default/StaffAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/StaffAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -188,9 +188,6 @@ $this->_instanceId = $data['gsf_login']; } - $sql = "SELECT ggp_id_group,ggp_role FROM gems__groups WHERE ggp_id_group = " . (int) $data['gsf_id_primary_group']; - $groups = $this->db->fetchPairs($sql); - if (!isset($data['gsf_id_organization']) || empty($data['gsf_id_organization'])) { $data['gsf_id_organization'] = $this->menu->getParameterSource()->getMenuParameter('gsf_id_organization', $this->loader->getCurrentUser()->getCurrentOrganizationId()); } Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -69,7 +69,7 @@ // Add pdf button if allowed if ($menuItem = $this->findAllowedMenuItem('pdf')) { - $bridge->addItemLink(iif($bridge->gsu_has_pdf,$menuItem->toActionLinkLower($this->getRequest(), $bridge))); + $bridge->addItemLink(MUtil_Lazy::iif($bridge->gsu_has_pdf, $menuItem->toActionLinkLower($this->getRequest(), $bridge))); } } Modified: trunk/library/classes/Gems/Default/TrackAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/TrackAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -71,8 +71,9 @@ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { $bridge->gr2t_id_respondent_track; //For show and edit button - $bridge->tr()->appendAttrib('class', $bridge->row_class); + $bridge->tbody()->getFirst(true)->appendAttrib('class', $bridge->row_class); + // Add edit button if allowed, otherwise show, again if allowed if ($menuItem = $this->findAllowedMenuItem('show-track')) { $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); @@ -461,6 +462,9 @@ } } + /** + * Show information on a single track assigned to a respondent + */ public function showTrackAction() { $request = $this->getRequest(); @@ -498,9 +502,9 @@ $fieldValues = $this->db->fetchAll($sql, array('gr2t2f_id_respondent_track' => $data['gr2t_id_respondent_track'])); foreach ($fieldValues as $field) { + $table->tr(); $table->tdh($field['gtf_field_name']); $table->td($field['gr2t2f_value']); - $table->tr(); } $this->html[] = $table; Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2012-02-07 11:24:23 UTC (rev 457) @@ -203,6 +203,7 @@ { $model = $this->loader->getTracker()->getRespondentTrackModel(); + $model->resetOrder(); $model->set('gtr_track_name', 'label', $this->_('Track')); $model->set('gr2t_track_info', 'label', $this->_('Description'), 'description', $this->_('Enter the particulars concerning the assignment to this respondent.')); Modified: trunk/library/classes/Gems/Default/TrackMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-02-07 11:24:23 UTC (rev 457) @@ -1,6 +1,5 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -46,6 +45,13 @@ */ class Gems_Default_TrackMaintenanceAction extends Gems_Controller_BrowseEditAction { + /** + * Mode for the current addBrowse drawing. + * + * @var string + */ + protected $browseMode; + public $sortKey = array('gtr_track_name' => SORT_ASC); public $summarizedActions = array('index', 'autofilter', 'check-all'); @@ -61,20 +67,27 @@ */ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { - if ($this->getRequest()->getActionName() == 'index') { - if ($menuItem = $this->findAllowedMenuItem('show')) { - $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); - } - if ($menuItem = $this->findAllowedMenuItem('edit')) { - $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); - } + $request = $this->getRequest(); + + $actionKey = $request->getActionKey(); + $contrKey = $request->getControllerKey(); + $controller = $this->browseMode ? $this->browseMode : $request->getControllerName(); + + if ($menuItem = $this->menu->find(array($contrKey => $controller, $actionKey => 'show'))) { + $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); } + $menuItem = $this->menu->find(array($contrKey => $controller, $actionKey => 'edit')); + foreach($model->getItemsOrdered() as $name) { if ($label = $model->get($name, 'label')) { $bridge->addSortable($name, $label); } } + + if ($menuItem) { + $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge)); + } } /** @@ -283,24 +296,13 @@ $model = $this->getModel(); $repeatable = $model->loadRepeatable(); + $this->browseMode = 'track-' . $mode; + $table = $this->getBrowseTable($baseurl); $table->setOnEmpty(sprintf($this->_('No %s found'), $this->_($mode))); $table->getOnEmpty()->class = 'centerAlign'; $table->setRepeater($repeatable); - $url = array( - 'controller' => 'track-' . $mode, - 'action' => 'edit' - ); - - foreach ($keys as $idx => $key) { - $url[$idx] = $repeatable->$key; - } - - $href = new MUtil_Html_HrefArrayAttribute($url); - $body = $table->tbody(); - $body[0]->onclick = array('location.href=\'', $href, '\';'); - $this->html->h3(sprintf($this->_('%s in track'), $this->_(ucfirst($mode)))); $this->html[] = $table; $this->html->actionLink(array('controller' => 'track-' . $mode, 'action' => 'create', 'id' => $this->getRequest()->getParam(MUtil_Model::REQUEST_ID)), $this->_('Add')); Modified: trunk/library/classes/Gems/Form/TableForm.php =================================================================== --- trunk/library/classes/Gems/Form/TableForm.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Form/TableForm.php 2012-02-07 11:24:23 UTC (rev 457) @@ -28,7 +28,7 @@ * Short description of file * * @package Gems - * @subpackage + * @subpackage Form * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @version $Id$ Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Menu.php 2012-02-07 11:24:23 UTC (rev 457) @@ -282,7 +282,7 @@ $trType = 'T'; $subPage = $page->addPage($this->_('Track'), 'pr.track', 'track', 'show-track') ->addNamedParameters(MUtil_Model::REQUEST_ID, 'gr2o_patient_nr') - ->addHiddenParameter(Gems_Model::TRACK_ID, $this->escort->getTrackId(), 'gtr_track_type', 'T'); + ->addHiddenParameter(Gems_Model::TRACK_ID, $this->escort->getTrackId(), 'gtr_track_type', $trType); $tkPages[$trType] = $subPage->addAction($this->_('Token'), 'pr.token', 'show') ->addNamedParameters(MUtil_Model::REQUEST_ID, 'gto_id_token') Modified: trunk/library/classes/Gems/Model/DbaModel.php =================================================================== --- trunk/library/classes/Gems/Model/DbaModel.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Model/DbaModel.php 2012-02-07 11:24:23 UTC (rev 457) @@ -60,6 +60,10 @@ protected $file_encoding; protected $locations; protected $mainDirectory; + /** + * @var Zend_Translate_Adapter + */ + protected $translate; private $_sorts; @@ -73,6 +77,9 @@ $this->db = $db; + //Grab translate object from the Escort + $this->translate = GemsEscort::getInstance()->translate; + $this->set('group', 'maxlength', 40, 'type', MUtil_Model::TYPE_STRING); $this->set('name', 'key', true, 'maxlength', 40, 'type', MUtil_Model::TYPE_STRING); $this->set('type', 'maxlength', 40, 'type', MUtil_Model::TYPE_STRING); @@ -86,8 +93,25 @@ $this->set('script', 'type', MUtil_Model::TYPE_STRING); $this->set('lastChanged', 'type', MUtil_Model::TYPE_DATETIME); $this->set('location', 'maxlength', 12, 'type', MUtil_Model::TYPE_STRING); + $this->set('state', 'multiOptions', array( + Gems_Model_DbaModel::STATE_CREATED => $this->_('created'), + Gems_Model_DbaModel::STATE_DEFINED => $this->_('not created'), + Gems_Model_DbaModel::STATE_UNKNOWN => $this->_('unknown'))); } + /** + * proxy for easy access to translations + * + * @param string $messageId Translation string + * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale + * identifier, @see Zend_Locale for more information + * @return string + */ + private function _($messageId, $locale = null) + { + return $this->translate->_($messageId, $locale); + } + private function _getGroupName($name) { if ($pos = strpos($name, '__')) { @@ -374,6 +398,56 @@ return $this->loadFirst(array('name' => $tableName), false); } + /** + * Run a sql statement from an object loaded through this model + * + * $data is an array with the following keys: + * script The sql statement to be executed + * name The name of the table, used in messages + * type Type of db element (table or view), used in messages + * + * @param array $data + * @param type $includeResultSets + * @return type + */ + public function runScript(array $data, $includeResultSets = false) + { + $results = array(); + if ($data['script']) { + $queries = MUtil_Parser_Sql_WordsParser::splitStatements($data['script'], false); + $qCount = count($queries); + + $results[] = sprintf($this->_('Executed %2$s creation script %1$s:'), $data['name'], $this->_(strtolower($data['type']))); + $i = 1; + $resultSet = 1; + + foreach ($queries as $query) { + $sql = (string) $query; + try { + $stmt = $this->db->query($sql); + if ($rows = $stmt->rowCount()) { + if ($includeResultSets && ($data = $stmt->fetchAll())) { + $results[] = sprintf($this->_('%d record(s) returned as result set %d in step %d of %d.'), $rows, $resultSet, $i, $qCount); + $results[] = $data; + $resultSet++; + } else { + $results[] = sprintf($this->_('%d record(s) updated in step %d of %d.'), $rows, $i, $qCount); + } + } else { + $results[] = sprintf($this->_('Script ran step %d of %d succesfully.'), $i, $qCount); + } + } catch (Zend_Db_Statement_Exception $e) { + $results[] = $e->getMessage() . $this->_(' in step ') . $i . ':<pre>' . $sql . '</pre>'; + } + $i++; + } + } else { + $results[] = sprintf($this->_('No script for %1$s.'), $data['name']); + } + + return $results; + } + public function save(array $newValues, array $filter = null) { // TODO: Save of data Modified: trunk/library/classes/Gems/Project/ProjectSettings.php =================================================================== --- trunk/library/classes/Gems/Project/ProjectSettings.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Project/ProjectSettings.php 2012-02-07 11:24:23 UTC (rev 457) @@ -193,7 +193,7 @@ */ public function getAccountDelayFactor() { - if (isset($this->account['delayFactor'])) { + if (isset($this->account) && isset($this->account['delayFactor'])) { return intval($this->account['delayFactor']); } else { return 4; @@ -225,6 +225,24 @@ } /** + * Returns an (optional) default organization from the project settings + * + * @return int Organization number or -1 when not set + */ + public function getDefaultOrganization() + { + if ($this->offsetExists('organization')) { + $orgs = $this->offsetGet('organization'); + + if (isset($orgs['default'])) { + return $orgs['default']; + } + } + + return -1; + } + + /** * Returns the public name of this project. * @return string */ @@ -275,7 +293,7 @@ public function getSuperAdminName() { if (isset($this->admin) && isset($this->admin['user'])) { - return $this->admin['user']; + return trim($this->admin['user']); } } @@ -287,7 +305,7 @@ protected function getSuperAdminPassword() { if (isset($this->admin) && isset($this->admin['pwd'])) { - return $this->admin['pwd']; + return trim($this->admin['pwd']); } } Modified: trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php 2012-02-07 11:24:23 UTC (rev 457) @@ -167,8 +167,9 @@ } /** + * Retrieve the header title to display * - * @return string The header title to display + * @return string */ protected function getTitle() { Modified: trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Snippets/ModelFormSnippetGeneric.php 2012-02-07 11:24:23 UTC (rev 457) @@ -27,7 +27,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * - * @package MUtil + * @package Gems * @subpackage Snippets * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC @@ -44,7 +44,7 @@ * their naming conventions, but exists only to make it simple to extend this class * for a specific implementation. * - * @package MUtil + * @package Gems * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License Modified: trunk/library/classes/Gems/Snippets/ModelItemTableSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelItemTableSnippetAbstract.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Snippets/ModelItemTableSnippetAbstract.php 2012-02-07 11:24:23 UTC (rev 457) @@ -88,7 +88,7 @@ * Overrule this function to add different columns to the browse table, without * having to recode the core table building code. * - * @param MUtil_Model_TableBridge $bridge + * @param MUtil_Model_VerticalTableBridge $bridge * @param MUtil_Model_ModelAbstract $model * @return void */ @@ -167,7 +167,7 @@ * Overrule this function to set the header differently, without * having to recode the core table building code. * - * @param MUtil_Model_TableBridge $bridge + * @param MUtil_Model_VerticalTableBridge $bridge * @param MUtil_Model_ModelAbstract $model * @return void */ Modified: trunk/library/classes/Gems/Snippets/ModelItemTableSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelItemTableSnippetGeneric.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Snippets/ModelItemTableSnippetGeneric.php 2012-02-07 11:24:23 UTC (rev 457) @@ -27,7 +27,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * - * @package MUtil + * @package Gems * @subpackage Snippets * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC @@ -45,7 +45,7 @@ * their naming conventions, but exists only to make it simple to extend this class * for a specific implementation. * - * @package MUtil + * @package Gems * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License Modified: trunk/library/classes/Gems/Snippets/ModelItemYesNoDeleteSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelItemYesNoDeleteSnippetGeneric.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Snippets/ModelItemYesNoDeleteSnippetGeneric.php 2012-02-07 11:24:23 UTC (rev 457) @@ -27,7 +27,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * - * @package MUtil + * @package Gems * @subpackage Snippets * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC @@ -46,7 +46,7 @@ * their naming conventions, but exists only to make it simple to extend this class * for a specific implementation. * - * @package MUtil + * @package Gems * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License Modified: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2012-02-07 11:24:23 UTC (rev 457) @@ -56,6 +56,19 @@ protected $_form; /** + * 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 + * does deserve it's own function. + */ + protected function addSaveButton() + { + $this->_form->resetContext(); + parent::addSaveButton(); + } + + + /** * Perform some actions on the form, right before it is displayed but already populated * * Here we add the table display to the form. Modified: trunk/library/classes/Gems/Snippets/ModelTableSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTableSnippetGeneric.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Snippets/ModelTableSnippetGeneric.php 2012-02-07 11:24:23 UTC (rev 457) @@ -27,7 +27,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * - * @package MUtil + * @package Gems * @subpackage Snippets * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC @@ -45,7 +45,7 @@ * their naming conventions, but exists only to make it simple to extend this class * for a specific implementation. * - * @package MUtil + * @package Gems * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/TabForm.php 2012-02-07 11:24:23 UTC (rev 457) @@ -33,6 +33,8 @@ */ /** + * Creates a form using tab-layout where each tab is a subform + * * @package Gems * @subpackage Form * @copyright Copyright (c) 2011 Erasmus MC @@ -41,6 +43,8 @@ class Gems_TabForm extends Gems_Form { /** + * Holds the last tab we added information to + * * @var Gems_Form_TabSubForm */ private $currentTab = null; @@ -168,7 +172,7 @@ /** * Retrieve a named tab (subform) and set the active tab to this one * - * @param type $name + * @param string $name * @return Gems_Form_TabSubForm */ public function getTab($name) @@ -316,6 +320,11 @@ $jquery->addOnLoad($js); } + /** + * Load the default decorators + * + * @return void + */ public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return; @@ -335,6 +344,8 @@ } /** + * Reset the currentTab to be the main form again + * * 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. */ @@ -342,6 +353,11 @@ $this->currentTab = null; } + /** + * Select a tab by it's numerical index + * + * @param int $tabIdx + */ public function selectTab($tabIdx) { $this->getElement('tab')->setValue($tabIdx); $this->setAttrib('selected', $tabIdx); Modified: trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2012-02-07 11:24:23 UTC (rev 457) @@ -311,7 +311,12 @@ */ public function checkTokensFromStart(Gems_Tracker_RespondentTrack $respTrack, $userId) { - return $this->checkTokensFrom($respTrack, $respTrack->getFirstToken(), $userId); + $token = $respTrack->getFirstToken(); + if ($token instanceof Gems_Tracker_Token) { + return $this->checkTokensFrom($respTrack, $respTrack->getFirstToken(), $userId); + } else { + return 0; + } } /** Modified: trunk/library/classes/Gems/Tracker/Model/TrackModel.php =================================================================== --- trunk/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-07 11:24:23 UTC (rev 457) @@ -95,7 +95,7 @@ * Sets the labels, format functions, etc... * * @param boolean $detailed True when shopwing detailed information - * @return Gems_Tracker_Model_StandardTokenModel + * @return Gems_Tracker_Model_TrackModel */ public function applyFormatting($detailed = false) { @@ -110,6 +110,8 @@ $this->set('gtr_active', 'label', $this->translate->_('Active'), 'multiOptions', $translated->getYesNo()); $this->set('gtr_date_start', 'label', $this->translate->_('From'), 'dateFormat', $translated->dateFormatString, 'formatFunction', $translated->formatDate); $this->set('gtr_date_until', 'label', $this->translate->_('Use until'), 'dateFormat', $translated->dateFormatString, 'formatFunction', $translated->formatDateForever); + + return $this; } /** Modified: trunk/library/classes/Gems/Tracker/RespondentTrack.php =================================================================== --- trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-07 11:24:23 UTC (rev 457) @@ -201,7 +201,7 @@ /** * Makes sure the respondent data is part of the $this->_respTrackData */ - private function _ensureRespondentData() + protected function _ensureRespondentData() { if (! isset($this->_respTrackData['grs_id_user'], $this->_respTrackData['gr2o_id_user'], $this->_respTrackData['gco_code'])) { $sql = "SELECT * @@ -452,6 +452,16 @@ } /** + * Returns the description of this track as stored in the fields. + * + * @return string + */ + public function getFieldsInfo() + { + return $this->_respTrackData['gr2t_track_info']; + } + + /** * Returns the first token in this track * * @return Gems_Tracker_Token Modified: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2012-02-07 11:24:23 UTC (rev 457) @@ -90,6 +90,13 @@ protected $showButtons = true; /** + * Switch to put the display of the headers on or off + * + * @var boolean + */ + protected $showHeaders = true; + + /** * Switch to put the display of the current token as select to true or false. * * @var boolean @@ -204,14 +211,16 @@ if ($this->tokenId) { if ($this->token->exists) { - $htmlDiv->h3(sprintf($this->_('%s answers for patient number %s'), $this->token->getSurveyName(), $this->token->getPatientNumber())); + if ($this->showHeaders) { + $htmlDiv->h3(sprintf($this->_('%s answers for patient number %s'), $this->token->getSurveyName(), $this->token->getPatientNumber())); - $htmlDiv->pInfo(sprintf( - $this->_('Answers for token %s, patient number %s: %s.'), - strtoupper($this->tokenId), - $this->token->getPatientNumber(), - $this->token->getRespondentName())) - ->appendAttrib('class', 'noprint'); + $htmlDiv->pInfo(sprintf( + $this->_('Answers for token %s, patient number %s: %s.'), + strtoupper($this->tokenId), + $this->token->getPatientNumber(), + $this->token->getRespondentName())) + ->appendAttrib('class', 'noprint'); + } $table = parent::getHtmlOutput($view); $table->setPivot(true, 2, 1); Copied: trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php (from rev 455, branches/1.5.x/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php) =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php (rev 0) +++ trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php 2012-02-07 11:24:23 UTC (rev 457) @@ -0,0 +1,304 @@ +<?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: EditTrackEngineSnippetGeneric.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Basic snippet for editing track engines instances + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Tracker_Snippets_EditTrackEngineSnippetGeneric extends Gems_Snippets_ModelFormSnippetAbstract +{ + /** + * + * @var string Field for storing the old track class + */ + protected $_oldClassName = 'old__gtr_track_class'; + + /** + * + * @var Zend_Db_Adapter_Abstract + */ + protected $db; + + /** + * Required + * + * @var Gems_Loader + */ + protected $loader; + + /** + * Optional, required when creating or $trackId should be set + * + * @var Gems_Tracker_Engine_TrackEngineInterface + */ + protected $trackEngine; + + /** + * Optional, required when creating or $engine should be set + * + * @var int Track Id + */ + protected $trackId; + + /** + * @var Gems_Util + */ + protected $util; + + /** + * 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) + { + if (! $this->createData) { + $bridge->addHidden('gtr_id_track'); + } + $bridge->addText('gtr_track_name', 'size', 30, 'minlength', 4, 'validator', $model->createUniqueValidator('gtr_track_name')); + + // gtr_track_class + if ($this->trackEngine) { + $options = $model->get('gtr_track_class', 'multiOptions'); + $alternatives = $this->trackEngine->getConversionTargets($options); + if (count($alternatives) > 1) { + $options = $alternatives; + + $bridge->addHidden($this->_oldClassName); + + if (! isset($this->formData[$this->_oldClassName])) { + $this->formData[$this->_oldClassName] = $this->formData['gtr_track_class']; + } + + $classEdit = true; + } else { + $classEdit = false; + } + } else { + $tracker = $this->loader->getTracker(); + $options = $tracker->getTrackEngineList(true, true); + $classEdit = true; + } + $model->set('gtr_track_class', 'multiOptions', $options, 'escape', false); + if ($classEdit) { + $bridge->addRadio( 'gtr_track_class'); + } else { + $bridge->addExhibitor('gtr_track_class'); + } + + $bridge->addDate('gtr_date_start'); + $bridge->addDate('gtr_date_until'); + if (! $this->createData) { + $bridge->addCheckbox('gtr_active'); + } + $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', 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 $this->db && $this->loader && parent::checkRegistryRequestsAnswers(); + } + + /** + * Creates the model + * + * @return MUtil_Model_ModelAbstract + */ + protected function createModel() + { + $model = $this->loader->getTracker()->getTrackModel(); + $model->applyFormatting(true); + + return $model; + } + + /** + * + * @return Gems_Menu_MenuList + * / + protected function getMenuList() + { + $links = $this->menu->getMenuList(); + $links->addParameterSources($this->request, $this->menu->getParameterSource()); + + $links->addByController('track', 'show-track', $this->_('Show track')) + ->addByController('track', 'index', $this->_('Show tracks')) + ->addByController('respondent', 'show', $this->_('Show respondent')); + + return $links; + } // */ + + /** + * Helper function to allow generalized statements about the items in the model to used specific item names. + * + * @param int $count + * @return $string + */ + public function getTopic($count = 1) + { + return $this->plural('track', 'tracks', $count); + } + + /** + * + * @return string The header title to display + */ + protected function getTitle() + { + if ($this->createData) { + return $this->_('Add new track'); + } else { + return parent::getTitle(); + } + } + + /** + * The place to check if the data set in the snippet is valid + * to generate the snippet. + * + * When invalid data should result in an error, you can throw it + * here but you can also perform the check in the + * checkRegistryRequestsAnswers() function from the + * {@see MUtil_Registry_TargetInterface}. + * + * @return boolean + */ + public function hasHtmlOutput() + { + if ($this->trackEngine && (! $this->trackId)) { + $this->trackId = $this->trackEngine->getTrackId(); + } + + if ($this->trackId) { + // We are updating + $this->createData = false; + + // Try to get $this->trackEngine filled + if (! $this->trackEngine) { + // Set the engine used + $this->trackEngine = $this->loader->getTracker()->getTrackEngine($this->trackId); + } + + } else { + // We are inserting + $this->createData = true; + $this->saveLabel = $this->_($this->_('Add new track')); + } + + return parent::hasHtmlOutput(); + } + + /** + * Hook that loads the form data from $_POST or the model + * + * Or from whatever other source you specify here. + */ + protected function loadFormData() + { + parent::loadFormData(); + + // feature request #200 + if (isset($this->formData['gtr_organizations']) && (! is_array($this->formData['gtr_organizations']))) { + $this->formData['gtr_organizations'] = explode('|', trim($this->formData['gtr_organizations'], '|')); + } + } + + /** + * Hook containing the actual save code. + * + * Call's afterSave() for user interaction. + * + * @see afterSave() + */ + protected function saveData() + { + // feature request #200 + if (isset($this->formData['gtr_organizations']) && is_array($this->formData['gtr_organizations'])) { + $this->formData['gtr_organizations'] = '|' . implode('|', $this->formData['gtr_organizations']) . '|'; + } + if ($this->trackEngine) { + $this->formData['gtr_survey_rounds'] = $this->trackEngine->calculateRoundCount(); + } else { + $this->formData['gtr_survey_rounds'] = 0; + } + + parent::saveData(); + + // Check for creation + if ($this->createData) { + if (isset($this->formData['gtr_id_track'])) { + $this->trackId = $this->formData['gtr_id_track']; + } + } elseif ($this->trackEngine && + isset($this->formData[$this->_oldClassName], $this->formData['gtr_track_class']) && + $this->formData[$this->_oldClassName] != $this->formData['gtr_track_class']) { + + // Track conversion + $this->trackEngine->convertTo($this->formData['gtr_track_class']); + } + } + + /** + * Set what to do when the form is 'finished'. + * + * @return EditTrackEngineSnippet (continuation pattern) + */ + protected function setAfterSaveRoute() + { + // Default is just go to the index + if ($this->routeAction && ($this->request->getActionName() !== $this->routeAction)) { + $this->afterSaveRouteUrl = array($this->request->getActionKey() => $this->routeAction, MUtil_Model::REQUEST_ID => $this->trackId); + } + + return $this; + } +} Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Tracker.php 2012-02-07 11:24:23 UTC (rev 457) @@ -842,9 +842,9 @@ $batch = $this->_loadClass('Batch_ProcessTokensBatch', true, array($batch_id)); if (! $batch->isLoaded()) { - $tokenRows = $tokenSelect->fetchAll(); - - foreach ($tokenRows as $tokenData) { + $statement = $tokenSelect->getSelect()->query(); + //Process one row at a time to prevent out of memory errors for really big resultsets + while ($tokenData = $statement->fetch()) { $batch->addToken($tokenData['gto_id_token'], $userId); } } @@ -898,16 +898,16 @@ public function recalculateTokensBatch($batch_id, $userId = null, $cond = null) { $userId = $this->_checkUserId($userId); - $tokenSelect = $this->getTokenSelect(); - $tokenSelect->andReceptionCodes() - ->andRespondents() - ->andRespondentOrganizations() - ->andConsents(); + $tokenSelect = $this->getTokenSelect(array('gto_id_token')); + $tokenSelect->andReceptionCodes(array()) + ->andRespondents(array()) + ->andRespondentOrganizations(array()) + ->andConsents(array()); if ($cond) { $tokenSelect->forWhere($cond); } //Only select surveys that are active in the source (so we can recalculate inactive in Gems) - $tokenSelect->andSurveys(); + $tokenSelect->andSurveys(array()); $tokenSelect->forWhere('gsu_surveyor_active = 1'); self::$verbose = true; Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2012-02-07 11:12:45 UTC (rev 456) +++ trunk/library/classes/Gems/Upgrades.php 2012-02-07 11:24:23 UTC (rev 457) @@ -61,14 +61,42 @@ /** * To upgrade from 143 to 15 we need to do some work: - * 1. execute db patches + * 1. execute db patches 42 and 43 + * 2. create new tables */ public function Upgrade143to15() { + $this->addMessage($this->_('Executing patchlevel 42')); $this->patcher->executePatch(42); - + $this->addMessage($this->_('Executing patchlevel 43')); + $this->patcher->executePatch(43); + $this->invalidateCache(); + $this->addMessage($this->_('Creating new tables')); + $this->createNewTables(); + + $this->invalidateCache(); + + $this->addMessage($this->_('Syncing surveys for all sources')); + //Now sync the db sources to allow limesurvey source to add a field to the tokentable + $model = new MUtil_Model_TableModel('gems__sources'); + $data = $model->load(false); + + $tracker = $this->loader->getTracker(); + + foreach... [truncated message content] |
From: <gem...@li...> - 2012-02-07 11:26:52
|
Revision: 455 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=455&view=rev Author: matijsdejong Date: 2012-02-07 11:03:57 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Extra comment Modified Paths: -------------- branches/1.5.x/library/classes/MUtil/Html.php Modified: branches/1.5.x/library/classes/MUtil/Html.php =================================================================== --- branches/1.5.x/library/classes/MUtil/Html.php 2012-02-07 10:43:29 UTC (rev 454) +++ branches/1.5.x/library/classes/MUtil/Html.php 2012-02-07 11:03:57 UTC (rev 455) @@ -163,6 +163,12 @@ return self::$_creator; } + /** + * Returns the class used to perform the actual rendering + * of objects and items into html. + * + * @return MUtil_Html_Renderer + */ public static function getRenderer() { if (! self::$_renderer) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |