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...> - 2013-02-14 16:54:10
|
Revision: 1140 http://sourceforge.net/p/gemstracker/code/1140 Author: matijsdejong Date: 2013-02-14 16:54:06 +0000 (Thu, 14 Feb 2013) Log Message: ----------- Enabled RespondentModel.php to work when there are no organizations Removed old unused code from rest Modified Paths: -------------- trunk/library/classes/Gems/Model/RespondentModel.php trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php trunk/library/configs/db/tables/gems__respondents.30.sql Modified: trunk/library/classes/Gems/Model/RespondentModel.php =================================================================== --- trunk/library/classes/Gems/Model/RespondentModel.php 2013-02-07 17:54:51 UTC (rev 1139) +++ trunk/library/classes/Gems/Model/RespondentModel.php 2013-02-14 16:54:06 UTC (rev 1140) @@ -105,8 +105,10 @@ if (! isset($filter['gr2o_id_organization'])) { if ($this->isMultiOrganization() && !isset($filter['gr2o_patient_nr'])) { + $allowed = $this->user->getAllowedOrganizations(); + // If we are not looking for a specific patient, we can look at all patients - $filter[] = 'gr2o_id_organization IN (' . implode(', ', array_keys($this->user->getAllowedOrganizations())) . ')'; + $filter['gr2o_id_organization'] = array_keys($allowed); } else { // Otherwise, we can only see in our current organization $filter['gr2o_id_organization'] = $this->getCurrentOrganization(); Modified: trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-02-07 17:54:51 UTC (rev 1139) +++ trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-02-14 16:54:06 UTC (rev 1140) @@ -128,7 +128,6 @@ { $select = $this->getSelect(); - if ($this->hasItemsUsed()) { // Add expression columns by default // getColumn() triggers the columns as 'used' Modified: trunk/library/configs/db/tables/gems__respondents.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__respondents.30.sql 2013-02-07 17:54:51 UTC (rev 1139) +++ trunk/library/configs/db/tables/gems__respondents.30.sql 2013-02-14 16:54:06 UTC (rev 1140) @@ -2,33 +2,9 @@ CREATE TABLE if not exists gems__respondents ( grs_id_user bigint unsigned not null auto_increment references gems__user_ids (gui_id_user), - -- grs_login varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' - -- null unique key, - -- grs_password varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, - grs_ssn varchar(32) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null unique key, --- Naam --- Adres --- Woonplaats --- Tel. nr --- geb. datum --- aandoening (code bijv: ICD9, DBC etc) --- aangedaan lichaamsdeel --- uitgevoerde behandeling --- hand dominantie --- behandelend arts --- beroep/ hobby's --- OK/ behandel datum --- email - -- grs_staff boolean not null default 0, - -- grs_respondent boolean not null default 1, - -- grs_active boolean not null default 1, - -- grs_id_supervisor bigint unsigned default 1 - -- references gems_staff (grs_id_user), - -- grs_id_primary_group bigint unsigned - -- references gems__groups (umg_id_group), grs_iso_lang char(2) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'en', grs_email varchar(100) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, @@ -38,10 +14,7 @@ grs_last_name varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', grs_gender char(1) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'U', - -- grs_dexterity char(1) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' - -- not null default 'U', grs_birthday date, - -- grs_function varchar(40) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', grs_address_1 varchar(80) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', grs_address_2 varchar(80) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', @@ -53,9 +26,6 @@ -- grs_phone_2 varchar(25) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', -- grs_phone_3 varchar(25) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', - -- grs_id_reception_code bigint unsigned not null default 1 - -- references gems__reception_codes (umrc_id_reception_code), - grs_changed timestamp not null default current_timestamp on update current_timestamp, grs_changed_by bigint unsigned not null, grs_created timestamp not null, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-02-04 13:41:52
|
Revision: 1132 http://sourceforge.net/p/gemstracker/code/1132 Author: mennodekker Date: 2013-02-04 13:41:50 +0000 (Mon, 04 Feb 2013) Log Message: ----------- Pdf export needs full url to css files Modified Paths: -------------- trunk/library/classes/GemsEscort.php Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2013-01-31 15:15:45 UTC (rev 1131) +++ trunk/library/classes/GemsEscort.php 2013-02-04 13:41:50 UTC (rev 1132) @@ -729,7 +729,12 @@ $url = $css; $media = 'screen'; } - $this->view->headLink()->prependStylesheet($this->basepath->getBasePath() . '/' . $url, $media); + // When exporting to pdf, we need full urls + if (substr($url,0,4) == 'http') { + $this->view->headLink()->prependStylesheet($url, $media); + } else { + $this->view->headLink()->prependStylesheet($this->view->serverUrl() . $this->basepath->getBasePath() . '/' . $url, $media); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-31 15:15:51
|
Revision: 1131 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1131&view=rev Author: mennodekker Date: 2013-01-31 15:15:45 +0000 (Thu, 31 Jan 2013) Log Message: ----------- Merged revision(s) 1130 from trunk: And another typo in spss export Modified Paths: -------------- tags/1.5.7/library/classes/Gems/Export/Spss.php Property Changed: ---------------- tags/1.5.7/ tags/1.5.7/library/ Property changes on: tags/1.5.7 ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse:306-430,467 /branches/1.5.x:426-455,458-472,475-481 /tags/1.5.0beta1:305 /tags/1.5.1:485,489,509-510 /tags/1.5.3-rc2:612,614,616,618 + /branches/1.5.0-pulse:306-430,467 /branches/1.5.x:426-455,458-472,475-481 /tags/1.5.0beta1:305 /tags/1.5.1:485,489,509-510 /tags/1.5.3-rc2:612,614,616,618 /trunk:1130 Property changes on: tags/1.5.7/library ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/library:306-344,346,467 /branches/1.5.x/library:426-455,458-472,475-481 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 /tags/1.5.1/library:485,489,509-510,534 /tags/1.5.3-rc2/library:612,614,616,618 /tags/1.5.6-pulse20121012/library:986 + /branches/1.5.0-pulse/library:306-344,346,467 /branches/1.5.x/library:426-455,458-472,475-481 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 /tags/1.5.1/library:485,489,509-510,534 /tags/1.5.3-rc2/library:612,614,616,618 /tags/1.5.6-pulse20121012/library:986 /trunk/library:1130 Modified: tags/1.5.7/library/classes/Gems/Export/Spss.php =================================================================== --- tags/1.5.7/library/classes/Gems/Export/Spss.php 2013-01-31 15:05:05 UTC (rev 1130) +++ tags/1.5.7/library/classes/Gems/Export/Spss.php 2013-01-31 15:15:45 UTC (rev 1131) @@ -152,7 +152,7 @@ * @param MUtil_Model_ModelAbstract $answerModel The modified answermodel that includes info about extra attributes * @param string $language The language used / to use for the export */ - public function handeExportData($data, $survey, $answers, $answerModel, $language) + public function handleExportData($data, $survey, $answers, $answerModel, $language) { $filename = $survey->getName() . '.dat'; $response = $this->_doHeaders($filename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-31 15:05:12
|
Revision: 1130 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1130&view=rev Author: mennodekker Date: 2013-01-31 15:05:05 +0000 (Thu, 31 Jan 2013) Log Message: ----------- And another typo in spss export Modified Paths: -------------- trunk/library/classes/Gems/Export/Spss.php Modified: trunk/library/classes/Gems/Export/Spss.php =================================================================== --- trunk/library/classes/Gems/Export/Spss.php 2013-01-31 14:36:17 UTC (rev 1129) +++ trunk/library/classes/Gems/Export/Spss.php 2013-01-31 15:05:05 UTC (rev 1130) @@ -152,7 +152,7 @@ * @param MUtil_Model_ModelAbstract $answerModel The modified answermodel that includes info about extra attributes * @param string $language The language used / to use for the export */ - public function handeExportData($data, $survey, $answers, $answerModel, $language) + public function handleExportData($data, $survey, $answers, $answerModel, $language) { $filename = $survey->getName() . '.dat'; $response = $this->_doHeaders($filename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-31 14:36:24
|
Revision: 1129 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1129&view=rev Author: mennodekker Date: 2013-01-31 14:36:17 +0000 (Thu, 31 Jan 2013) Log Message: ----------- Set lifetime for limesurvey fieldmaps to 1 day to allow better response times Modified Paths: -------------- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php =================================================================== --- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php 2013-01-30 12:23:04 UTC (rev 1128) +++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php 2013-01-31 14:36:17 UTC (rev 1129) @@ -342,7 +342,8 @@ } } $this->_fieldMap = $map; - $this->cache->save($this->_fieldMap, $cacheId); + // Use a tag (for cleaning if supported) and 1 day lifetime, maybe clean cache on sync survey? + $this->cache->save($this->_fieldMap, $cacheId, array('fieldmap'), 86400); //60*60*24=86400 } return $this->_fieldMap; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-30 12:23:10
|
Revision: 1128 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1128&view=rev Author: mennodekker Date: 2013-01-30 12:23:04 +0000 (Wed, 30 Jan 2013) Log Message: ----------- Don't rely on request for org_id filtering + css changes from trunk Modified Paths: -------------- tags/1.5.7/library/classes/Gems/Export/RespondentExport.php tags/1.5.7/new_project/htdocs/gems/css/gems-fluid.css tags/1.5.7/new_project/htdocs/gems/css/gems-new.css Modified: tags/1.5.7/library/classes/Gems/Export/RespondentExport.php =================================================================== --- tags/1.5.7/library/classes/Gems/Export/RespondentExport.php 2013-01-30 12:22:38 UTC (rev 1127) +++ tags/1.5.7/library/classes/Gems/Export/RespondentExport.php 2013-01-30 12:23:04 UTC (rev 1128) @@ -52,6 +52,12 @@ * @var GemsEscort */ public $escort; + + /** + * + * @var Zend_Db_Adapter_Abstract + */ + protected $db; protected $html; @@ -282,9 +288,21 @@ protected function _exportRespondent($respondentId) { $respondentModel = $this->loader->getModels()->getRespondentModel(false); + //Insert orgId when set - $respondentModel->applyRequest(Zend_Controller_Front::getInstance()->getRequest()); - $respondentModel->addFilter(array('gr2o_patient_nr' => $respondentId)); + if (is_array($respondentId) && isset($respondentId['gr2o_id_organization'])) { + $filter['gr2o_id_organization'] = $respondentId['gr2o_id_organization']; + $respondentId = $respondentId['gr2o_patient_nr']; + } else { + // Or accept to find in current organization + $filter['gr2o_id_organization'] = $this->loader->getCurrentUser()->getCurrentOrganizationId(); + // Or use any organization? + // $allowedOrgs = $this->loader->getCurrentUser()->getAllowedOrganizations(); + // $filter[] = sprintf('%s IN(%s)', $this->db->quoteIdentifier('gto_id_organization'), array_keys($allowedOrgs)); + } + $filter['gr2o_patient_nr'] = $respondentId; + + $respondentModel->setFilter($filter); $respondentData = $respondentModel->loadFirst(); $this->html->snippet($this->_respondentSnippet, Modified: tags/1.5.7/new_project/htdocs/gems/css/gems-fluid.css =================================================================== --- tags/1.5.7/new_project/htdocs/gems/css/gems-fluid.css 2013-01-30 12:22:38 UTC (rev 1127) +++ tags/1.5.7/new_project/htdocs/gems/css/gems-fluid.css 2013-01-30 12:23:04 UTC (rev 1128) @@ -688,3 +688,7 @@ .zend_echo { font-weight: normal; } + +#autofilter_target { clear: both;} +.tabrow { clear: both; } +.tabrow .tab { width: auto;} \ No newline at end of file Modified: tags/1.5.7/new_project/htdocs/gems/css/gems-new.css =================================================================== --- tags/1.5.7/new_project/htdocs/gems/css/gems-new.css 2013-01-30 12:22:38 UTC (rev 1127) +++ tags/1.5.7/new_project/htdocs/gems/css/gems-new.css 2013-01-30 12:23:04 UTC (rev 1128) @@ -717,3 +717,6 @@ font-weight: normal; } +#autofilter_target { clear: both;} +.tabrow { clear: both; } +.tabrow .tab { width: auto;} \ 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...> - 2013-01-30 12:22:45
|
Revision: 1127 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1127&view=rev Author: mennodekker Date: 2013-01-30 12:22:38 +0000 (Wed, 30 Jan 2013) Log Message: ----------- Don't rely on request for org_id filtering Modified Paths: -------------- trunk/library/classes/Gems/Export/RespondentExport.php Modified: trunk/library/classes/Gems/Export/RespondentExport.php =================================================================== --- trunk/library/classes/Gems/Export/RespondentExport.php 2013-01-30 10:05:29 UTC (rev 1126) +++ trunk/library/classes/Gems/Export/RespondentExport.php 2013-01-30 12:22:38 UTC (rev 1127) @@ -282,9 +282,21 @@ protected function _exportRespondent($respondentId) { $respondentModel = $this->loader->getModels()->getRespondentModel(false); + //Insert orgId when set - $respondentModel->applyRequest(Zend_Controller_Front::getInstance()->getRequest()); - $respondentModel->addFilter(array('gr2o_patient_nr' => $respondentId)); + if (is_array($respondentId) && isset($respondentId['gr2o_id_organization'])) { + $filter['gr2o_id_organization'] = $respondentId['gr2o_id_organization']; + $respondentId = $respondentId['gr2o_patient_nr']; + } else { + // Or accept to find in current organization + $filter['gr2o_id_organization'] = $this->loader->getCurrentUser()->getCurrentOrganizationId(); + // Or use any organization? + // $allowedOrgs = $this->loader->getCurrentUser()->getAllowedOrganizations(); + // $filter[] = sprintf('%s IN(%s)', $this->db->quoteIdentifier('gto_id_organization'), array_keys($allowedOrgs)); + } + $filter['gr2o_patient_nr'] = $respondentId; + + $respondentModel->setFilter($filter); $respondentData = $respondentModel->loadFirst(); $this->html->snippet($this->_respondentSnippet, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-30 10:05:36
|
Revision: 1126 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1126&view=rev Author: mennodekker Date: 2013-01-30 10:05:29 +0000 (Wed, 30 Jan 2013) Log Message: ----------- Misc. changes from trunk to tag Modified Paths: -------------- tags/1.5.7/library/classes/Gems/Export/Spss.php tags/1.5.7/library/classes/Gems/Menu/MenuAbstract.php tags/1.5.7/library/classes/Gems/Tracker/Token.php tags/1.5.7/library/snippets/RespondentDetailsSnippet.php Modified: tags/1.5.7/library/classes/Gems/Export/Spss.php =================================================================== --- tags/1.5.7/library/classes/Gems/Export/Spss.php 2013-01-29 13:47:18 UTC (rev 1125) +++ tags/1.5.7/library/classes/Gems/Export/Spss.php 2013-01-30 10:05:29 UTC (rev 1126) @@ -270,7 +270,7 @@ $size = $answerModel->get($key, 'maxlength'); // This comes from db when available if (is_null($size)) { $size = $answerModel->get($key, 'size'); // This is the display width - if ($is_null($size)) { + if (is_null($size)) { $size = $defaultSize; // We just don't know, make it the default } } Modified: tags/1.5.7/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- tags/1.5.7/library/classes/Gems/Menu/MenuAbstract.php 2013-01-29 13:47:18 UTC (rev 1125) +++ tags/1.5.7/library/classes/Gems/Menu/MenuAbstract.php 2013-01-30 10:05:29 UTC (rev 1126) @@ -54,7 +54,7 @@ */ public $escort; - protected $_subItems; + protected $_subItems = array(); /** * Copy from Zend_Translate_Adapter @@ -117,6 +117,7 @@ $i = 0; $pages = array(); foreach ($this->_subItems as $item) { + $item->sortByOrder(); if (! $item->get('button_only')) { $page = $item->_toNavigationArray($source); Modified: tags/1.5.7/library/classes/Gems/Tracker/Token.php =================================================================== --- tags/1.5.7/library/classes/Gems/Tracker/Token.php 2013-01-29 13:47:18 UTC (rev 1125) +++ tags/1.5.7/library/classes/Gems/Tracker/Token.php 2013-01-30 10:05:29 UTC (rev 1126) @@ -201,7 +201,7 @@ $respId = $this->_gemsData['gto_id_respondent']; $orgId = $this->_gemsData['gto_id_organization']; - MUtil_Echo::track($this->_gemsData); + // MUtil_Echo::track($this->_gemsData); if ($row = $this->db->fetchRow($sql, array($respId, $orgId))) { $this->_gemsData = $this->_gemsData + $row; Modified: tags/1.5.7/library/snippets/RespondentDetailsSnippet.php =================================================================== --- tags/1.5.7/library/snippets/RespondentDetailsSnippet.php 2013-01-29 13:47:18 UTC (rev 1125) +++ tags/1.5.7/library/snippets/RespondentDetailsSnippet.php 2013-01-30 10:05:29 UTC (rev 1126) @@ -68,7 +68,11 @@ $address[] = $bridge->grs_city; // ROW 0 - $bridge->addItem($bridge->gr2o_patient_nr, $this->_('Respondent nr: ')); + $label = $this->model->get('gr2o_patient_nr', 'label'); + if (empty($label)) { + $label = $this->_('Respondent nr: '); + } + $bridge->addItem($bridge->gr2o_patient_nr, $label); $bridge->addItem( $HTML->spaced($bridge->itemIf('grs_last_name', array($bridge->grs_last_name, ',')), $bridge->grs_gender, $bridge->grs_first_name, $bridge->grs_surname_prefix), $this->_('Respondent')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-29 13:47:25
|
Revision: 1125 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1125&view=rev Author: mennodekker Date: 2013-01-29 13:47:18 +0000 (Tue, 29 Jan 2013) Log Message: ----------- Fixes for tabrow with browsetable Modified Paths: -------------- trunk/new_project/htdocs/gems/css/gems-fluid.css trunk/new_project/htdocs/gems/css/gems-new.css Modified: trunk/new_project/htdocs/gems/css/gems-fluid.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems-fluid.css 2013-01-29 13:01:56 UTC (rev 1124) +++ trunk/new_project/htdocs/gems/css/gems-fluid.css 2013-01-29 13:47:18 UTC (rev 1125) @@ -688,3 +688,8 @@ .zend_echo { font-weight: normal; } + +/* fixes for tabrow with browsetable */ +#autofilter_target { clear: both;} +.tabrow { clear: both; } +.tabrow .tab { width: auto;} \ No newline at end of file Modified: trunk/new_project/htdocs/gems/css/gems-new.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems-new.css 2013-01-29 13:01:56 UTC (rev 1124) +++ trunk/new_project/htdocs/gems/css/gems-new.css 2013-01-29 13:47:18 UTC (rev 1125) @@ -766,3 +766,7 @@ font-weight: normal; } +/* fixes for tabrow with browsetable */ +#autofilter_target { clear: both;} +.tabrow { clear: both; } +.tabrow .tab { width: auto;} \ 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...> - 2013-01-29 13:02:03
|
Revision: 1124 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1124&view=rev Author: mennodekker Date: 2013-01-29 13:01:56 +0000 (Tue, 29 Jan 2013) Log Message: ----------- menuHtml is now sorted by order Modified Paths: -------------- trunk/library/classes/Gems/Menu/MenuAbstract.php Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-29 11:39:48 UTC (rev 1123) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-29 13:01:56 UTC (rev 1124) @@ -54,7 +54,7 @@ */ public $escort; - protected $_subItems; + protected $_subItems = array(); /** * Copy from Zend_Translate_Adapter @@ -117,6 +117,7 @@ $i = 0; $pages = array(); foreach ($this->_subItems as $item) { + $item->sortByOrder(); if (! $item->get('button_only')) { $page = $item->_toNavigationArray($source); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-29 11:39:55
|
Revision: 1123 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1123&view=rev Author: mennodekker Date: 2013-01-29 11:39:48 +0000 (Tue, 29 Jan 2013) Log Message: ----------- Read label for gr2o_patient_nr from model, and use old label as fall-back for backward compatibility Modified Paths: -------------- trunk/library/snippets/RespondentDetailsSnippet.php Modified: trunk/library/snippets/RespondentDetailsSnippet.php =================================================================== --- trunk/library/snippets/RespondentDetailsSnippet.php 2013-01-29 08:20:15 UTC (rev 1122) +++ trunk/library/snippets/RespondentDetailsSnippet.php 2013-01-29 11:39:48 UTC (rev 1123) @@ -68,7 +68,11 @@ $address[] = $bridge->grs_city; // ROW 0 - $bridge->addItem($bridge->gr2o_patient_nr, $this->_('Respondent nr: ')); + $label = $this->model->get('gr2o_patient_nr', 'label'); // Try to read label from model... + if (empty($label)) { + $label = $this->_('Respondent nr: '); // ...but have a fall-back + } + $bridge->addItem($bridge->gr2o_patient_nr, $label); $bridge->addItem( $HTML->spaced($bridge->itemIf('grs_last_name', array($bridge->grs_last_name, ',')), $bridge->grs_gender, $bridge->grs_first_name, $bridge->grs_surname_prefix), $this->_('Respondent')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-29 08:20:21
|
Revision: 1122 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1122&view=rev Author: mennodekker Date: 2013-01-29 08:20:15 +0000 (Tue, 29 Jan 2013) Log Message: ----------- Fixed typo in spss export Modified Paths: -------------- trunk/library/classes/Gems/Export/Spss.php Modified: trunk/library/classes/Gems/Export/Spss.php =================================================================== --- trunk/library/classes/Gems/Export/Spss.php 2013-01-24 17:23:36 UTC (rev 1121) +++ trunk/library/classes/Gems/Export/Spss.php 2013-01-29 08:20:15 UTC (rev 1122) @@ -270,7 +270,7 @@ $size = $answerModel->get($key, 'maxlength'); // This comes from db when available if (is_null($size)) { $size = $answerModel->get($key, 'size'); // This is the display width - if ($is_null($size)) { + if (is_null($size)) { $size = $defaultSize; // We just don't know, make it the default } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-24 17:23:45
|
Revision: 1121 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1121&view=rev Author: matijsdejong Date: 2013-01-24 17:23:36 +0000 (Thu, 24 Jan 2013) Log Message: ----------- Fixed wrong translation Show code in survey overview Date selection now can include overlapping codes Fixed organization selection list in new overviews Modified Paths: -------------- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/Gems/Default/TokenPlanAction.php trunk/library/classes/Gems/Events.php trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php trunk/library/classes/Gems/Tracker/Survey.php trunk/library/classes/Gems/Util/TrackData.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -461,9 +461,9 @@ $model->set('gsu_result_field', 'label', $this->_('Result field')); $model->set('gsu_duration', 'label', $this->_('Duration description'), 'description', $this->_('Text to inform the respondent, e.g. "20 seconds" or "1 minute".')); - - $model->setIfExists('gsu_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); - + } + $model->setIfExists('gsu_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); + if ($detailed) { $model->set('gsu_beforeanswering_event', 'label', $this->_('Before answering'), 'multiOptions', $events->listSurveyBeforeAnsweringEvents()); $model->set('gsu_completed_event', 'label', $this->_('After completion'), 'multiOptions', $events->listSurveyCompletionEvents()); $model->set('gsu_display_event', 'label', $this->_('Answer display'), 'multiOptions', $events->listSurveyDisplayEvents()); Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/TokenPlanAction.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -62,7 +62,7 @@ // Row with dates and patient data $bridge->gtr_track_type; // Data needed for buttons - + $bridge->tr()->appendAttrib('class', $bridge->row_class); $bridge->setDefaultRowClass(MUtil_Html_TableElement::createAlternateRowClass('even', 'even', 'odd', 'odd')); @@ -220,6 +220,10 @@ } $dates = array( + '<gto_valid_from gto_valid_until' + => $this->_('Is valid during'), + '>gto_valid_from gto_valid_until' + => $this->_('Is valid within'), 'gto_valid_from' => $this->_('Valid from'), 'gto_valid_until' => $this->_('Valid until'), 'gto_mail_sent_date' => $this->_('E-Mailed on'), @@ -336,6 +340,7 @@ //Add default filter $filter = array(); if ($where = Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($data, $this->db)) { + // MUtil_Echo::track($where); $filter[] = $where; } $filter['gto_id_organization'] = isset($data['gto_id_organization']) ? $data['gto_id_organization'] : $this->escort->getCurrentOrganization(); // Is overruled when set in param @@ -441,7 +446,8 @@ return array( 'datefrom' => $now->toString($inFormat), - 'dateused' => 'gto_valid_from', + 'dateused' => '<gto_valid_from gto_valid_until', + 'dateuntil' => $now->toString($inFormat), 'gto_id_organization' => $this->escort->getCurrentOrganization(), 'main_filter' => 'all', ); Modified: trunk/library/classes/Gems/Events.php =================================================================== --- trunk/library/classes/Gems/Events.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Events.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -106,7 +106,7 @@ $paths[$prefix] = $dir . DIRECTORY_SEPARATOR . $eventType; } $paths[''] = APPLICATION_PATH . '/events/' . strtolower($eventType); - MUtil_Echo::track($paths); + // MUtil_Echo::track($paths); return $paths; } Modified: trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -346,35 +346,111 @@ */ public static function getPeriodFilter(array $data, Zend_Db_Adapter_Abstract $db) { - if (isset($data['dateused'])) { - $options = array(); - MUtil_Model_FormBridge::applyFixedOptions('date', $options); + $isUsed = isset($data['dateused']) && $data['dateused']; + if (! $isUsed) { + return; + } - $outFormat = 'yyyy-MM-dd'; - $inFormat = isset($options['dateFormat']) ? $options['dateFormat'] : null; + $options = array(); + MUtil_Model_FormBridge::applyFixedOptions('date', $options); + $outFormat = 'yyyy-MM-dd'; + $inFormat = isset($options['dateFormat']) ? $options['dateFormat'] : null; - if (isset($data['datefrom']) && $data['datefrom']) { - if (isset($data['dateuntil']) && $data['dateuntil']) { + $isFrom = isset($data['datefrom']) && $data['datefrom'] && MUtil_Date::isDate($data['datefrom'], $inFormat); + $isUntil = isset($data['dateuntil']) && $data['dateuntil'] && MUtil_Date::isDate($data['dateuntil'], $inFormat); + if (! ($isFrom || $isUntil)) { + return; + } + + + switch ($data['dateused'][0]) { + case '<': + // overlaps + $periods = explode(' ', substr($data['dateused'], 1)); + + if ($isFrom && $isUntil) { return sprintf( + '(%1$s <= %4$s OR (%1$s IS NULL AND %2$s IS NOT NULL)) AND + (%2$s >= %3$s OR %2$s IS NULL)', + $db->quoteIdentifier($periods[0]), + $db->quoteIdentifier($periods[1]), + $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)), + $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) + ); + } + if ($isFrom) { + return sprintf( + '%2$s >= %3$s OR (%2$s IS NULL AND %1$s IS NOT NULL)', + $db->quoteIdentifier($periods[0]), + $db->quoteIdentifier($periods[1]), + $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)) + ); + } + if ($isUntil) { + return sprintf( + '%1$s <= %3$s OR (%1$s IS NULL AND %2$s IS NOT NULL)', + $db->quoteIdentifier($periods[0]), + $db->quoteIdentifier($periods[1]), + $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) + ); + } + return; + + case '>': + // within + $periods = explode(' ', substr($data['dateused'], 1)); + + if ($isFrom && $isUntil) { + return sprintf( + '%1$s >= %3$s AND %2$s <= %4$s', + $db->quoteIdentifier($periods[0]), + $db->quoteIdentifier($periods[1]), + $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)), + $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) + ); + } + if ($isFrom) { + return sprintf( + '%1$s >= %3$s AND (%2$s IS NULL OR %2$s >= %3$s)', + $db->quoteIdentifier($periods[0]), + $db->quoteIdentifier($periods[1]), + $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)) + ); + } + if ($isUntil) { + return sprintf( + '%2$s <= %3$s AND (%1$s IS NULL OR %1$s <= %3$s)', + $db->quoteIdentifier($periods[0]), + $db->quoteIdentifier($periods[1]), + $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) + ); + } + return; + + default: + if ($isFrom && $isUntil) { + return sprintf( '%s BETWEEN %s AND %s', $db->quoteIdentifier($data['dateused']), $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)), $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) ); } - return sprintf( - '%s >= %s', - $db->quoteIdentifier($data['dateused']), - $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)) - ); - } - if (isset($data['dateuntil']) && $data['dateuntil']) { - return sprintf( - '%s <= %s', - $db->quoteIdentifier($data['dateused']), - $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) - ); - } + if ($isFrom) { + return sprintf( + '%s >= %s', + $db->quoteIdentifier($data['dateused']), + $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)) + ); + } + if ($isUntil) { + return sprintf( + '%s <= %s', + $db->quoteIdentifier($data['dateused']), + $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) + ); + } + return; } } Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -47,6 +47,12 @@ class Gems_Snippets_Tracker_Compliance_ComplianceSearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet { /** + * + * @var Gems_Loader + */ + protected $loader; + + /** * Returns a text element for autosearch. Can be overruled. * * The form / html elements to search on. Elements can be grouped by inserting null's between them. @@ -57,13 +63,17 @@ */ protected function getAutoSearchElements(array $data) { - $elements[] = $this->_createSelectElement('gr2t_id_track', + $elements[] = $this->_createSelectElement( + 'gr2t_id_track', $this->util->getTrackData()->getSteppedTracks(), - $this->_('(select a track)')); + $this->_('(select a track)') + ); - $elements[] = $this->_createSelectElement('gr2t_id_organization', - $this->util->getDbLookup()->getOrganizationsWithRespondents(), - $this->_('(all organizations)')); + $elements[] = $this->_createSelectElement( + 'gr2t_id_organization', + $this->loader->getCurrentUser()->getRespondentOrganizations(), + $this->_('(all organizations)') + ); $elements[] = null; Modified: trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -47,6 +47,12 @@ class Gems_Snippets_Tracker_Summary_SummarySearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet { /** + * + * @var Gems_Loader + */ + protected $loader; + + /** * Returns a text element for autosearch. Can be overruled. * * The form / html elements to search on. Elements can be grouped by inserting null's between them. @@ -57,13 +63,17 @@ */ protected function getAutoSearchElements(array $data) { - $elements[] = $this->_createSelectElement('gto_id_track', + $elements[] = $this->_createSelectElement( + 'gto_id_track', $this->util->getTrackData()->getSteppedTracks(), - $this->_('(select a track)')); + $this->_('(select a track)') + ); - $elements[] = $this->_createSelectElement('gto_id_organization', - $this->util->getDbLookup()->getOrganizationsWithRespondents(), - $this->_('(all organizations)')); + $elements[] = $this->_createSelectElement( + 'gto_id_organization', + $this->loader->getCurrentUser()->getRespondentOrganizations(), + $this->_('(all organizations)') + ); $elements[] = null; Modified: trunk/library/classes/Gems/Tracker/Survey.php =================================================================== --- trunk/library/classes/Gems/Tracker/Survey.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Tracker/Survey.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -36,7 +36,7 @@ */ /** - * Object representing a specific Survey + * Object representing a specific Survey * * @package Gems * @subpackage Tracker @@ -425,7 +425,7 @@ */ public function getSource() { - if (! $this->_source && isset($this->_gemsSurvey['gsu_id_source'])) { + if (! $this->_source && isset($this->_gemsSurvey['gsu_id_source']) && $this->_gemsSurvey['gsu_id_source']) { $this->_source = $this->tracker->getSource($this->_gemsSurvey['gsu_id_source']); if (! $this->_source) { Modified: trunk/library/classes/Gems/Util/TrackData.php =================================================================== --- trunk/library/classes/Gems/Util/TrackData.php 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/classes/Gems/Util/TrackData.php 2013-01-24 17:23:36 UTC (rev 1121) @@ -204,6 +204,30 @@ } /** + * + * @param string $code + * @return array survey id => survey name + */ + public function getSurveysByCode($code) + { + $cacheId = __CLASS__ . '_' . __FUNCTION__ . '_' . $code; + + if ($results = $this->cache->load($cacheId)) { + return $results; + } + + $select = $this->db->select(); + $select->from('gems__surveys', array('gsu_id_survey', 'gsu_survey_name')) + ->where("gsu_code = ?", $code) + ->where("gsu_active = 1") + ->order('gsu_survey_name'); + + $results = $this->db->fetchPairs($select); + $this->cache->save($results, $cacheId, array('surveys')); + return $results; + } + + /** * Returns array (id => name) of all 'T' tracks, sorted alphabetically * @return array */ Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/languages/default-en.po 2013-01-24 17:23:36 UTC (rev 1121) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-21 16:58+0100\n" +"POT-Creation-Date: 2013-01-24 18:21+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -1273,7 +1273,7 @@ #: classes/Gems/Default/SurveyMaintenanceAction.php:503 #: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:737 #: classes/Gems/Tracker/Model/TrackModel.php:102 -#: classes/Gems/Util/TrackData.php:147 +#: classes/Gems/Util/TrackData.php:153 msgid "Active" msgstr "Active" @@ -1434,13 +1434,13 @@ msgstr "Invalid language setting." #: classes/Gems/Default/LogAction.php:78 -#: classes/Gems/Default/TokenPlanAction.php:234 +#: classes/Gems/Default/TokenPlanAction.php:238 #: classes/Gems/Snippets/AutosearchFormSnippet.php:125 msgid "from" msgstr "from" #: classes/Gems/Default/LogAction.php:83 -#: classes/Gems/Default/TokenPlanAction.php:238 +#: classes/Gems/Default/TokenPlanAction.php:242 #: classes/Gems/Snippets/AutosearchFormSnippet.php:141 msgid "until" msgstr "until" @@ -1759,8 +1759,8 @@ #: classes/Gems/Default/RespondentAction.php:386 #: classes/Gems/Default/StaffAction.php:335 #: classes/Gems/Default/StaffAction.php:405 -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:66 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:66 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:75 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:75 msgid "(all organizations)" msgstr "(all organizations)" @@ -2620,14 +2620,14 @@ msgstr "Round" #: classes/Gems/Default/SummaryAction.php:111 -#: classes/Gems/Default/TokenPlanAction.php:292 +#: classes/Gems/Default/TokenPlanAction.php:296 #: classes/Gems/Selector/TokenByGroupDateSelector.php:139 #: classes/Gems/Util/TokenData.php:67 msgid "Answered" msgstr "Answered" #: classes/Gems/Default/SummaryAction.php:112 -#: classes/Gems/Default/TokenPlanAction.php:293 +#: classes/Gems/Default/TokenPlanAction.php:297 #: classes/Gems/Selector/TokenByGroupDateSelector.php:129 #: classes/Gems/Tracker/Token.php:1038 #: snippets/RespondentTokenTabsSnippet.php:68 @@ -2635,7 +2635,7 @@ msgstr "Missed" #: classes/Gems/Default/SummaryAction.php:113 -#: classes/Gems/Default/TokenPlanAction.php:287 +#: classes/Gems/Default/TokenPlanAction.php:291 #: classes/Gems/Tracker/Token.php:1044 msgid "Open" msgstr "Open" @@ -2653,7 +2653,7 @@ msgstr "Summary" #: classes/Gems/Default/SummaryAction.php:228 -#: classes/Gems/Default/TokenPlanAction.php:463 +#: classes/Gems/Default/TokenPlanAction.php:469 #: classes/Gems/Default/TrackAction.php:450 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 msgid "token" @@ -2891,17 +2891,17 @@ msgstr "Round / Details" #: classes/Gems/Default/TokenPlanAction.php:113 -#: classes/Gems/Default/TokenPlanAction.php:223 +#: classes/Gems/Default/TokenPlanAction.php:227 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:57 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:73 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:83 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:385 msgid "Valid from" msgstr "Valid from" #: classes/Gems/Default/TokenPlanAction.php:114 -#: classes/Gems/Default/TokenPlanAction.php:224 +#: classes/Gems/Default/TokenPlanAction.php:228 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:58 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:74 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:84 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:386 #: classes/Gems/Tracker/Model/StandardTokenModel.php:198 msgid "Valid until" @@ -2921,70 +2921,78 @@ msgid "No tokens found." msgstr "No tokens found." -#: classes/Gems/Default/TokenPlanAction.php:225 +#: classes/Gems/Default/TokenPlanAction.php:224 +msgid "Is valid during" +msgstr "Is valid during" + +#: classes/Gems/Default/TokenPlanAction.php:226 +msgid "Is valid within" +msgstr "Is valid within" + +#: classes/Gems/Default/TokenPlanAction.php:229 msgid "E-Mailed on" msgstr "E-Mailed on" -#: classes/Gems/Default/TokenPlanAction.php:226 +#: classes/Gems/Default/TokenPlanAction.php:230 msgid "Completion date" msgstr "Completion date" -#: classes/Gems/Default/TokenPlanAction.php:230 +#: classes/Gems/Default/TokenPlanAction.php:234 #: classes/Gems/Snippets/AutosearchFormSnippet.php:116 msgid "For date" msgstr "For date" -#: classes/Gems/Default/TokenPlanAction.php:252 +#: classes/Gems/Default/TokenPlanAction.php:256 msgid "Select:" msgstr "Select:" -#: classes/Gems/Default/TokenPlanAction.php:258 +#: classes/Gems/Default/TokenPlanAction.php:262 msgid "(all tracks)" msgstr "(all tracks)" -#: classes/Gems/Default/TokenPlanAction.php:269 +#: classes/Gems/Default/TokenPlanAction.php:273 msgid "(all rounds)" msgstr "(all rounds)" -#: classes/Gems/Default/TokenPlanAction.php:283 +#: classes/Gems/Default/TokenPlanAction.php:287 msgid "(all surveys)" msgstr "(all surveys)" -#: classes/Gems/Default/TokenPlanAction.php:286 +#: classes/Gems/Default/TokenPlanAction.php:290 msgid "(all actions)" msgstr "(all actions)" -#: classes/Gems/Default/TokenPlanAction.php:288 +#: classes/Gems/Default/TokenPlanAction.php:292 msgid "Not emailed" msgstr "Not emailed" -#: classes/Gems/Default/TokenPlanAction.php:289 +#: classes/Gems/Default/TokenPlanAction.php:293 msgid "To email" msgstr "To email" -#: classes/Gems/Default/TokenPlanAction.php:290 +#: classes/Gems/Default/TokenPlanAction.php:294 msgid "Needs reminder" msgstr "Needs reminder" -#: classes/Gems/Default/TokenPlanAction.php:291 +#: classes/Gems/Default/TokenPlanAction.php:295 msgid "Yet to Answer" msgstr "Yet to Answer" -#: classes/Gems/Default/TokenPlanAction.php:294 +#: classes/Gems/Default/TokenPlanAction.php:298 msgid "Removed" msgstr "Removed" -#: classes/Gems/Default/TokenPlanAction.php:308 -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:88 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:90 +#: classes/Gems/Default/TokenPlanAction.php:312 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:98 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:100 msgid "(all fillers)" msgstr "(all fillers)" -#: classes/Gems/Default/TokenPlanAction.php:327 +#: classes/Gems/Default/TokenPlanAction.php:331 msgid "(all staff)" msgstr "(all staff)" -#: classes/Gems/Default/TokenPlanAction.php:454 +#: classes/Gems/Default/TokenPlanAction.php:460 #: classes/Gems/Snippets/TokenModelSnippetAbstract.php:59 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:122 #: snippets/BrowseSingleSurveyTokenSnippet.php:144 @@ -2992,7 +3000,7 @@ msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:468 +#: classes/Gems/Default/TokenPlanAction.php:474 msgid "Token planning" msgstr "Token planning" @@ -3911,19 +3919,19 @@ msgid "Legend" msgstr "Legend" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:62 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:62 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:69 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:69 msgid "(select a track)" msgstr "(select a track)" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:71 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:71 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:81 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:81 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:370 msgid "Track start" msgstr "Track start" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:72 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:72 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:82 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:82 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:371 msgid "Track end" msgstr "Track end" @@ -4704,35 +4712,35 @@ msgid "Token does not exist" msgstr "Token does not exist" -#: classes/Gems/Util/TrackData.php:147 +#: classes/Gems/Util/TrackData.php:153 msgid "Inactive" msgstr "Inactive" -#: classes/Gems/Util/TrackData.php:179 +#: classes/Gems/Util/TrackData.php:185 msgid "Minutes" msgstr "Minutes" -#: classes/Gems/Util/TrackData.php:180 +#: classes/Gems/Util/TrackData.php:186 msgid "Hours" msgstr "Hours" -#: classes/Gems/Util/TrackData.php:181 +#: classes/Gems/Util/TrackData.php:187 msgid "Days" msgstr "Days" -#: classes/Gems/Util/TrackData.php:182 +#: classes/Gems/Util/TrackData.php:188 msgid "Weeks" msgstr "Weeks" -#: classes/Gems/Util/TrackData.php:183 +#: classes/Gems/Util/TrackData.php:189 msgid "Months" msgstr "Months" -#: classes/Gems/Util/TrackData.php:184 +#: classes/Gems/Util/TrackData.php:190 msgid "Quarters" msgstr "Quarters" -#: classes/Gems/Util/TrackData.php:185 +#: classes/Gems/Util/TrackData.php:191 msgid "Years" msgstr "Years" @@ -5318,9 +5326,6 @@ #~ "Only for unanswered tokens: updates the survey of a token when changed in " #~ "the track." -#~ msgid "Invalid organization." -#~ msgstr "Invalid organization." - #~ msgid "Check all is answersed" #~ msgstr "Check all is answersed" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2013-01-22 18:30:24 UTC (rev 1120) +++ trunk/library/languages/default-nl.po 2013-01-24 17:23:36 UTC (rev 1121) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-21 16:58+0100\n" +"POT-Creation-Date: 2013-01-24 18:21+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -1278,7 +1278,7 @@ #: classes/Gems/Default/SurveyMaintenanceAction.php:503 #: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:737 #: classes/Gems/Tracker/Model/TrackModel.php:102 -#: classes/Gems/Util/TrackData.php:147 +#: classes/Gems/Util/TrackData.php:153 msgid "Active" msgstr "Actief" @@ -1442,13 +1442,13 @@ msgstr "Ongeldige taal instelling." #: classes/Gems/Default/LogAction.php:78 -#: classes/Gems/Default/TokenPlanAction.php:234 +#: classes/Gems/Default/TokenPlanAction.php:238 #: classes/Gems/Snippets/AutosearchFormSnippet.php:125 msgid "from" msgstr "vanaf" #: classes/Gems/Default/LogAction.php:83 -#: classes/Gems/Default/TokenPlanAction.php:238 +#: classes/Gems/Default/TokenPlanAction.php:242 #: classes/Gems/Snippets/AutosearchFormSnippet.php:141 msgid "until" msgstr "tot" @@ -1768,8 +1768,8 @@ #: classes/Gems/Default/RespondentAction.php:386 #: classes/Gems/Default/StaffAction.php:335 #: classes/Gems/Default/StaffAction.php:405 -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:66 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:66 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:75 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:75 msgid "(all organizations)" msgstr "(alle organisaties)" @@ -2636,14 +2636,14 @@ msgstr "Ronde" #: classes/Gems/Default/SummaryAction.php:111 -#: classes/Gems/Default/TokenPlanAction.php:292 +#: classes/Gems/Default/TokenPlanAction.php:296 #: classes/Gems/Selector/TokenByGroupDateSelector.php:139 #: classes/Gems/Util/TokenData.php:67 msgid "Answered" msgstr "Beantwoord" #: classes/Gems/Default/SummaryAction.php:112 -#: classes/Gems/Default/TokenPlanAction.php:293 +#: classes/Gems/Default/TokenPlanAction.php:297 #: classes/Gems/Selector/TokenByGroupDateSelector.php:129 #: classes/Gems/Tracker/Token.php:1038 #: snippets/RespondentTokenTabsSnippet.php:68 @@ -2651,7 +2651,7 @@ msgstr "Gemist" #: classes/Gems/Default/SummaryAction.php:113 -#: classes/Gems/Default/TokenPlanAction.php:287 +#: classes/Gems/Default/TokenPlanAction.php:291 #: classes/Gems/Tracker/Token.php:1044 msgid "Open" msgstr "Open" @@ -2669,7 +2669,7 @@ msgstr "Samenvatting" #: classes/Gems/Default/SummaryAction.php:228 -#: classes/Gems/Default/TokenPlanAction.php:463 +#: classes/Gems/Default/TokenPlanAction.php:469 #: classes/Gems/Default/TrackAction.php:450 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 msgid "token" @@ -2910,17 +2910,17 @@ msgstr "Ronde / Details" #: classes/Gems/Default/TokenPlanAction.php:113 -#: classes/Gems/Default/TokenPlanAction.php:223 +#: classes/Gems/Default/TokenPlanAction.php:227 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:57 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:73 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:83 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:385 msgid "Valid from" msgstr "Geldig vanaf" #: classes/Gems/Default/TokenPlanAction.php:114 -#: classes/Gems/Default/TokenPlanAction.php:224 +#: classes/Gems/Default/TokenPlanAction.php:228 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:58 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:74 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:84 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:386 #: classes/Gems/Tracker/Model/StandardTokenModel.php:198 msgid "Valid until" @@ -2940,70 +2940,78 @@ msgid "No tokens found." msgstr "Geen kenmerken gevonden." -#: classes/Gems/Default/TokenPlanAction.php:225 +#: classes/Gems/Default/TokenPlanAction.php:224 +msgid "Is valid during" +msgstr "Is geldig gedurende" + +#: classes/Gems/Default/TokenPlanAction.php:226 +msgid "Is valid within" +msgstr "Is geldig tijdens" + +#: classes/Gems/Default/TokenPlanAction.php:229 msgid "E-Mailed on" msgstr "Email verstuurd op" -#: classes/Gems/Default/TokenPlanAction.php:226 +#: classes/Gems/Default/TokenPlanAction.php:230 msgid "Completion date" msgstr "Datum ingevuld op" -#: classes/Gems/Default/TokenPlanAction.php:230 +#: classes/Gems/Default/TokenPlanAction.php:234 #: classes/Gems/Snippets/AutosearchFormSnippet.php:116 msgid "For date" msgstr "Met datum" -#: classes/Gems/Default/TokenPlanAction.php:252 +#: classes/Gems/Default/TokenPlanAction.php:256 msgid "Select:" msgstr "Selecteren:" -#: classes/Gems/Default/TokenPlanAction.php:258 +#: classes/Gems/Default/TokenPlanAction.php:262 msgid "(all tracks)" msgstr "(alle trajecten)" -#: classes/Gems/Default/TokenPlanAction.php:269 +#: classes/Gems/Default/TokenPlanAction.php:273 msgid "(all rounds)" msgstr "(alle rondes)" -#: classes/Gems/Default/TokenPlanAction.php:283 +#: classes/Gems/Default/TokenPlanAction.php:287 msgid "(all surveys)" msgstr "(alle vragenlijsten)" -#: classes/Gems/Default/TokenPlanAction.php:286 +#: classes/Gems/Default/TokenPlanAction.php:290 msgid "(all actions)" msgstr "(alle acties)" -#: classes/Gems/Default/TokenPlanAction.php:288 +#: classes/Gems/Default/TokenPlanAction.php:292 msgid "Not emailed" msgstr "Niet gemaild" -#: classes/Gems/Default/TokenPlanAction.php:289 +#: classes/Gems/Default/TokenPlanAction.php:293 msgid "To email" msgstr "Te mailen" -#: classes/Gems/Default/TokenPlanAction.php:290 +#: classes/Gems/Default/TokenPlanAction.php:294 msgid "Needs reminder" msgstr "Herinnering nodig" -#: classes/Gems/Default/TokenPlanAction.php:291 +#: classes/Gems/Default/TokenPlanAction.php:295 msgid "Yet to Answer" msgstr "Nog te beantwoorden" -#: classes/Gems/Default/TokenPlanAction.php:294 +#: classes/Gems/Default/TokenPlanAction.php:298 msgid "Removed" msgstr "Verwijderd" -#: classes/Gems/Default/TokenPlanAction.php:308 -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:88 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:90 +#: classes/Gems/Default/TokenPlanAction.php:312 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:98 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:100 msgid "(all fillers)" msgstr "(alle invullers)" -#: classes/Gems/Default/TokenPlanAction.php:327 +#: classes/Gems/Default/TokenPlanAction.php:331 msgid "(all staff)" msgstr "(alle medewerkers)" -#: classes/Gems/Default/TokenPlanAction.php:454 +#: classes/Gems/Default/TokenPlanAction.php:460 #: classes/Gems/Snippets/TokenModelSnippetAbstract.php:59 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:122 #: snippets/BrowseSingleSurveyTokenSnippet.php:144 @@ -3011,7 +3019,7 @@ msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:468 +#: classes/Gems/Default/TokenPlanAction.php:474 msgid "Token planning" msgstr "Per kenmerk plannen" @@ -3079,7 +3087,7 @@ #: classes/Gems/Default/TrackAction.php:461 #, php-format msgid "Tracks assigned to %s: %s" -msgstr "Geen traject toegewezen aan patiënt nr: %s: %s" +msgstr "Trajecten toegewezen aan patiënt nr: %s: %s" #: classes/Gems/Default/TrackAction.php:489 #, php-format @@ -3939,19 +3947,19 @@ msgid "Legend" msgstr "Legenda" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:62 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:62 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:69 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:69 msgid "(select a track)" msgstr "(selecteer een traject)" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:71 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:71 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:81 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:81 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:370 msgid "Track start" msgstr "Traject start" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:72 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:72 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:82 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:82 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:371 msgid "Track end" msgstr "Traject einde" @@ -4106,7 +4114,7 @@ #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:387 msgid "Start time" -msgstr "Starten tijd" +msgstr "Start tijd" #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:388 msgid "Completion time" @@ -4749,35 +4757,35 @@ msgid "Token does not exist" msgstr "Kenmerk bestaat niet" -#: classes/Gems/Util/TrackData.php:147 +#: classes/Gems/Util/TrackData.php:153 msgid "Inactive" msgstr "Inactief" -#: classes/Gems/Util/TrackData.php:179 +#: classes/Gems/Util/TrackData.php:185 msgid "Minutes" msgstr "Minuten" -#: classes/Gems/Util/TrackData.php:180 +#: classes/Gems/Util/TrackData.php:186 msgid "Hours" msgstr "Uren" -#: classes/Gems/Util/TrackData.php:181 +#: classes/Gems/Util/TrackData.php:187 msgid "Days" msgstr "Dagen" -#: classes/Gems/Util/TrackData.php:182 +#: classes/Gems/Util/TrackData.php:188 msgid "Weeks" msgstr "Weken" -#: classes/Gems/Util/TrackData.php:183 +#: classes/Gems/Util/TrackData.php:189 msgid "Months" msgstr "Maanden" -#: classes/Gems/Util/TrackData.php:184 +#: classes/Gems/Util/TrackData.php:190 msgid "Quarters" msgstr "Kwartieren" -#: classes/Gems/Util/TrackData.php:185 +#: classes/Gems/Util/TrackData.php:191 msgid "Years" msgstr "Jaren" @@ -5364,9 +5372,6 @@ #~ msgid "Some help for this export" #~ msgstr "Uitleg over deze export mogelijkheid" -#~ msgid "Invalid organization." -#~ msgstr "Ongeldige organisatie." - #~ msgid "Check all is answersed" #~ msgstr "Controleer alles is beantwoord" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-22 18:30:32
|
Revision: 1120 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1120&view=rev Author: matijsdejong Date: 2013-01-22 18:30:24 +0000 (Tue, 22 Jan 2013) Log Message: ----------- Extended transformer interface for transformFilter Moved _checkFilterUsed and _checkSortUsed to the initial input functions from the later processing functions Modified Paths: -------------- trunk/library/classes/Gems/Export/ExportModel.php trunk/library/classes/Gems/Model/DbaModel.php trunk/library/classes/Gems/Tracker/SurveyModel.php trunk/library/classes/Gems/Util/TrackData.php trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php trunk/library/classes/MUtil/Model/ModelAbstract.php trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php trunk/library/classes/MUtil/Model/ModelTransformerInterface.php trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php Modified: trunk/library/classes/Gems/Export/ExportModel.php =================================================================== --- trunk/library/classes/Gems/Export/ExportModel.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/Gems/Export/ExportModel.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -57,11 +57,11 @@ /** * Returns a nested array containing the items requested. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type * @return array Nested array or false */ - protected function _load($filter = true, $sort = true) + protected function _load(array $filter, array $sort) { $result = array(); foreach ($this->getItemsOrdered() as $item) { Modified: trunk/library/classes/Gems/Model/DbaModel.php =================================================================== --- trunk/library/classes/Gems/Model/DbaModel.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/Gems/Model/DbaModel.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -147,20 +147,20 @@ /** * Returns a nested array containing the items requested. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type * @return array Nested array or false */ - protected function _load($filter = true, $sort = true) + protected function _load(array $filter, array $sort) { $data = $this->_loadAllData(); if ($filter) { - $data = $this->_filterData($data, $this->_checkFilterUsed($filter)); + $data = $this->_filterData($data, $filter); } if ($sort) { - $data = $this->_sortData($data, $this->_checkSortUsed($sort)); + $data = $this->_sortData($data, $sort); } return $data; Modified: trunk/library/classes/Gems/Tracker/SurveyModel.php =================================================================== --- trunk/library/classes/Gems/Tracker/SurveyModel.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/Gems/Tracker/SurveyModel.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -87,11 +87,11 @@ /** * Returns a nested array containing the items requested. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type * @return array Nested array or false */ - protected function _load($filter = true, $sort = true) + protected function _load(array $filter, array $sort) { return $this->addAnswers(parent::_load($filter, $sort)); } Modified: trunk/library/classes/Gems/Util/TrackData.php =================================================================== --- trunk/library/classes/Gems/Util/TrackData.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/Gems/Util/TrackData.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -48,6 +48,12 @@ { /** * + * @var Zend_Cache_Core + */ + protected $cache; + + /** + * * @var Zend_Db_Adapter_Abstract */ protected $db; Modified: trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -120,11 +120,11 @@ /** * Get a select statement using a filter and sort * - * @param array $filter - * @param array $sort + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type * @return Zend_Db_Table_Select */ - protected function _createSelect($filter = null, $sort = null) + protected function _createSelect(array $filter, array $sort) { $select = $this->getSelect(); @@ -154,7 +154,7 @@ $adapter = $this->getAdapter(); // Filter - foreach ($this->_checkFilterUsed($filter) as $name => $value) { + foreach ($filter as $name => $value) { if (is_int($name)) { $select->where($value); } else { @@ -183,43 +183,41 @@ } // Sort - if ($sort = $this->_checkSortUsed($sort)) { - foreach ($sort as $key => $order) { - if (is_numeric($key) || is_string($order)) { - if ($this->has($order)) { - $sqlsort[] = $order; - } - } else { - // Code not needed at least for MySQL, a named calculated column can be used in - // an ORDER BY. However, it does work. - /* - if ($expression = $this->get($key, 'column_expression')) { - //The brackets tell Zend_Db_Select that this is an epression in a sort. - $key = '(' . $expression . ')'; - } // */ - switch ($order) { - case SORT_ASC: - if ($this->has($key)) { - $sqlsort[] = $key . ' ASC'; - } - break; - case SORT_DESC: - if ($this->has($key)) { - $sqlsort[] = $key . ' DESC'; - } - break; - default: - if ($this->has($order)) { - $sqlsort[] = $order; - } - break; - } + foreach ($sort as $key => $order) { + if (is_numeric($key) || is_string($order)) { + if ($this->has($order)) { + $sqlsort[] = $order; } + } else { + // Code not needed at least for MySQL, a named calculated column can be used in + // an ORDER BY. However, it does work. + /* + if ($expression = $this->get($key, 'column_expression')) { + //The brackets tell Zend_Db_Select that this is an epression in a sort. + $key = '(' . $expression . ')'; + } // */ + switch ($order) { + case SORT_ASC: + if ($this->has($key)) { + $sqlsort[] = $key . ' ASC'; + } + break; + case SORT_DESC: + if ($this->has($key)) { + $sqlsort[] = $key . ' DESC'; + } + break; + default: + if ($this->has($order)) { + $sqlsort[] = $order; + } + break; + } } + } - if (isset($sqlsort)) { - $select->order($sqlsort); - } + if (isset($sqlsort)) { + $select->order($sqlsort); } if (MUtil_Model::$verbose) { @@ -319,11 +317,11 @@ /** * Returns a nested array containing the items requested. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type * @return array Nested array or false */ - protected function _load($filter = true, $sort = true) + protected function _load(array $filter, array $sort) { return $this->_createSelect($filter, $sort)->query(Zend_Db::FETCH_ASSOC)->fetchAll(); } @@ -331,11 +329,11 @@ /** * Returns an array containing the first requested item. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort - * @return array An array or false + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type + * @return array Nested array or false */ - protected function _loadFirst($filter = true, $sort = true) + protected function _loadFirst(array $filter, array $sort) { $select = $this->_createSelect($filter, $sort); $select->limit(1, 0); @@ -930,7 +928,10 @@ */ public function loadPaginator($filter = true, $sort = true) { - $select = $this->_createSelect($filter, $sort); + $select = $this->_createSelect( + $this->_checkFilterUsed($filter), + $this->_checkSortUsed($sort) + ); $adapter = new MUtil_Model_SelectModelPaginator($select, $this); return new Zend_Paginator($adapter); Modified: trunk/library/classes/MUtil/Model/ModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -144,6 +144,9 @@ $filter = $this->getFilter(); } if ($filter && is_array($filter)) { + foreach ($this->_transformers as $transformer) { + $filter = $transformer->transformFilter($this, $filter); + } if ($this->hasTextSearchFilter() && ($param = $this->getTextFilter())) { if (isset($filter[$param])) { @@ -271,20 +274,20 @@ /** * Returns a nested array containing the items requested. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type * @return array Nested array or false */ - abstract protected function _load($filter = true, $sort = true); + abstract protected function _load(array $filter, array $sort); /** * Returns a nested array containing the items requested. * - * @param mixed $filter True to use the stored filter, array to specify a different filter - * @param mixed $sort True to use the stored sort, array to specify a different sort + * @param array $filter Filter array, num keys contain fixed expresions, text keys are equal or one of filters + * @param array $sort Sort array field name => sort type * @return array Nested array or false */ - protected function _loadFirst($filter = true, $sort = true) + protected function _loadFirst(array $filter, array $sort) { $data = $this->_load($filter, $sort); @@ -1048,7 +1051,10 @@ */ public function load($filter = true, $sort = true) { - $data = $this->_load($filter, $sort); + $data = $this->_load( + $this->_checkFilterUsed($filter), + $this->_checkSortUsed($sort) + ); if (is_array($data)) { $data = $this->processAfterLoad($data); @@ -1066,7 +1072,10 @@ */ public function loadFirst($filter = true, $sort = true) { - $row = $this->_loadFirst($filter, $sort); + $row = $this->_loadFirst( + $this->_checkFilterUsed($filter), + $this->_checkSortUsed($sort) + ); // MUtil_Echo::track($row); if (! is_array($row)) { Modified: trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -154,6 +154,21 @@ } /** + * This transform function checks the filter for + * a) retreiving filters to be applied to the transforming data, + * b) adding filters that are the result + * + * @param MUtil_Model_ModelAbstract $model + * @param array $filter + * @return array The (optionally changed) filter + */ + public function transformFilter(MUtil_Model_ModelAbstract $model, array $filter) + { + // No changes + return $filter; + } + + /** * The transform function performs the actual transformation of the data and is called after * the loading of the data in the source model. * Modified: trunk/library/classes/MUtil/Model/ModelTransformerInterface.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelTransformerInterface.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/MUtil/Model/ModelTransformerInterface.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -58,6 +58,17 @@ public function getFieldInfo(MUtil_Model_ModelAbstract $model); /** + * This transform function checks the filter for + * a) retreiving filters to be applied to the transforming data, + * b) adding filters that are the result + * + * @param MUtil_Model_ModelAbstract $model + * @param array $filter + * @return array The (optionally changed) filter + */ + public function transformFilter(MUtil_Model_ModelAbstract $model, array $filter); + + /** * The transform function performs the actual transformation of the data and is called after * the loading of the data in the source model. * Modified: trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php =================================================================== --- trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php 2013-01-21 16:38:54 UTC (rev 1119) +++ trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php 2013-01-22 18:30:24 UTC (rev 1120) @@ -61,14 +61,12 @@ public function addModel(MUtil_Model_ModelAbstract $subModel, array $joinFields) { + // MUtil_Model::$verbose = true; + $name = $subModel->getName(); $this->_subModels[$name] = $subModel; $this->_joins[$name] = $joinFields; - if (count($joinFields) > 1) { - throw new MUtil_Model_ModelException(__CLASS__ . " currently accepts single field joins only."); - } - return $this; } @@ -88,6 +86,9 @@ foreach ($sub->getItemNames() as $name) { if (! $model->has($name)) { $data[$name] = $sub->get($name); + + // Remove unsuited data + unset($data[$name]['table'], $data[$name]['column_expression']); } } } @@ -95,6 +96,29 @@ } /** + * This transform function checks the filter for + * a) retreiving filters to be applied to the transforming data, + * b) adding filters that are the result + * + * @param MUtil_Model_ModelAbstract $model + * @param array $filter + * @return array The (optionally changed) filter + */ + public function transformFilter(MUtil_Model_ModelAbstract $model, array $filter) + { + // Make sure the join fields are in the result set/ + foreach ($this->_joins as $joins) { + foreach ($joins as $source => $target) { + if (!is_integer($source)) { + $model->get($source); + } + } + } + + return $filter; + } + + /** * The transform function performs the actual transformation of the data and is called after * the loading of the data in the source model. * @@ -122,17 +146,45 @@ $sdata = $sub->load(array($skey => $mfor)); // MUtil_Echo::track($sdata); - $skeys = array_flip(MUtil_Ra::column($skey, $sdata)); - $empty = array_fill_keys(array_keys(reset($sdata)), null); + if ($sdata) { + $skeys = array_flip(MUtil_Ra::column($skey, $sdata)); + $empty = array_fill_keys(array_keys(reset($sdata)), null); + foreach ($data as &$mrow) { + $mfind = $mrow[$mkey]; + + if (isset($skeys[$mfind])) { + $mrow += $sdata[$skeys[$mfind]]; + } else { + $mrow += $empty; + } + } + } else { + $empty = array_fill_keys($sub->getItemNames(), null); + + foreach ($data as &$mrow) { + $mrow += $empty; + } + } + } else { + $empty = array_fill_keys($sub->getItemNames(), null); foreach ($data as &$mrow) { - $mfind = $mrow[$mkey]; + $filter = $sub->getFilter(); + foreach ($this->_joins[$name] as $from => $to) { + if (isset($mrow[$from])) { + $filter[$to] = $mrow[$from]; + } + } - if (isset($skeys[$mfind])) { - $mrow += $sdata[$skeys[$mfind]]; + $sdata = $sub->loadFirst($filter); + + if ($sdata) { + $mrow += $sdata; } else { $mrow += $empty; } + + // MUtil_Echo::track($sdata, $mrow); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-21 16:39:01
|
Revision: 1119 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1119&view=rev Author: matijsdejong Date: 2013-01-21 16:38:54 +0000 (Mon, 21 Jan 2013) Log Message: ----------- Disabled debug code Modified Paths: -------------- trunk/library/classes/MUtil/Model/ModelAbstract.php Modified: trunk/library/classes/MUtil/Model/ModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-21 16:03:15 UTC (rev 1118) +++ trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-21 16:38:54 UTC (rev 1119) @@ -1067,7 +1067,7 @@ public function loadFirst($filter = true, $sort = true) { $row = $this->_loadFirst($filter, $sort); - MUtil_Echo::track($row); + // MUtil_Echo::track($row); if (! is_array($row)) { // Return false @@ -1076,7 +1076,7 @@ // Transform the row $data = $this->processAfterLoad(array($row)); - MUtil_Echo::track($data); + // MUtil_Echo::track($data); // Return resulting first row return reset($data); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-21 16:03:23
|
Revision: 1118 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1118&view=rev Author: matijsdejong Date: 2013-01-21 16:03:15 +0000 (Mon, 21 Jan 2013) Log Message: ----------- Updated translations Modified Paths: -------------- trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2013-01-21 14:29:29 UTC (rev 1117) +++ trunk/library/languages/default-en.po 2013-01-21 16:03:15 UTC (rev 1118) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-18 17:59+0100\n" +"POT-Creation-Date: 2013-01-21 16:58+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -418,7 +418,7 @@ msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:86 +#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:93 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patient nr" @@ -808,24 +808,24 @@ msgid "The survey for token %s is no longer active." msgstr "The survey for token %s is no longer active." -#: classes/Gems/Default/ComplianceAction.php:87 +#: classes/Gems/Default/ComplianceAction.php:94 msgid "Start date" msgstr "Start date" -#: classes/Gems/Default/ComplianceAction.php:88 +#: classes/Gems/Default/ComplianceAction.php:95 msgid "End date" msgstr "End date" -#: classes/Gems/Default/ComplianceAction.php:93 -#: classes/Gems/Default/SummaryAction.php:192 +#: classes/Gems/Default/ComplianceAction.php:100 +#: classes/Gems/Default/SummaryAction.php:134 msgid "No track selected..." msgstr "No track selected..." -#: classes/Gems/Default/ComplianceAction.php:173 +#: classes/Gems/Default/ComplianceAction.php:185 msgid "Compliance" msgstr "Compliance" -#: classes/Gems/Default/ComplianceAction.php:184 +#: classes/Gems/Default/ComplianceAction.php:196 #: classes/Gems/Default/ProjectTracksAction.php:85 #: classes/Gems/Default/TrackAction.php:452 #: classes/Gems/Default/TrackMaintenanceAction.php:331 @@ -1226,7 +1226,7 @@ #: classes/Gems/Default/ExportAction.php:154 #: classes/Gems/Default/MailJobAction.php:100 #: classes/Gems/Default/ProjectSurveysAction.php:67 -#: classes/Gems/Default/SummaryAction.php:168 +#: classes/Gems/Default/SummaryAction.php:110 #: classes/Gems/Default/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 @@ -2611,7 +2611,7 @@ msgid "You are not allowed to change this password." msgstr "You are not allowed to change this password." -#: classes/Gems/Default/SummaryAction.php:167 +#: classes/Gems/Default/SummaryAction.php:109 #: classes/Gems/Email/OneMailForm.php:55 #: classes/Gems/Export/RespondentExport.php:157 #: classes/Gems/Menu/MenuAbstract.php:500 @@ -2619,14 +2619,14 @@ msgid "Round" msgstr "Round" -#: classes/Gems/Default/SummaryAction.php:169 +#: classes/Gems/Default/SummaryAction.php:111 #: classes/Gems/Default/TokenPlanAction.php:292 #: classes/Gems/Selector/TokenByGroupDateSelector.php:139 -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:149 +#: classes/Gems/Util/TokenData.php:67 msgid "Answered" msgstr "Answered" -#: classes/Gems/Default/SummaryAction.php:170 +#: classes/Gems/Default/SummaryAction.php:112 #: classes/Gems/Default/TokenPlanAction.php:293 #: classes/Gems/Selector/TokenByGroupDateSelector.php:129 #: classes/Gems/Tracker/Token.php:1038 @@ -2634,25 +2634,25 @@ msgid "Missed" msgstr "Missed" -#: classes/Gems/Default/SummaryAction.php:171 +#: classes/Gems/Default/SummaryAction.php:113 #: classes/Gems/Default/TokenPlanAction.php:287 #: classes/Gems/Tracker/Token.php:1044 msgid "Open" msgstr "Open" -#: classes/Gems/Default/SummaryAction.php:172 +#: classes/Gems/Default/SummaryAction.php:114 msgid "Total" msgstr "Total" -#: classes/Gems/Default/SummaryAction.php:180 +#: classes/Gems/Default/SummaryAction.php:122 msgid "Filler" msgstr "Filler" -#: classes/Gems/Default/SummaryAction.php:205 +#: classes/Gems/Default/SummaryAction.php:147 msgid "Summary" msgstr "Summary" -#: classes/Gems/Default/SummaryAction.php:216 +#: classes/Gems/Default/SummaryAction.php:228 #: classes/Gems/Default/TokenPlanAction.php:463 #: classes/Gems/Default/TrackAction.php:450 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 @@ -3907,6 +3907,10 @@ msgid "Unknown respondent %s" msgstr "Unknown respondent %s" +#: classes/Gems/Snippets/Tracker/TokenStatusLegenda.php:72 +msgid "Legend" +msgstr "Legend" + #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:62 #: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:62 msgid "(select a track)" @@ -3924,26 +3928,6 @@ msgid "Track end" msgstr "Track end" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:151 -msgid "Missed deadline" -msgstr "Missed deadline" - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:153 -msgid "Open - can be answered now" -msgstr "Open - can be answered now" - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:155 -msgid "Valid from date unknown" -msgstr "Valid from date unknown" - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:157 -msgid "Valid from date in the future" -msgstr "Valid from date in the future" - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:159 -msgid "Token does not exist" -msgstr "Token does not exist" - #: classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php:126 #, php-format msgid "%d%%" @@ -4700,6 +4684,26 @@ msgid "Stop (per respondent or track only)" msgstr "Stop (per patient or track only)" +#: classes/Gems/Util/TokenData.php:64 +msgid "Valid from date unknown" +msgstr "Valid from date unknown" + +#: classes/Gems/Util/TokenData.php:65 +msgid "Valid from date in the future" +msgstr "Valid from date in the future" + +#: classes/Gems/Util/TokenData.php:66 +msgid "Open - can be answered now" +msgstr "Open - can be answered now" + +#: classes/Gems/Util/TokenData.php:68 +msgid "Missed deadline" +msgstr "Missed deadline" + +#: classes/Gems/Util/TokenData.php:69 +msgid "Token does not exist" +msgstr "Token does not exist" + #: classes/Gems/Util/TrackData.php:147 msgid "Inactive" msgstr "Inactive" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2013-01-21 14:29:29 UTC (rev 1117) +++ trunk/library/languages/default-nl.po 2013-01-21 16:03:15 UTC (rev 1118) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-18 17:59+0100\n" +"POT-Creation-Date: 2013-01-21 16:58+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -418,7 +418,7 @@ msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:86 +#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:93 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patiënt nr" @@ -810,24 +810,24 @@ msgid "The survey for token %s is no longer active." msgstr "De vragenlijst voor kenmerk %s is niet meer in gebruik." -#: classes/Gems/Default/ComplianceAction.php:87 +#: classes/Gems/Default/ComplianceAction.php:94 msgid "Start date" msgstr "Startdatum" -#: classes/Gems/Default/ComplianceAction.php:88 +#: classes/Gems/Default/ComplianceAction.php:95 msgid "End date" msgstr "Einddatum" -#: classes/Gems/Default/ComplianceAction.php:93 -#: classes/Gems/Default/SummaryAction.php:192 +#: classes/Gems/Default/ComplianceAction.php:100 +#: classes/Gems/Default/SummaryAction.php:134 msgid "No track selected..." msgstr "Geen traject geselecteerd..." -#: classes/Gems/Default/ComplianceAction.php:173 +#: classes/Gems/Default/ComplianceAction.php:185 msgid "Compliance" msgstr "Voortgang" -#: classes/Gems/Default/ComplianceAction.php:184 +#: classes/Gems/Default/ComplianceAction.php:196 #: classes/Gems/Default/ProjectTracksAction.php:85 #: classes/Gems/Default/TrackAction.php:452 #: classes/Gems/Default/TrackMaintenanceAction.php:331 @@ -1231,7 +1231,7 @@ #: classes/Gems/Default/ExportAction.php:154 #: classes/Gems/Default/MailJobAction.php:100 #: classes/Gems/Default/ProjectSurveysAction.php:67 -#: classes/Gems/Default/SummaryAction.php:168 +#: classes/Gems/Default/SummaryAction.php:110 #: classes/Gems/Default/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 @@ -2627,7 +2627,7 @@ msgid "You are not allowed to change this password." msgstr "U mag dit wachtwoord niet wijzigen." -#: classes/Gems/Default/SummaryAction.php:167 +#: classes/Gems/Default/SummaryAction.php:109 #: classes/Gems/Email/OneMailForm.php:55 #: classes/Gems/Export/RespondentExport.php:157 #: classes/Gems/Menu/MenuAbstract.php:500 @@ -2635,14 +2635,14 @@ msgid "Round" msgstr "Ronde" -#: classes/Gems/Default/SummaryAction.php:169 +#: classes/Gems/Default/SummaryAction.php:111 #: classes/Gems/Default/TokenPlanAction.php:292 #: classes/Gems/Selector/TokenByGroupDateSelector.php:139 -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:149 +#: classes/Gems/Util/TokenData.php:67 msgid "Answered" msgstr "Beantwoord" -#: classes/Gems/Default/SummaryAction.php:170 +#: classes/Gems/Default/SummaryAction.php:112 #: classes/Gems/Default/TokenPlanAction.php:293 #: classes/Gems/Selector/TokenByGroupDateSelector.php:129 #: classes/Gems/Tracker/Token.php:1038 @@ -2650,25 +2650,25 @@ msgid "Missed" msgstr "Gemist" -#: classes/Gems/Default/SummaryAction.php:171 +#: classes/Gems/Default/SummaryAction.php:113 #: classes/Gems/Default/TokenPlanAction.php:287 #: classes/Gems/Tracker/Token.php:1044 msgid "Open" msgstr "Open" -#: classes/Gems/Default/SummaryAction.php:172 +#: classes/Gems/Default/SummaryAction.php:114 msgid "Total" msgstr "Totaal" -#: classes/Gems/Default/SummaryAction.php:180 +#: classes/Gems/Default/SummaryAction.php:122 msgid "Filler" msgstr "Invuller" -#: classes/Gems/Default/SummaryAction.php:205 +#: classes/Gems/Default/SummaryAction.php:147 msgid "Summary" msgstr "Samenvatting" -#: classes/Gems/Default/SummaryAction.php:216 +#: classes/Gems/Default/SummaryAction.php:228 #: classes/Gems/Default/TokenPlanAction.php:463 #: classes/Gems/Default/TrackAction.php:450 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 @@ -3935,6 +3935,10 @@ msgid "Unknown respondent %s" msgstr "Onbekende patiënt %s" +#: classes/Gems/Snippets/Tracker/TokenStatusLegenda.php:72 +msgid "Legend" +msgstr "Legenda" + #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:62 #: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:62 msgid "(select a track)" @@ -3952,26 +3956,6 @@ msgid "Track end" msgstr "Traject einde" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:151 -msgid "Missed deadline" -msgstr "Deadline gemist" - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:153 -msgid "Open - can be answered now" -msgstr "Open - kan nu ingevuld worden." - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:155 -msgid "Valid from date unknown" -msgstr "Geldig vanaf datum nog onbekend" - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:157 -msgid "Valid from date in the future" -msgstr "Geldig vanaf een toekomstige datum" - -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:159 -msgid "Token does not exist" -msgstr "Kenmerk bestaat niet" - #: classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php:126 #, php-format msgid "%d%%" @@ -4745,6 +4729,26 @@ msgid "Stop (per respondent or track only)" msgstr "Stop (alleen per patiënt of traject)" +#: classes/Gems/Util/TokenData.php:64 +msgid "Valid from date unknown" +msgstr "Geldig vanaf datum nog onbekend" + +#: classes/Gems/Util/TokenData.php:65 +msgid "Valid from date in the future" +msgstr "Geldig vanaf een toekomstige datum" + +#: classes/Gems/Util/TokenData.php:66 +msgid "Open - can be answered now" +msgstr "Open - kan nu ingevuld worden." + +#: classes/Gems/Util/TokenData.php:68 +msgid "Missed deadline" +msgstr "Deadline gemist" + +#: classes/Gems/Util/TokenData.php:69 +msgid "Token does not exist" +msgstr "Kenmerk bestaat niet" + #: classes/Gems/Util/TrackData.php:147 msgid "Inactive" msgstr "Inactief" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-21 14:29:36
|
Revision: 1117 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1117&view=rev Author: matijsdejong Date: 2013-01-21 14:29:29 +0000 (Mon, 21 Jan 2013) Log Message: ----------- Making sure the whole compliance token cell is clickable Modified Paths: -------------- trunk/library/classes/Gems/Default/ComplianceAction.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php Modified: trunk/library/classes/Gems/Default/ComplianceAction.php =================================================================== --- trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-21 13:55:56 UTC (rev 1116) +++ trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-21 14:29:29 UTC (rev 1117) @@ -136,8 +136,7 @@ $select = $this->db->select(); $select->from('gems__tokens', array( 'gto_id_respondent_track', 'gto_id_round', 'gto_id_token', 'status' => $status, - )) - ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) + ))->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) // ->where('grc_success = 1') ->where('gto_id_track = ?', $filter['gr2t_id_track']) ->order('grc_success') Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-21 13:55:56 UTC (rev 1116) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-21 14:29:29 UTC (rev 1117) @@ -102,23 +102,33 @@ ); $token = 'tok_' . substr($name, 5); + $href = new MUtil_Html_HrefArrayAttribute(array( + $this->request->getControllerKey() => 'track', // This code is only used for tracks :) + $this->request->getActionKey() => 'show', + MUtil_Model::REQUEST_ID => $bridge->$token, + )); + $href->setRouteReset(); + + $onclick = new MUtil_Html_OnClickArrayAttribute(); + $onclick->addUrl($href) + ->addCancelBubble(); + $tds = $bridge->addColumn( array( MUtil_Html_AElement::iflink( $bridge->$token, array( - 'href' => array( - 'controller' => 'track', // This code is only used for tracks :) - 'action' => 'show', - MUtil_Model::REQUEST_ID => $bridge->$token, - ), + $href, 'onclick' => 'event.cancelBubble = true;', 'title' => $title, $bridge->$name, ), - $bridge->$name), - 'class' => array('round', MUtil_Lazy::method($tUtil, 'getStatusClass', $bridge->$name)), - 'title' => $title, + $bridge->$name + ), + 'class' => array('round', MUtil_Lazy::method($tUtil, 'getStatusClass', $bridge->$name)), + 'title' => $title, + // onclick is needed because the link does not fill the whole cell + 'onclick' => MUtil_Lazy::iff($bridge->$token, $onclick), ), array($label, 'title' => $model->get($name, 'description'), 'class' => 'round') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-21 13:56:03
|
Revision: 1116 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1116&view=rev Author: matijsdejong Date: 2013-01-21 13:55:56 +0000 (Mon, 21 Jan 2013) Log Message: ----------- Added icon & display for status of future tokens Compliance token status links also are transparent 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/nav_flat_blue.png Modified: trunk/new_project/htdocs/gems/css/gems-new.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems-new.css 2013-01-21 13:54:40 UTC (rev 1115) +++ trunk/new_project/htdocs/gems/css/gems-new.css 2013-01-21 13:55:56 UTC (rev 1116) @@ -157,7 +157,7 @@ background: transparent url(../icons/nav_up_blue.png) no-repeat center center; } -.compliance td.round { +.compliance td.round, .compliance td.round a { color: transparent; } @@ -170,7 +170,7 @@ } .compliance td.unknown { - background-color: transparent; + background: transparent url(../icons/nav_flat_blue.png) no-repeat center center; } .compliance td.waiting { Modified: trunk/new_project/htdocs/gems/css/gems.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems.css 2013-01-21 13:54:40 UTC (rev 1115) +++ trunk/new_project/htdocs/gems/css/gems.css 2013-01-21 13:55:56 UTC (rev 1116) @@ -106,7 +106,7 @@ background: transparent url(../icons/nav_up_blue.png) no-repeat center center; } -.compliance td.round { +.compliance td.round, .compliance td.round a { color: transparent; } @@ -119,7 +119,7 @@ } .compliance td.unknown { - background-color: transparent; + background: transparent url(../icons/nav_flat_blue.png) no-repeat center center; } .compliance td.waiting { Added: trunk/new_project/htdocs/gems/icons/nav_flat_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/nav_flat_blue.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...> - 2013-01-21 13:54:47
|
Revision: 1115 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1115&view=rev Author: matijsdejong Date: 2013-01-21 13:54:40 +0000 (Mon, 21 Jan 2013) Log Message: ----------- Some comment editing Modified Paths: -------------- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-21 13:53:54 UTC (rev 1114) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-21 13:54:40 UTC (rev 1115) @@ -96,7 +96,6 @@ } if ($model->get($name, 'noSort')) { - // http://localhost/pulse/track/show/id/afw8-o725 $title = array( MUtil_Lazy::method($tUtil, 'getStatusDescription', $bridge->$name), "\n" . $model->get($name, 'description') @@ -109,7 +108,7 @@ $bridge->$token, array( 'href' => array( - 'controller' => 'track', + 'controller' => 'track', // This code is only used for tracks :) 'action' => 'show', MUtil_Model::REQUEST_ID => $bridge->$token, ), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-21 13:54:02
|
Revision: 1114 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1114&view=rev Author: matijsdejong Date: 2013-01-21 13:53:54 +0000 (Mon, 21 Jan 2013) Log Message: ----------- Extended ComplianceAction.php with link for each (existing) token CrossTabTransformer.php can now crosstab over multiple values Added Legenda to Compliance overview Moved status code to new Util/TokenData.php Modified Paths: -------------- trunk/library/classes/Gems/Default/ComplianceAction.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php trunk/library/classes/Gems/Util.php trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php Added Paths: ----------- trunk/library/classes/Gems/Snippets/Tracker/TokenStatusLegenda.php trunk/library/classes/Gems/Util/TokenData.php Modified: trunk/library/classes/Gems/Default/ComplianceAction.php =================================================================== --- trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-18 17:28:15 UTC (rev 1113) +++ trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-21 13:53:54 UTC (rev 1114) @@ -61,6 +61,13 @@ protected $indexStartSnippets = array('Generic_ContentTitleSnippet', 'Tracker_Compliance_ComplianceSearchFormSnippet'); /** + * The snippets used for the index action, after those in autofilter + * + * @var mixed String or array of snippets name + */ + protected $indexStopSnippets = array('Tracker_TokenStatusLegenda', 'Generic_CurrentButtonRowSnippet'); + + /** * Creates a model for getModel(). Called only for each new $action. * * The parameters allow you to easily adapt the model to the current action. The $detailed @@ -117,6 +124,7 @@ $status = new Zend_Db_Expr(" CASE + WHEN grc_success = 0 THEN 'D' WHEN gto_completion_time IS NOT NULL THEN 'A' WHEN gto_valid_from IS NULL THEN 'U' WHEN gto_valid_from > CURRENT_TIMESTAMP THEN 'W' @@ -126,10 +134,13 @@ "); $select = $this->db->select(); - $select->from('gems__tokens', array('gto_id_respondent_track', 'gto_id_round', 'status' => $status)) + $select->from('gems__tokens', array( + 'gto_id_respondent_track', 'gto_id_round', 'gto_id_token', 'status' => $status, + )) ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) - ->where('grc_success = 1') + // ->where('grc_success = 1') ->where('gto_id_track = ?', $filter['gr2t_id_track']) + ->order('grc_success') ->order('gto_id_respondent_track') ->order('gto_round_order'); @@ -138,15 +149,17 @@ $newModel->setKeys(array('gto_id_respondent_track')); $transformer = new MUtil_Model_Transform_CrossTabTransformer(); - $transformer->setCrosstabFields('gto_id_round', 'status'); + $transformer->addCrosstabField('gto_id_round', 'status', 'stat_') + ->addCrosstabField('gto_id_round', 'gto_id_token', 'tok_'); foreach ($data as $row) { - $name = 'col_' . $row['gro_id_round']; + $name = 'stat_' . $row['gro_id_round']; $transformer->set($name, 'label', MUtil_Lazy::call('substr', $row['gsu_survey_name'], 0, 2), 'description', sprintf("%s\n[%s]", $row['gsu_survey_name'], $row['gro_round_description']), 'noSort', true, 'round', $row['gro_round_description'] ); + $transformer->set('tok_' . $row['gro_id_round']); } $newModel->addTransformer($transformer); Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-18 17:28:15 UTC (rev 1113) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-21 13:53:54 UTC (rev 1114) @@ -47,6 +47,12 @@ class Gems_Snippets_Tracker_Compliance_ComplianceTableSnippet extends Gems_Snippets_ModelTableSnippetGeneric { /** + * + * @var Gems_Util + */ + protected $util; + + /** * Adds columns from the model to the bridge that creates the browse table. * * Overrule this function to add different columns to the browse table, without @@ -58,6 +64,7 @@ */ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { + $tUtil = $this->util->getTokenData(); $table = $bridge->getTable(); $table->appendAttrib('class', 'compliance'); @@ -89,14 +96,30 @@ } if ($model->get($name, 'noSort')) { - $tds = $bridge->addColumn( + // http://localhost/pulse/track/show/id/afw8-o725 + $title = array( + MUtil_Lazy::method($tUtil, 'getStatusDescription', $bridge->$name), + "\n" . $model->get($name, 'description') + ); + $token = 'tok_' . substr($name, 5); + + $tds = $bridge->addColumn( array( - $bridge->$name, - 'class' => array('round', MUtil_Lazy::method($this, 'getClassFor', $bridge->$name)), - 'title' => array( - MUtil_Lazy::method($this, 'getDescriptionFor', $bridge->$name), - "\n" . $model->get($name, 'description') - ), + MUtil_Html_AElement::iflink( + $bridge->$token, + array( + 'href' => array( + 'controller' => 'track', + 'action' => 'show', + MUtil_Model::REQUEST_ID => $bridge->$token, + ), + 'onclick' => 'event.cancelBubble = true;', + 'title' => $title, + $bridge->$name, + ), + $bridge->$name), + 'class' => array('round', MUtil_Lazy::method($tUtil, 'getStatusClass', $bridge->$name)), + 'title' => $title, ), array($label, 'title' => $model->get($name, 'description'), 'class' => 'round') ); @@ -113,54 +136,6 @@ } /** - * Returns the class to display the answer - * - * @param string $value Character - * @return string - */ - public function getClassFor($value) - { - switch ($value) { - case 'A': - return 'answered'; - case 'M': - return 'missed'; - case 'O': - return 'open'; - case 'U': - return 'unknown'; - case 'W': - return 'waiting'; - default: - return 'empty'; - } - } - - /** - * Returns the decription to add to the answer - * - * @param string $value Character - * @return string - */ - public function getDescriptionFor($value) - { - switch ($value) { - case 'A': - return $this->_('Answered'); - case 'M': - return $this->_('Missed deadline'); - case 'O': - return $this->_('Open - can be answered now'); - case 'U': - return $this->_('Valid from date unknown'); - case 'W': - return $this->_('Valid from date in the future'); - default: - return $this->_('Token does not exist'); - } - } - - /** * Returns a show menu item, if access is allowed by privileges * * @return Gems_Menu_SubMenuItem Added: trunk/library/classes/Gems/Snippets/Tracker/TokenStatusLegenda.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/TokenStatusLegenda.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/TokenStatusLegenda.php 2013-01-21 13:53:54 UTC (rev 1114) @@ -0,0 +1,81 @@ +<?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: TokenStatusLegenda.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Snippets_Tracker_TokenStatusLegenda extends MUtil_Snippets_SnippetAbstract +{ + /** + * + * @var Gems_Util + */ + protected $util; + + /** + * Create the snippets content + * + * This is a stub function either override getHtmlOutput() or override render() + * + * @param Zend_View_Abstract $view Just in case it is needed here + * @return MUtil_Html_HtmlInterface Something that can be rendered + */ + public function getHtmlOutput(Zend_View_Abstract $view) + { + $tUtil = $this->util->getTokenData(); + + $repeater = new MUtil_Lazy_RepeatableByKeyValue($tUtil->getEveryStatus()); + $table = new MUtil_Html_TableElement(); + $table->class = 'compliance timeTable rightFloat'; + $table->setRepeater($repeater); + + $table->throw($this->_('Legend')); + $table->td($repeater->key)->class = array( + 'round', + MUtil_Lazy::method($tUtil, 'getStatusClass', $repeater->key) + ); + $table->td($repeater->value); + + return $table; + } +} Added: trunk/library/classes/Gems/Util/TokenData.php =================================================================== --- trunk/library/classes/Gems/Util/TokenData.php (rev 0) +++ trunk/library/classes/Gems/Util/TokenData.php 2013-01-21 13:53:54 UTC (rev 1114) @@ -0,0 +1,115 @@ +<?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 Util + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: TokenData.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * Class that bundles information on tokens + * + * @package Gems + * @subpackage Util + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class Gems_Util_TokenData extends MUtil_Translate_TranslateableAbstract +{ + /** + * Returns a status code => decription array + * + * @static $status array + * @return array + */ + public function getEveryStatus() + { + static $status; + + if ($status) { + return $status; + } + + $status = array( + 'U' => $this->_('Valid from date unknown'), + 'W' => $this->_('Valid from date in the future'), + 'O' => $this->_('Open - can be answered now'), + 'A' => $this->_('Answered'), + 'M' => $this->_('Missed deadline'), + 'D' => $this->_('Token does not exist'), + ); + + return $status; + } + + /** + * Returns the class to display the answer + * + * @param string $value Character + * @return string + */ + public function getStatusClass($value) + { + switch ($value) { + case 'A': + return 'answered'; + case 'M': + return 'missed'; + case 'O': + return 'open'; + case 'U': + return 'unknown'; + case 'W': + return 'waiting'; + default: + return 'empty'; + } + } + + /** + * Returns the decription to add to the answer + * + * @param string $value Character + * @return string + */ + public function getStatusDescription($value) + { + $status = $this->getEveryStatus(); + + if (isset($status[$value])) { + return $status[$value]; + } + + return $status['D']; + } +} Modified: trunk/library/classes/Gems/Util.php =================================================================== --- trunk/library/classes/Gems/Util.php 2013-01-18 17:28:15 UTC (rev 1113) +++ trunk/library/classes/Gems/Util.php 2013-01-21 13:53:54 UTC (rev 1114) @@ -91,6 +91,12 @@ /** * + * @var Gems_Util_TokenData + */ + protected $tokenData; + + /** + * * @var Gems_Util_TrackData */ protected $trackData; @@ -275,6 +281,15 @@ /** * + * @return Gems_Util_TokenData + */ + public function getTokenData() + { + return $this->_getClass('tokenData'); + } + + /** + * * @return Gems_Util_TrackData */ public function getTrackData() Modified: trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-01-18 17:28:15 UTC (rev 1113) +++ trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-01-21 13:53:54 UTC (rev 1114) @@ -126,24 +126,28 @@ $args = func_get_args(); $args = MUtil_Ra::pairs($args, 1); - foreach ($args as $key => $value) { - // If $key end with ] it is array value - if (substr($key, -1) == ']') { - if (substr($key, -2) == '[]') { - // If $key ends with [], append it to array - $key = substr($key, 0, -2); - $this->_fields[$name][$key][] = $value; + if ($args) { + foreach ($args as $key => $value) { + // If $key end with ] it is array value + if (substr($key, -1) == ']') { + if (substr($key, -2) == '[]') { + // If $key ends with [], append it to array + $key = substr($key, 0, -2); + $this->_fields[$name][$key][] = $value; + } else { + // Otherwise extract subkey + $pos = strpos($key, '['); + $subkey = substr($key, $pos + 1, -1); + $key = substr($key, 0, $pos); + + $this->_fields[$name][$key][$subkey] = $value; + } } else { - // Otherwise extract subkey - $pos = strpos($key, '['); - $subkey = substr($key, $pos + 1, -1); - $key = substr($key, 0, $pos); - - $this->_fields[$name][$key][$subkey] = $value; + $this->_fields[$name][$key] = $value; } - } else { - $this->_fields[$name][$key] = $value; } + } elseif (!array_key_exists($name, $this->_fields)) { + $this->_fields[$name] = array(); } return $this; Modified: trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php =================================================================== --- trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php 2013-01-18 17:28:15 UTC (rev 1113) +++ trunk/library/classes/MUtil/Model/Transform/CrossTabTransformer.php 2013-01-21 13:53:54 UTC (rev 1114) @@ -47,29 +47,47 @@ class MUtil_Model_Transform_CrossTabTransformer extends MUtil_Model_ModelTransformerAbstract { /** - * The field to crosstab over + * The fields to crosstab over * - * @var string + * @var array Nested array: index => array('id' => idField, 'val' => valueField, 'pre' => prefix) */ - protected $idField; + protected $crossTabs; /** + * The fields to exclude from the crosstab result * - * @var string + * Calculated by setCrosstabFields + * + * @var array idField => idField */ - protected $valueField; + protected $excludes; /** + * Set the idField / crossTab output fields for the transformer. * - * @param string $idField The field values to perform the crosstab over + * You can define multiple crossTabs over the same id value. + * + * @param string $idField The field values to perform the crosstab over * @param string $valueField The field values to crosstab + * @param string $prefix Optional prefix to add before the $idField value as the identifier + * for the output field, otherwise * @return MUtil_Model_Transform_CrossTabTransformer (continuation pattern) */ - public function setCrosstabFields($idField, $valueField) + public function addCrosstabField($idField, $valueField, $prefix = null) { - $this->idField = $idField; - $this->valueField = $valueField; + if (null === $prefix) { + $prefix = $valueField . '_'; + } + $this->crossTabs[] = array( + 'id' => $idField, + 'val' => $valueField, + 'pre' => $prefix, + ); + + $this->excludes[$idField] = $idField; + $this->excludes[$valueField] = $valueField; + return $this; } @@ -90,33 +108,33 @@ //* $row = reset($data); - if (! ($this->idField && - $this->valueField && - isset($row[$this->idField]) && - array_key_exists($this->valueField, $row) - )) { + if (! ($this->crossTabs)) { return $data; } $keys = $model->getKeys(); $keys = array_combine($keys, $keys); - $default = array_fill_keys(array_keys($this->_fields), null); - $except = array($this->idField => 1, $this->valueField => 1); + $default = array_fill_keys(array_keys(array_diff_key($this->_fields, $this->excludes)), null); $results = array(); + // MUtil_Echo::track($default); + foreach ($data as $row) { - $name = 'col_' . $row[$this->idField]; + foreach ($this->crossTabs as $crossTab) { + $name = $crossTab['pre'] . $row[$crossTab['id']]; - if (isset($this->_fields[$name])) { $key = implode("\t", array_intersect_key($row, $keys)); if (! isset($results[$key])) { - $results[$key] = array_diff_key($row, $except) + $default; + $results[$key] = array_diff_key($row, $this->excludes) + $default; } - $results[$key][$name] = $row[$this->valueField]; + + $results[$key][$name] = $row[$crossTab['val']]; } } - // MUtil_Echo::track($results, $data); + if (MUtil_Model::$verbose) { + MUtil_Echo::r($results, 'Transform output'); + } return $results; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-18 17:28:23
|
Revision: 1113 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1113&view=rev Author: matijsdejong Date: 2013-01-18 17:28:15 +0000 (Fri, 18 Jan 2013) Log Message: ----------- Adapted css core files for Compliance overview Added lots of icons for use in compliance and for choosing them for surveys 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/alarm.png trunk/new_project/htdocs/gems/icons/arrow2_down_red.png trunk/new_project/htdocs/gems/icons/bottle_of_pills.png trunk/new_project/htdocs/gems/icons/delete.png trunk/new_project/htdocs/gems/icons/empty.png trunk/new_project/htdocs/gems/icons/first_aid.png trunk/new_project/htdocs/gems/icons/forbidden.png trunk/new_project/htdocs/gems/icons/garbage.png trunk/new_project/htdocs/gems/icons/hourglass.png trunk/new_project/htdocs/gems/icons/hourglass_pause.png trunk/new_project/htdocs/gems/icons/injection.png trunk/new_project/htdocs/gems/icons/nav_circle_blue.png trunk/new_project/htdocs/gems/icons/nav_circle_yellow.png trunk/new_project/htdocs/gems/icons/nav_down_red.png trunk/new_project/htdocs/gems/icons/nav_plain_blue.png trunk/new_project/htdocs/gems/icons/nav_plain_red.png trunk/new_project/htdocs/gems/icons/nav_up_blue.png trunk/new_project/htdocs/gems/icons/no_entry.png trunk/new_project/htdocs/gems/icons/ok.png trunk/new_project/htdocs/gems/icons/pill_blue.png trunk/new_project/htdocs/gems/icons/pylon.png trunk/new_project/htdocs/gems/icons/scalpel.png trunk/new_project/htdocs/gems/icons/selection_delete.png trunk/new_project/htdocs/gems/icons/sign_warning.png trunk/new_project/htdocs/gems/icons/sign_warning_biohazard.png trunk/new_project/htdocs/gems/icons/sign_warning_harmful.png trunk/new_project/htdocs/gems/icons/signpost3.png trunk/new_project/htdocs/gems/icons/stop.png trunk/new_project/htdocs/gems/icons/target.png trunk/new_project/htdocs/gems/icons/thermometer.png trunk/new_project/htdocs/gems/icons/unknown.png trunk/new_project/htdocs/gems/icons/view.png trunk/new_project/htdocs/gems/icons/yield.png Modified: trunk/new_project/htdocs/gems/css/gems-new.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems-new.css 2013-01-18 17:26:18 UTC (rev 1112) +++ trunk/new_project/htdocs/gems/css/gems-new.css 2013-01-18 17:28:15 UTC (rev 1113) @@ -132,6 +132,55 @@ text-align: center; } +.compliance .rounds { + overflow: hidden; + white-space: pre; +} + +.compliance .rounds th { + border-top: transparent none; +} + +.compliance td.answered { + background: transparent url(../icons/ok.png) no-repeat center center; +} + +.compliance td.missed { + background: transparent url(../icons/nav_plain_red.png) no-repeat center center; +} + +.compliance td.newRound, .compliance th.newRound { + border-left-width: 3px; +} + +.compliance td.open { + background: transparent url(../icons/nav_up_blue.png) no-repeat center center; +} + +.compliance td.round { + color: transparent; +} + +.compliance td.round, .compliance th.round { + min-width: 14px; + max-width: 14px; + overflow: hidden; + text-align: center; + width: 14px; +} + +.compliance td.unknown { + background-color: transparent; +} + +.compliance td.waiting { + background: transparent url(../icons/nav_plain_blue.png) no-repeat center center; +} + +.compliance td.empty { + background: transparent url(../icons/empty.png) no-repeat center center; +} + .currentRow { background-color: aqua; border: 3px solid darkblue !important; Modified: trunk/new_project/htdocs/gems/css/gems.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems.css 2013-01-18 17:26:18 UTC (rev 1112) +++ trunk/new_project/htdocs/gems/css/gems.css 2013-01-18 17:28:15 UTC (rev 1113) @@ -91,13 +91,11 @@ } .compliance td.answered { - background-color: green; - color: green; + background: transparent url(../icons/ok.png) no-repeat center center; } .compliance td.missed { - background-color: red; - color: red; + background: transparent url(../icons/nav_plain_red.png) no-repeat center center; } .compliance td.newRound, .compliance th.newRound { @@ -105,29 +103,31 @@ } .compliance td.open { - background-color: yellow; - color: yellow; + background: transparent url(../icons/nav_up_blue.png) no-repeat center center; } +.compliance td.round { + color: transparent; +} + .compliance td.round, .compliance th.round { min-width: 14px; max-width: 14px; overflow: hidden; + text-align: center; + width: 14px; } .compliance td.unknown { - background-color: white; - color: white; + background-color: transparent; } .compliance td.waiting { - background-color: lightblue; - color: lightblue; + background: transparent url(../icons/nav_plain_blue.png) no-repeat center center; } .compliance td.empty { - background-color: white; - color: white; + background: transparent url(../icons/empty.png) no-repeat center center; } .currentRow { Added: trunk/new_project/htdocs/gems/icons/alarm.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/alarm.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/arrow2_down_red.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/arrow2_down_red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/bottle_of_pills.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/bottle_of_pills.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/delete.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/delete.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/empty.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/empty.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/first_aid.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/first_aid.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/forbidden.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/forbidden.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/garbage.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/garbage.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/hourglass.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/hourglass.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/hourglass_pause.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/hourglass_pause.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/injection.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/injection.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/nav_circle_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/nav_circle_blue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/nav_circle_yellow.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/nav_circle_yellow.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/nav_down_red.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/nav_down_red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/nav_plain_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/nav_plain_blue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/nav_plain_red.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/nav_plain_red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/nav_up_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/nav_up_blue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/no_entry.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/no_entry.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/ok.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/ok.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/pill_blue.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/pill_blue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/pylon.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/pylon.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/scalpel.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/scalpel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/selection_delete.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/selection_delete.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/sign_warning.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/sign_warning.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/sign_warning_biohazard.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/sign_warning_biohazard.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/sign_warning_harmful.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/sign_warning_harmful.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/signpost3.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/signpost3.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/stop.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/stop.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/target.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/target.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/thermometer.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/thermometer.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/unknown.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/unknown.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/view.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/view.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/new_project/htdocs/gems/icons/yield.png =================================================================== (Binary files differ) Property changes on: trunk/new_project/htdocs/gems/icons/yield.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...> - 2013-01-18 17:26:29
|
Revision: 1112 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1112&view=rev Author: matijsdejong Date: 2013-01-18 17:26:18 +0000 (Fri, 18 Jan 2013) Log Message: ----------- TokenPlanAction and it's sub classes use the new date period selection mechanism TokenPlanAction and it's sub classes have the new status selections 'Open' and 'Removed' ComplianceAction.php and SummaryAction.php are finished unless Harm wants more Updated translations Modified Paths: -------------- trunk/library/classes/Gems/Default/ComplianceAction.php trunk/library/classes/Gems/Default/RespondentPlanAction.php trunk/library/classes/Gems/Default/SummaryAction.php trunk/library/classes/Gems/Default/TokenPlanAction.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/ComplianceAction.php =================================================================== --- trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-18 17:26:18 UTC (rev 1112) @@ -88,7 +88,6 @@ $model->set('gr2t_end_date', 'label', $this->_('End date'), 'dateFormat', 'dd-MM-yyyy'); $filter = $this->util->getRequestCache('index')->getProgramParams(); - MUtil_Echo::track($filter); if (! (isset($filter['gr2t_id_track']) && $filter['gr2t_id_track'])) { $model->setFilter(array('1=0')); $this->autofilterParameters['onEmpty'] = $this->_('No track selected...'); Modified: trunk/library/classes/Gems/Default/RespondentPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentPlanAction.php 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/classes/Gems/Default/RespondentPlanAction.php 2013-01-18 17:26:18 UTC (rev 1112) @@ -100,14 +100,14 @@ $td->renderWithoutContent = false; // Do not display this cell and thus this row if there is not content } - $bridge->tr(array('class' => 'odd')); + $bridge->tr(array('class' => array('odd', $bridge->row_class))); $bridge->addColumn($this->getTokenLinks($bridge))->class = 'rightAlign'; $bridge->addSortable('gto_valid_from'); $bridge->addSortable('gto_valid_until'); $model->set('calc_round_description', 'tableDisplay', 'smallData'); $bridge->addMultiSort('gsu_survey_name', 'calc_round_description')->colspan = 2; - $bridge->tr(array('class' => 'odd')); + $bridge->tr(array('class' => array('odd', $bridge->row_class))); $bridge->addColumn(); $bridge->addSortable('gto_mail_sent_date'); $bridge->addSortable('gto_completion_time'); Modified: trunk/library/classes/Gems/Default/SummaryAction.php =================================================================== --- trunk/library/classes/Gems/Default/SummaryAction.php 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/classes/Gems/Default/SummaryAction.php 2013-01-18 17:26:18 UTC (rev 1112) @@ -94,6 +94,66 @@ */ public function createModel($detailed, $action) { + $select = $this->getSelect(); + + // MUtil_Model::$verbose = true; + $model = new MUtil_Model_SelectModel($select, 'summary'); + + // Make sure of filter and sort for these fields + $model->set('gro_id_order'); + $model->set('gsu_id_primary_group'); + $model->set('gto_id_track'); + $model->set('gto_id_organization'); + + $model->resetOrder(); + $model->set('gro_round_description', 'label', $this->_('Round')); + $model->set('gsu_survey_name', 'label', $this->_('Survey')); + $model->set('answered', 'label', $this->_('Answered'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + $model->set('missed', 'label', $this->_('Missed'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + $model->set('open', 'label', $this->_('Open'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + $model->set('total', 'label', $this->_('Total'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('future', 'label', $this->_('Future'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('unknown', 'label', $this->_('Unknown'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('is', 'label', ' ', 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('success', 'label', $this->_('Success'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('removed', 'label', $this->_('Removed'), 'tdClass', 'deleted centerAlign', + // 'thClass', 'centerAlign'); + + $model->set('gsu_id_primary_group', 'label', $this->_('Filler'), + 'multiOptions', $this->util->getDbLookup()->getGroups()); + + $data = $this->util->getRequestCache('index')->getProgramParams(); + if (isset($data['gto_id_track']) &&$data['gto_id_track']) { + // Add the period filter + if ($where = Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($data, $this->db)) { + $select->joinInner('gems__respondent2track', 'gto_id_respondent_track = gr2t_id_respondent_track', array()); + $model->addFilter(array($where)); + } + } else { + $model->setFilter(array('1=0')); + $this->autofilterParameters['onEmpty'] = $this->_('No track selected...'); + } + + return $model; + } + + /** + * Helper function to get the title for the index action. + * + * @return $string + */ + public function getIndexTitle() + { + return $this->_('Summary'); + } + + /** + * Select creation function, allowes overruling in child classes + * + * @return Zend_Db_Select + */ + public function getSelect() + { $select = $this->db->select(); $fields['answered'] = new Zend_Db_Expr("SUM( @@ -154,58 +214,10 @@ array('gsu_survey_name', 'gsu_id_primary_group')) ->group(array('gro_id_order', 'gro_round_description', 'gsu_survey_name', 'gsu_id_primary_group')); - // MUtil_Model::$verbose = true; - $model = new MUtil_Model_SelectModel($select, 'summary'); - - // Make sure of filter and sort for these fields - $model->set('gro_id_order'); - $model->set('gsu_id_primary_group'); - $model->set('gto_id_track'); - $model->set('gto_id_organization'); - - $model->resetOrder(); - $model->set('gro_round_description', 'label', $this->_('Round')); - $model->set('gsu_survey_name', 'label', $this->_('Survey')); - $model->set('answered', 'label', $this->_('Answered'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - $model->set('missed', 'label', $this->_('Missed'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - $model->set('open', 'label', $this->_('Open'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - $model->set('total', 'label', $this->_('Total'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - // $model->set('future', 'label', $this->_('Future'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - // $model->set('unknown', 'label', $this->_('Unknown'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - // $model->set('is', 'label', ' ', 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - // $model->set('success', 'label', $this->_('Success'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - // $model->set('removed', 'label', $this->_('Removed'), 'tdClass', 'deleted centerAlign', - // 'thClass', 'centerAlign'); - - $model->set('gsu_id_primary_group', 'label', $this->_('Filler'), - 'multiOptions', $this->util->getDbLookup()->getGroups()); - - $data = $this->util->getRequestCache('index')->getProgramParams(); - if (isset($data['gto_id_track'])) { - // Add the period filter - if ($where = Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($data, $this->db)) { - $select->joinInner('gems__respondent2track', 'gto_id_respondent_track = gr2t_id_respondent_track', array()); - $model->addFilter(array($where)); - } - } else { - $model->setFilter(array('1=0')); - $this->autofilterParameters['onEmpty'] = $this->_('No track selected...'); - } - - return $model; + return $select; } /** - * Helper function to get the title for the index action. - * - * @return $string - */ - public function getIndexTitle() - { - return $this->_('Summary'); - } - - /** * Helper function to allow generalized statements about the items in the model. * * @param int $count Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/TokenPlanAction.php 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2013-01-18 17:26:18 UTC (rev 1112) @@ -45,13 +45,6 @@ */ class Gems_Default_TokenPlanAction extends Gems_Controller_BrowseEditAction { - public $defaultPeriodEnd = 2; - public $defaultPeriodStart = -4; - public $defaultPeriodType = 'W'; - - public $maxPeriod = 15; - public $minPeriod = -15; - public $sortKey = array( 'gto_valid_from' => SORT_ASC, 'gto_mail_sent_date' => SORT_ASC, @@ -69,6 +62,8 @@ // Row with dates and patient data $bridge->gtr_track_type; // Data needed for buttons + + $bridge->tr()->appendAttrib('class', $bridge->row_class); $bridge->setDefaultRowClass(MUtil_Html_TableElement::createAlternateRowClass('even', 'even', 'odd', 'odd')); $bridge->addColumn($this->getTokenLinks($bridge), ' ')->rowspan = 2; // Space needed because TableElement does not look at rowspans @@ -224,55 +219,25 @@ $elements[] = null; // break into separate spans } - // Create date range elements - $min = $this->minPeriod; - $max = $this->maxPeriod; - $size = max(strlen($min), strlen($max)); - - $options = array( + $dates = array( 'gto_valid_from' => $this->_('Valid from'), 'gto_valid_until' => $this->_('Valid until'), 'gto_mail_sent_date' => $this->_('E-Mailed on'), 'gto_completion_time' => $this->_('Completion date'), ); - $element = $this->_createSelectElement('date_used', $options); - $element->class = 'minimal'; + + $element = $this->_createSelectElement('dateused', $dates); $element->setLabel($this->_('For date')); $elements[] = $element; - $element = new Zend_Form_Element_Text('period_start', array('label' => $this->_('from'), 'size' => $size - 1, 'maxlength' => $size, 'class' => 'rightAlign')); - $element->addValidator(new Zend_Validate_Int()); - $element->addValidator(new Zend_Validate_Between($min, $max)); - $elements[] = $element; + $options = array(); + $options['label'] = $this->_('from'); + MUtil_Model_FormBridge::applyFixedOptions('date', $options); + $elements[] = new Gems_JQuery_Form_Element_DatePicker('datefrom', $options); - $element = new Zend_Form_Element_Text('period_end', array('label' => $this->_('until'), 'size' => $size - 1, 'maxlength' => $size, 'class' => 'rightAlign')); - $element->addValidator(new Zend_Validate_Int()); - $element->addValidator(new Zend_Validate_Between($min, $max)); - $elements[] = $element; + $options['label'] = ' ' . $this->_('until'); + $elements[] = new Gems_JQuery_Form_Element_DatePicker('dateuntil', $options); - $options = array( - 'D' => $this->_('days'), - 'W' => $this->_('weeks'), - 'M' => $this->_('months'), - 'Y' => $this->_('years'), - ); - $element = $this->_createSelectElement('date_type', $options); - $element->class = 'minimal'; - $elements[] = $element; - - $joptions['change'] = new Zend_Json_Expr('function(e, ui) { -jQuery("#period_start").attr("value", ui.values[0]); -jQuery("#period_end" ).attr("value", ui.values[1]).trigger("keyup"); - -}'); - $joptions['min'] = $this->minPeriod; - $joptions['max'] = $this->maxPeriod; - $joptions['range'] = true; - $joptions['values'] = new Zend_Json_Expr('[jQuery("#period_start").attr("value"), jQuery("#period_end").attr("value")]'); - - $element = new ZendX_JQuery_Form_Element_Slider('period', array('class' => 'periodSlider', 'jQueryParams' => $joptions)); - $elements[] = $element; - $elements[] = null; // break into separate spans @@ -319,12 +284,14 @@ $options = array( 'all' => $this->_('(all actions)'), + 'open' => $this->_('Open'), 'notmailed' => $this->_('Not emailed'), 'tomail' => $this->_('To email'), 'toremind' => $this->_('Needs reminder'), 'toanswer' => $this->_('Yet to Answer'), 'answered' => $this->_('Answered'), 'missed' => $this->_('Missed'), + 'removed' => $this->_('Removed'), ); $elements[] = $this->_createSelectElement('main_filter', $options); @@ -368,6 +335,9 @@ //Add default filter $filter = array(); + if ($where = Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($data, $this->db)) { + $filter[] = $where; + } $filter['gto_id_organization'] = isset($data['gto_id_organization']) ? $data['gto_id_organization'] : $this->escort->getCurrentOrganization(); // Is overruled when set in param $filter['gtr_active'] = 1; $filter['gsu_active'] = 1; @@ -375,24 +345,26 @@ if (isset($data['main_filter'])) { switch ($data['main_filter']) { - case 'notmailed': - $filter['gto_mail_sent_date'] = null; - $filter[] = '(gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP)'; + case 'answered': + $filter[] = 'gto_completion_time IS NOT NULL'; + break; + + case 'missed': + $filter[] = 'gto_valid_from <= CURRENT_TIMESTAMP'; + $filter[] = 'gto_valid_until < CURRENT_TIMESTAMP'; $filter['gto_completion_time'] = null; break; - case 'tomail': - $filter[] = "grs_email IS NOT NULL AND grs_email != '' AND ggp_respondent_members = 1"; + case 'notmailed': $filter['gto_mail_sent_date'] = null; $filter[] = '(gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP)'; $filter['gto_completion_time'] = null; break; - case 'toremind': - // $filter['can_email'] = 1; - $filter[] = 'gto_mail_sent_date < CURRENT_TIMESTAMP'; - $filter[] = '(gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP)'; + case 'open': $filter['gto_completion_time'] = null; + $filter[] = 'gto_valid_from <= CURRENT_TIMESTAMP'; + $filter[] = '(gto_valid_until >= CURRENT_TIMESTAMP OR gto_valid_until IS NULL)'; break; // case 'other': @@ -401,20 +373,28 @@ // $filter[] = '(gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP)'; // break; - case 'missed': - $filter[] = 'gto_valid_from <= CURRENT_TIMESTAMP'; - $filter[] = 'gto_valid_until < CURRENT_TIMESTAMP'; - $filter['gto_completion_time'] = null; + case 'removed': + $filter['grc_success'] = 0; break; - case 'answered': - $filter[] = 'gto_completion_time IS NOT NULL'; - break; - case 'toanswer': $filter[] = 'gto_completion_time IS NULL'; break; + case 'tomail': + $filter[] = "grs_email IS NOT NULL AND grs_email != '' AND ggp_respondent_members = 1"; + $filter['gto_mail_sent_date'] = null; + $filter[] = '(gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP)'; + $filter['gto_completion_time'] = null; + break; + + case 'toremind': + // $filter['can_email'] = 1; + $filter[] = 'gto_mail_sent_date < CURRENT_TIMESTAMP'; + $filter[] = '(gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP)'; + $filter['gto_completion_time'] = null; + break; + default: break; @@ -454,12 +434,15 @@ public function getDefaultSearchData() { + $options = array(); + MUtil_Model_FormBridge::applyFixedOptions('date', $options); + $inFormat = isset($options['dateFormat']) ? $options['dateFormat'] : null; + $now = new MUtil_Date(); + return array( - 'date_used' => 'gto_valid_from', - 'date_type' => $this->defaultPeriodType, + 'datefrom' => $now->toString($inFormat), + 'dateused' => 'gto_valid_from', 'gto_id_organization' => $this->escort->getCurrentOrganization(), - 'period_start' => $this->defaultPeriodStart, - 'period_end' => $this->defaultPeriodEnd, 'main_filter' => 'all', ); } Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-18 17:26:18 UTC (rev 1112) @@ -58,7 +58,7 @@ protected function getAutoSearchElements(array $data) { $elements[] = $this->_createSelectElement('gr2t_id_track', - $this->util->getTrackData()->getAllTracks(), + $this->util->getTrackData()->getSteppedTracks(), $this->_('(select a track)')); $elements[] = $this->_createSelectElement('gr2t_id_organization', Modified: trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php 2013-01-18 17:26:18 UTC (rev 1112) @@ -58,7 +58,7 @@ protected function getAutoSearchElements(array $data) { $elements[] = $this->_createSelectElement('gto_id_track', - $this->util->getTrackData()->getAllTracks(), + $this->util->getTrackData()->getSteppedTracks(), $this->_('(select a track)')); $elements[] = $this->_createSelectElement('gto_id_organization', Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/languages/default-en.po 2013-01-18 17:26:18 UTC (rev 1112) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-16 19:26+0100\n" +"POT-Creation-Date: 2013-01-18 17:59+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -329,15 +329,15 @@ #: classes/Gems/Menu.php:323 classes/Gems/Menu.php:423 #: classes/Gems/Email/EmailFormAbstract.php:280 #: classes/Gems/Email/EmailFormAbstract.php:291 -#: classes/Gems/Menu/MenuAbstract.php:383 -#: classes/Gems/Menu/MenuAbstract.php:396 +#: classes/Gems/Menu/MenuAbstract.php:386 +#: classes/Gems/Menu/MenuAbstract.php:399 msgid "Preview" msgstr "Preview" #: classes/Gems/Menu.php:332 classes/Gems/Default/ExportAction.php:149 #: classes/Gems/Default/TrackMaintenanceAction.php:336 -#: classes/Gems/Menu/MenuAbstract.php:392 -#: classes/Gems/Menu/MenuAbstract.php:474 snippets/AddTracksSnippet.php:238 +#: classes/Gems/Menu/MenuAbstract.php:395 +#: classes/Gems/Menu/MenuAbstract.php:477 snippets/AddTracksSnippet.php:238 msgid "Tracks" msgstr "Tracks" @@ -355,8 +355,8 @@ #: classes/Gems/Menu.php:377 #: classes/Gems/Default/SurveyMaintenanceAction.php:586 -#: classes/Gems/Menu/MenuAbstract.php:399 -#: classes/Gems/Menu/MenuAbstract.php:461 +#: classes/Gems/Menu/MenuAbstract.php:402 +#: classes/Gems/Menu/MenuAbstract.php:464 #: classes/Gems/Tracker/Model/TrackModel.php:100 msgid "Surveys" msgstr "Surveys" @@ -388,7 +388,7 @@ msgid "Overview" msgstr "Overview" -#: classes/Gems/Menu.php:593 classes/Gems/Menu/MenuAbstract.php:356 +#: classes/Gems/Menu.php:593 classes/Gems/Menu/MenuAbstract.php:359 msgid "Project" msgstr "Project" @@ -418,7 +418,7 @@ msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:84 +#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:86 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patient nr" @@ -476,7 +476,7 @@ #: classes/Gems/Default/SourceAction.php:195 #: classes/Gems/Default/StaffAction.php:328 #: classes/Gems/Default/SurveyMaintenanceAction.php:435 -#: classes/Gems/Default/TokenPlanAction.php:121 +#: classes/Gems/Default/TokenPlanAction.php:116 #: classes/Gems/Default/TrackFieldsAction.php:98 #: classes/Gems/Default/TrackMaintenanceAction.php:249 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:60 @@ -549,7 +549,7 @@ msgstr "Trying upgrade for %s to level %s: %s" #: classes/Gems/Controller/BrowseEditAction.php:357 -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:239 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:261 #: classes/Gems/Default/StaffAction.php:228 #: classes/Gems/Snippets/ModelFormSnippetAbstract.php:186 #, php-format @@ -557,7 +557,7 @@ msgstr "New %s..." #: classes/Gems/Controller/BrowseEditAction.php:390 -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:259 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:281 #: classes/Gems/Default/TrackFieldsAction.php:130 #: classes/Gems/Default/TrackRoundsAction.php:171 #, php-format @@ -580,19 +580,19 @@ msgstr "Edit %s %s" #: classes/Gems/Controller/BrowseEditAction.php:413 -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:269 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:291 #: classes/Gems/Snippets/ModelFormSnippetAbstract.php:188 #, php-format msgid "Edit %s" msgstr "Edit %s" #: classes/Gems/Controller/BrowseEditAction.php:516 -#: classes/Gems/Snippets/AutosearchFormSnippet.php:166 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:249 msgid "Free search text" msgstr "Free search text" #: classes/Gems/Controller/BrowseEditAction.php:587 -#: classes/Gems/Snippets/AutosearchFormSnippet.php:241 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:324 msgid "Search" msgstr "Search" @@ -709,26 +709,26 @@ msgid "Cancel" msgstr "Cancel" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:249 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:271 #, php-format msgid "Do you want to delete this %s?" msgstr "Do you want to delete this %s?" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:282 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:304 msgid "No data found." msgstr "No data found." -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:344 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:366 #, php-format msgid "No %s found..." msgstr "No %s found..." -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:354 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:376 #, php-format msgid "Showing %s" msgstr "Showing %s" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:390 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:412 #: classes/Gems/Default/OptionAction.php:181 #: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:341 msgid "item" @@ -808,19 +808,24 @@ msgid "The survey for token %s is no longer active." msgstr "The survey for token %s is no longer active." -#: classes/Gems/Default/ComplianceAction.php:85 +#: classes/Gems/Default/ComplianceAction.php:87 msgid "Start date" msgstr "Start date" -#: classes/Gems/Default/ComplianceAction.php:86 +#: classes/Gems/Default/ComplianceAction.php:88 msgid "End date" msgstr "End date" -#: classes/Gems/Default/ComplianceAction.php:98 +#: classes/Gems/Default/ComplianceAction.php:93 +#: classes/Gems/Default/SummaryAction.php:192 +msgid "No track selected..." +msgstr "No track selected..." + +#: classes/Gems/Default/ComplianceAction.php:173 msgid "Compliance" msgstr "Compliance" -#: classes/Gems/Default/ComplianceAction.php:109 +#: classes/Gems/Default/ComplianceAction.php:184 #: classes/Gems/Default/ProjectTracksAction.php:85 #: classes/Gems/Default/TrackAction.php:452 #: classes/Gems/Default/TrackMaintenanceAction.php:331 @@ -1221,7 +1226,7 @@ #: classes/Gems/Default/ExportAction.php:154 #: classes/Gems/Default/MailJobAction.php:100 #: classes/Gems/Default/ProjectSurveysAction.php:67 -#: classes/Gems/Default/SummaryAction.php:155 +#: classes/Gems/Default/SummaryAction.php:168 #: classes/Gems/Default/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 @@ -1429,32 +1434,30 @@ msgstr "Invalid language setting." #: classes/Gems/Default/LogAction.php:78 -#: classes/Gems/Default/TokenPlanAction.php:243 +#: classes/Gems/Default/TokenPlanAction.php:234 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:125 msgid "from" msgstr "from" #: classes/Gems/Default/LogAction.php:83 -#: classes/Gems/Default/TokenPlanAction.php:248 +#: classes/Gems/Default/TokenPlanAction.php:238 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:141 msgid "until" msgstr "until" #: classes/Gems/Default/LogAction.php:89 -#: classes/Gems/Default/TokenPlanAction.php:254 msgid "days" msgstr "days" #: classes/Gems/Default/LogAction.php:90 -#: classes/Gems/Default/TokenPlanAction.php:255 msgid "weeks" msgstr "weeks" #: classes/Gems/Default/LogAction.php:91 -#: classes/Gems/Default/TokenPlanAction.php:256 msgid "months" msgstr "months" #: classes/Gems/Default/LogAction.php:92 -#: classes/Gems/Default/TokenPlanAction.php:257 msgid "years" msgstr "years" @@ -1509,7 +1512,7 @@ msgstr "Message" #: classes/Gems/Default/LogAction.php:198 -#: classes/Gems/Default/TokenPlanAction.php:116 +#: classes/Gems/Default/TokenPlanAction.php:111 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:55 #: snippets/RespondentDetailsSnippet.php:74 #: snippets/RespondentDetailsWithAssignmentsSnippet.php:148 @@ -2055,7 +2058,7 @@ msgstr "Session content" #: classes/Gems/Default/ProjectInformationAction.php:226 -#: classes/Gems/Menu/MenuAbstract.php:357 +#: classes/Gems/Menu/MenuAbstract.php:360 msgid "Session" msgstr "Session" @@ -2072,6 +2075,7 @@ #: classes/Gems/Email/EmailFormAbstract.php:193 #: classes/Gems/Email/EmailFormAbstract.php:251 #: classes/Gems/Email/MailTemplateForm.php:81 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:112 #: classes/Gems/Tracker/Model/TrackModel.php:103 msgid "From" msgstr "From" @@ -2525,7 +2529,7 @@ msgstr[1] "sources" #: classes/Gems/Default/SourceAction.php:249 -#: classes/Gems/Menu/MenuAbstract.php:452 +#: classes/Gems/Menu/MenuAbstract.php:455 msgid "Survey Sources" msgstr "Survey Sources" @@ -2607,61 +2611,49 @@ msgid "You are not allowed to change this password." msgstr "You are not allowed to change this password." -#: classes/Gems/Default/SummaryAction.php:154 +#: classes/Gems/Default/SummaryAction.php:167 #: classes/Gems/Email/OneMailForm.php:55 #: classes/Gems/Export/RespondentExport.php:157 -#: classes/Gems/Menu/MenuAbstract.php:497 +#: classes/Gems/Menu/MenuAbstract.php:500 #: classes/Gems/Tracker/Model/StandardTokenModel.php:196 msgid "Round" msgstr "Round" -#: classes/Gems/Default/SummaryAction.php:156 -msgid "Filler" -msgstr "Filler" - -#: classes/Gems/Default/SummaryAction.php:159 -#: classes/Gems/Default/TokenPlanAction.php:326 +#: classes/Gems/Default/SummaryAction.php:169 +#: classes/Gems/Default/TokenPlanAction.php:292 #: classes/Gems/Selector/TokenByGroupDateSelector.php:139 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:149 msgid "Answered" msgstr "Answered" -#: classes/Gems/Default/SummaryAction.php:160 -#: classes/Gems/Default/TokenPlanAction.php:327 +#: classes/Gems/Default/SummaryAction.php:170 +#: classes/Gems/Default/TokenPlanAction.php:293 #: classes/Gems/Selector/TokenByGroupDateSelector.php:129 #: classes/Gems/Tracker/Token.php:1038 #: snippets/RespondentTokenTabsSnippet.php:68 msgid "Missed" msgstr "Missed" -#: classes/Gems/Default/SummaryAction.php:161 +#: classes/Gems/Default/SummaryAction.php:171 +#: classes/Gems/Default/TokenPlanAction.php:287 #: classes/Gems/Tracker/Token.php:1044 msgid "Open" msgstr "Open" -#: classes/Gems/Default/SummaryAction.php:162 -#: classes/Gems/Tracker/Token.php:1040 classes/Gems/Tracker/Token.php:1042 -msgid "Future" -msgstr "Future" +#: classes/Gems/Default/SummaryAction.php:172 +msgid "Total" +msgstr "Total" -#: classes/Gems/Default/SummaryAction.php:163 -#: classes/Gems/Util/Translated.php:233 -msgid "Unknown" -msgstr "Unknown" +#: classes/Gems/Default/SummaryAction.php:180 +msgid "Filler" +msgstr "Filler" -#: classes/Gems/Default/SummaryAction.php:165 -msgid "Success" -msgstr "Success" - -#: classes/Gems/Default/SummaryAction.php:166 -msgid "Removed" -msgstr "Removed" - -#: classes/Gems/Default/SummaryAction.php:179 +#: classes/Gems/Default/SummaryAction.php:205 msgid "Summary" msgstr "Summary" -#: classes/Gems/Default/SummaryAction.php:190 -#: classes/Gems/Default/TokenPlanAction.php:480 +#: classes/Gems/Default/SummaryAction.php:216 +#: classes/Gems/Default/TokenPlanAction.php:463 #: classes/Gems/Default/TrackAction.php:450 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 msgid "token" @@ -2893,98 +2885,106 @@ msgid "Not used in tracks." msgstr "Not used in tracks." -#: classes/Gems/Default/TokenPlanAction.php:117 +#: classes/Gems/Default/TokenPlanAction.php:112 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:56 msgid "Round / Details" msgstr "Round / Details" -#: classes/Gems/Default/TokenPlanAction.php:118 -#: classes/Gems/Default/TokenPlanAction.php:233 +#: classes/Gems/Default/TokenPlanAction.php:113 +#: classes/Gems/Default/TokenPlanAction.php:223 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:57 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:73 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:385 msgid "Valid from" msgstr "Valid from" -#: classes/Gems/Default/TokenPlanAction.php:119 -#: classes/Gems/Default/TokenPlanAction.php:234 +#: classes/Gems/Default/TokenPlanAction.php:114 +#: classes/Gems/Default/TokenPlanAction.php:224 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:58 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:74 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:386 #: classes/Gems/Tracker/Model/StandardTokenModel.php:198 msgid "Valid until" msgstr "Valid until" -#: classes/Gems/Default/TokenPlanAction.php:120 +#: classes/Gems/Default/TokenPlanAction.php:115 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:59 msgid "Contact date" msgstr "Contact date" -#: classes/Gems/Default/TokenPlanAction.php:174 +#: classes/Gems/Default/TokenPlanAction.php:169 #, php-format msgid "Email %s" msgstr "Email %s" -#: classes/Gems/Default/TokenPlanAction.php:180 +#: classes/Gems/Default/TokenPlanAction.php:175 msgid "No tokens found." msgstr "No tokens found." -#: classes/Gems/Default/TokenPlanAction.php:235 +#: classes/Gems/Default/TokenPlanAction.php:225 msgid "E-Mailed on" msgstr "E-Mailed on" -#: classes/Gems/Default/TokenPlanAction.php:236 +#: classes/Gems/Default/TokenPlanAction.php:226 msgid "Completion date" msgstr "Completion date" -#: classes/Gems/Default/TokenPlanAction.php:240 +#: classes/Gems/Default/TokenPlanAction.php:230 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:116 msgid "For date" msgstr "For date" -#: classes/Gems/Default/TokenPlanAction.php:287 +#: classes/Gems/Default/TokenPlanAction.php:252 msgid "Select:" msgstr "Select:" -#: classes/Gems/Default/TokenPlanAction.php:293 +#: classes/Gems/Default/TokenPlanAction.php:258 msgid "(all tracks)" msgstr "(all tracks)" -#: classes/Gems/Default/TokenPlanAction.php:304 +#: classes/Gems/Default/TokenPlanAction.php:269 msgid "(all rounds)" msgstr "(all rounds)" -#: classes/Gems/Default/TokenPlanAction.php:318 +#: classes/Gems/Default/TokenPlanAction.php:283 msgid "(all surveys)" msgstr "(all surveys)" -#: classes/Gems/Default/TokenPlanAction.php:321 +#: classes/Gems/Default/TokenPlanAction.php:286 msgid "(all actions)" msgstr "(all actions)" -#: classes/Gems/Default/TokenPlanAction.php:322 +#: classes/Gems/Default/TokenPlanAction.php:288 msgid "Not emailed" msgstr "Not emailed" -#: classes/Gems/Default/TokenPlanAction.php:323 +#: classes/Gems/Default/TokenPlanAction.php:289 msgid "To email" msgstr "To email" -#: classes/Gems/Default/TokenPlanAction.php:324 +#: classes/Gems/Default/TokenPlanAction.php:290 msgid "Needs reminder" msgstr "Needs reminder" -#: classes/Gems/Default/TokenPlanAction.php:325 +#: classes/Gems/Default/TokenPlanAction.php:291 msgid "Yet to Answer" msgstr "Yet to Answer" -#: classes/Gems/Default/TokenPlanAction.php:341 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:79 +#: classes/Gems/Default/TokenPlanAction.php:294 +msgid "Removed" +msgstr "Removed" + +#: classes/Gems/Default/TokenPlanAction.php:308 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:88 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:90 msgid "(all fillers)" msgstr "(all fillers)" -#: classes/Gems/Default/TokenPlanAction.php:360 +#: classes/Gems/Default/TokenPlanAction.php:327 msgid "(all staff)" msgstr "(all staff)" -#: classes/Gems/Default/TokenPlanAction.php:471 +#: classes/Gems/Default/TokenPlanAction.php:454 #: classes/Gems/Snippets/TokenModelSnippetAbstract.php:59 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:122 #: snippets/BrowseSingleSurveyTokenSnippet.php:144 @@ -2992,7 +2992,7 @@ msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:485 +#: classes/Gems/Default/TokenPlanAction.php:468 msgid "Token planning" msgstr "Token planning" @@ -3219,7 +3219,7 @@ msgstr[1] "fields" #: classes/Gems/Default/TrackFieldsAction.php:175 -#: classes/Gems/Menu/MenuAbstract.php:477 +#: classes/Gems/Menu/MenuAbstract.php:480 msgid "Fields" msgstr "Fields" @@ -3348,7 +3348,7 @@ msgstr[1] "rounds" #: classes/Gems/Default/TrackRoundsAction.php:227 -#: classes/Gems/Menu/MenuAbstract.php:485 +#: classes/Gems/Menu/MenuAbstract.php:488 msgid "Rounds" msgstr "Rounds" @@ -3610,81 +3610,81 @@ msgid "Track Summary" msgstr "Track Summary" -#: classes/Gems/Menu/MenuAbstract.php:327 +#: classes/Gems/Menu/MenuAbstract.php:329 msgid "Track Compliance" msgstr "Track Compliance" -#: classes/Gems/Menu/MenuAbstract.php:330 +#: classes/Gems/Menu/MenuAbstract.php:333 msgid "By period" msgstr "By period" -#: classes/Gems/Menu/MenuAbstract.php:331 +#: classes/Gems/Menu/MenuAbstract.php:334 msgid "By token" msgstr "By token" -#: classes/Gems/Menu/MenuAbstract.php:332 +#: classes/Gems/Menu/MenuAbstract.php:335 msgid "By respondent" msgstr "By patient" -#: classes/Gems/Menu/MenuAbstract.php:336 +#: classes/Gems/Menu/MenuAbstract.php:339 msgid "Bulk mail" msgstr "Bulk mail" -#: classes/Gems/Menu/MenuAbstract.php:354 +#: classes/Gems/Menu/MenuAbstract.php:357 msgid "Errors" msgstr "Errors" -#: classes/Gems/Menu/MenuAbstract.php:355 +#: classes/Gems/Menu/MenuAbstract.php:358 msgid "PHP" msgstr "PHP" -#: classes/Gems/Menu/MenuAbstract.php:358 +#: classes/Gems/Menu/MenuAbstract.php:361 msgid "Maintenance mode" msgstr "Maintenance mode" -#: classes/Gems/Menu/MenuAbstract.php:359 +#: classes/Gems/Menu/MenuAbstract.php:362 msgid "Clean cache" msgstr "Clean cache" -#: classes/Gems/Menu/MenuAbstract.php:426 +#: classes/Gems/Menu/MenuAbstract.php:429 msgid "Reset password" msgstr "Reset password" -#: classes/Gems/Menu/MenuAbstract.php:453 +#: classes/Gems/Menu/MenuAbstract.php:456 msgid "Check status" msgstr "Check status" -#: classes/Gems/Menu/MenuAbstract.php:454 +#: classes/Gems/Menu/MenuAbstract.php:457 msgid "Synchronize surveys" msgstr "Synchronize surveys" -#: classes/Gems/Menu/MenuAbstract.php:455 -#: classes/Gems/Menu/MenuAbstract.php:468 +#: classes/Gems/Menu/MenuAbstract.php:458 +#: classes/Gems/Menu/MenuAbstract.php:471 msgid "Check is answered" msgstr "Check is answered" -#: classes/Gems/Menu/MenuAbstract.php:456 +#: classes/Gems/Menu/MenuAbstract.php:459 msgid "Check attributes" msgstr "Check attributes" -#: classes/Gems/Menu/MenuAbstract.php:457 +#: classes/Gems/Menu/MenuAbstract.php:460 msgid "Synchronize all surveys" msgstr "Synchronize all surveys" -#: classes/Gems/Menu/MenuAbstract.php:458 -#: classes/Gems/Menu/MenuAbstract.php:469 +#: classes/Gems/Menu/MenuAbstract.php:461 +#: classes/Gems/Menu/MenuAbstract.php:472 msgid "Check all is answered" msgstr "Check all is answered" -#: classes/Gems/Menu/MenuAbstract.php:465 +#: classes/Gems/Menu/MenuAbstract.php:468 msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:503 +#: classes/Gems/Menu/MenuAbstract.php:506 msgid "Check assignments" msgstr "Check assignments" -#: classes/Gems/Menu/MenuAbstract.php:506 +#: classes/Gems/Menu/MenuAbstract.php:509 msgid "Check all assignments" msgstr "Check all assignments" @@ -3794,6 +3794,7 @@ msgstr "Y" #: classes/Gems/Selector/DateSelectorAbstract.php:563 +#: classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php:128 #: classes/Gems/Util/Translated.php:81 msgid "-" msgstr "n/a" @@ -3911,11 +3912,43 @@ msgid "(select a track)" msgstr "(select a track)" -#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:178 -#: classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php:124 -msgid "No track selected..." -msgstr "No track selected..." +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:71 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:71 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:370 +msgid "Track start" +msgstr "Track start" +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:72 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:72 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:371 +msgid "Track end" +msgstr "Track end" + +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:151 +msgid "Missed deadline" +msgstr "Missed deadline" + +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:153 +msgid "Open - can be answered now" +msgstr "Open - can be answered now" + +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:155 +msgid "Valid from date unknown" +msgstr "Valid from date unknown" + +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:157 +msgid "Valid from date in the future" +msgstr "Valid from date in the future" + +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:159 +msgid "Token does not exist" +msgstr "Token does not exist" + +#: classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php:126 +#, php-format +msgid "%d%%" +msgstr "%d%%" + #: classes/Gems/Task/Db/ExecutePatch.php:66 #, php-format msgid "Executing patchlevel %d" @@ -4000,6 +4033,10 @@ msgid "Completed" msgstr "Completed" +#: classes/Gems/Tracker/Token.php:1040 classes/Gems/Tracker/Token.php:1042 +msgid "Future" +msgstr "Future" + #: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:135 msgid "No surveys were changed." msgstr "No surveys were changed." @@ -4051,14 +4088,6 @@ 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:370 -msgid "Track start" -msgstr "Track start" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:371 -msgid "Track end" -msgstr "Track end" - #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:387 msgid "Start time" msgstr "Start time" @@ -4772,6 +4801,10 @@ msgid "Send one mail per respondent, mark only mailed tokens as send." msgstr "Send one mail per patient, mark only mailed tokens as send." +#: classes/Gems/Util/Translated.php:233 +msgid "Unknown" +msgstr "Unknown" + #: classes/Gems/Util/Translated.php:246 msgid "mr." msgstr "Mr." @@ -5250,8 +5283,8 @@ msgstr[1] "" "After this survey there are another %d surveys we would like you to answer." -#~ msgid "Survey can be answered until %s." -#~ msgstr "Survey can be answered until %s." +#~ msgid "Success" +#~ msgstr "Success" #~ msgid "Survey must be answered tomorrow!" #~ msgstr "Survey must be answered tomorrow!" @@ -5328,9 +5361,6 @@ #~ msgid "Dear {greeting}," #~ msgstr "Dear {greeting}," -#~ msgid "The token %s does not exist." -#~ msgstr "The token %s does not exist." - #~ msgid "" #~ "After answering the survey you will return to the respondent overview " #~ "screen." Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2013-01-17 17:34:35 UTC (rev 1111) +++ trunk/library/languages/default-nl.po 2013-01-18 17:26:18 UTC (rev 1112) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-16 19:27+0100\n" +"POT-Creation-Date: 2013-01-18 17:59+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -329,15 +329,15 @@ #: classes/Gems/Menu.php:323 classes/Gems/Menu.php:423 #: classes/Gems/Email/EmailFormAbstract.php:280 #: classes/Gems/Email/EmailFormAbstract.php:291 -#: classes/Gems/Menu/MenuAbstract.php:383 -#: classes/Gems/Menu/MenuAbstract.php:396 +#: classes/Gems/Menu/MenuAbstract.php:386 +#: classes/Gems/Menu/MenuAbstract.php:399 msgid "Preview" msgstr "Preview" #: classes/Gems/Menu.php:332 classes/Gems/Default/ExportAction.php:149 #: classes/Gems/Default/TrackMaintenanceAction.php:336 -#: classes/Gems/Menu/MenuAbstract.php:392 -#: classes/Gems/Menu/MenuAbstract.php:474 snippets/AddTracksSnippet.php:238 +#: classes/Gems/Menu/MenuAbstract.php:395 +#: classes/Gems/Menu/MenuAbstract.php:477 snippets/AddTracksSnippet.php:238 msgid "Tracks" msgstr "Trajecten" @@ -355,8 +355,8 @@ #: classes/Gems/Menu.php:377 #: classes/Gems/Default/SurveyMaintenanceAction.php:586 -#: classes/Gems/Menu/MenuAbstract.php:399 -#: classes/Gems/Menu/MenuAbstract.php:461 +#: classes/Gems/Menu/MenuAbstract.php:402 +#: classes/Gems/Menu/MenuAbstract.php:464 #: classes/Gems/Tracker/Model/TrackModel.php:100 msgid "Surveys" msgstr "Vragenlijsten" @@ -388,7 +388,7 @@ msgid "Overview" msgstr "Overzicht" -#: classes/Gems/Menu.php:593 classes/Gems/Menu/MenuAbstract.php:356 +#: classes/Gems/Menu.php:593 classes/Gems/Menu/MenuAbstract.php:359 msgid "Project" msgstr "Project" @@ -418,7 +418,7 @@ msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:84 +#: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:86 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patiënt nr" @@ -476,7 +476,7 @@ #: classes/Gems/Default/SourceAction.php:195 #: classes/Gems/Default/StaffAction.php:328 #: classes/Gems/Default/SurveyMaintenanceAction.php:435 -#: classes/Gems/Default/TokenPlanAction.php:121 +#: classes/Gems/Default/TokenPlanAction.php:116 #: classes/Gems/Default/TrackFieldsAction.php:98 #: classes/Gems/Default/TrackMaintenanceAction.php:249 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:60 @@ -549,7 +549,7 @@ msgstr "Probeert upgrade voor %s naar niveau %s: %s" #: classes/Gems/Controller/BrowseEditAction.php:357 -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:239 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:261 #: classes/Gems/Default/StaffAction.php:228 #: classes/Gems/Snippets/ModelFormSnippetAbstract.php:186 #, php-format @@ -557,7 +557,7 @@ msgstr "Nieuwe %s..." #: classes/Gems/Controller/BrowseEditAction.php:390 -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:259 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:281 #: classes/Gems/Default/TrackFieldsAction.php:130 #: classes/Gems/Default/TrackRoundsAction.php:171 #, php-format @@ -580,19 +580,19 @@ msgstr "Bewerk %s %s" #: classes/Gems/Controller/BrowseEditAction.php:413 -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:269 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:291 #: classes/Gems/Snippets/ModelFormSnippetAbstract.php:188 #, php-format msgid "Edit %s" msgstr "Bewerk %s" #: classes/Gems/Controller/BrowseEditAction.php:516 -#: classes/Gems/Snippets/AutosearchFormSnippet.php:166 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:249 msgid "Free search text" msgstr "Vrije zoek tekst" #: classes/Gems/Controller/BrowseEditAction.php:587 -#: classes/Gems/Snippets/AutosearchFormSnippet.php:241 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:324 msgid "Search" msgstr "Zoeken" @@ -709,26 +709,26 @@ msgid "Cancel" msgstr "Annuleren" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:249 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:271 #, php-format msgid "Do you want to delete this %s?" msgstr "Weet u zeker dat deze %s verwijderd moet worden?" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:282 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:304 msgid "No data found." msgstr "Geen gegevens gevonden." -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:344 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:366 #, php-format msgid "No %s found..." msgstr "Geen %s gevonden..." -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:354 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:376 #, php-format msgid "Showing %s" msgstr "Toon %s" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:390 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:412 #: classes/Gems/Default/OptionAction.php:181 #: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:341 msgid "item" @@ -810,19 +810,24 @@ msgid "The survey for token %s is no longer active." msgstr "De vragenlijst voor kenmerk %s is niet meer in gebruik." -#: classes/Gems/Default/ComplianceAction.php:85 +#: classes/Gems/Default/ComplianceAction.php:87 msgid "Start date" msgstr "Startdatum" -#: classes/Gems/Default/ComplianceAction.php:86 +#: classes/Gems/Default/ComplianceAction.php:88 msgid "End date" msgstr "Einddatum" -#: classes/Gems/Default/ComplianceAction.php:98 +#: classes/Gems/Default/ComplianceAction.php:93 +#: classes/Gems/Default/SummaryAction.php:192 +msgid "No track selected..." +msgstr "Geen traject geselecteerd..." + +#: classes/Gems/Default/ComplianceAction.php:173 msgid "Compliance" msgstr "Voortgang" -#: classes/Gems/Default/ComplianceAction.php:109 +#: classes/Gems/Default/ComplianceAction.php:184 #: classes/Gems/Default/ProjectTracksAction.php:85 #: classes/Gems/Default/TrackAction.php:452 #: classes/Gems/Default/TrackMaintenanceAction.php:331 @@ -1226,7 +1231,7 @@ #: classes/Gems/Default/ExportAction.php:154 #: classes/Gems/Default/MailJobAction.php:100 #: classes/Gems/Default/ProjectSurveysAction.php:67 -#: classes/Gems/Default/SummaryAction.php:155 +#: classes/Gems/Default/SummaryAction.php:168 #: classes/Gems/Default/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 @@ -1437,32 +1442,30 @@ msgstr "Ongeldige taal instelling." #: classes/Gems/Default/LogAction.php:78 -#: classes/Gems/Default/TokenPlanAction.php:243 +#: classes/Gems/Default/TokenPlanAction.php:234 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:125 msgid "from" msgstr "vanaf" #: classes/Gems/Default/LogAction.php:83 -#: classes/Gems/Default/TokenPlanAction.php:248 +#: classes/Gems/Default/TokenPlanAction.php:238 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:141 msgid "until" msgstr "tot" #: classes/Gems/Default/LogAction.php:89 -#: classes/Gems/Default/TokenPlanAction.php:254 msgid "days" msgstr "dagen" #: classes/Gems/Default/LogAction.php:90 -#: classes/Gems/Default/TokenPlanAction.php:255 msgid "weeks" msgstr "weken" #: classes/Gems/Default/LogAction.php:91 -#: classes/Gems/Default/TokenPlanAction.php:256 msgid "months" msgstr "maanden" #: classes/Gems/Default/LogAction.php:92 -#: classes/Gems/Default/TokenPlanAction.php:257 msgid "years" msgstr "jaren" @@ -1517,7 +1520,7 @@ msgstr "Bericht" #: classes/Gems/Default/LogAction.php:198 -#: classes/Gems/Default/TokenPlanAction.php:116 +#: classes/Gems/Default/TokenPlanAction.php:111 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:55 #: snippets/RespondentDetailsSnippet.php:74 #: snippets/RespondentDetailsWithAssignmentsSnippet.php:148 @@ -2066,7 +2069,7 @@ msgstr "Sessie inhoud" #: classes/Gems/Default/ProjectInformationAction.php:226 -#: classes/Gems/Menu/MenuAbstract.php:357 +#: classes/Gems/Menu/MenuAbstract.php:360 msgid "Session" msgstr "Sessie" @@ -2083,6 +2086,7 @@ #: classes/Gems/Email/EmailFormAbstract.php:193 #: classes/Gems/Email/EmailFormAbstract.php:251 #: classes/Gems/Email/MailTemplateForm.php:81 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:112 #: classes/Gems/Tracker/Model/TrackModel.php:103 msgid "From" msgstr "Van" @@ -2539,7 +2543,7 @@ msgstr[1] "bronnen" #: classes/Gems/Default/SourceAction.php:249 -#: classes/Gems/Menu/MenuAbstract.php:452 +#: classes/Gems/Menu/MenuAbstract.php:455 msgid "Survey Sources" msgstr "Bronnen" @@ -2623,61 +2627,49 @@ msgid "You are not allowed to change this password." msgstr "U mag dit wachtwoord niet wijzigen." -#: classes/Gems/Default/SummaryAction.php:154 +#: classes/Gems/Default/SummaryAction.php:167 #: classes/Gems/Email/OneMailForm.php:55 #: classes/Gems/Export/RespondentExport.php:157 -#: classes/Gems/Menu/MenuAbstract.php:497 +#: classes/Gems/Menu/MenuAbstract.php:500 #: classes/Gems/Tracker/Model/StandardTokenModel.php:196 msgid "Round" msgstr "Ronde" -#: classes/Gems/Default/SummaryAction.php:156 -msgid "Filler" -msgstr "Invuller" - -#: classes/Gems/Default/SummaryAction.php:159 -#: classes/Gems/Default/TokenPlanAction.php:326 +#: classes/Gems/Default/SummaryAction.php:169 +#: classes/Gems/Default/TokenPlanAction.php:292 #: classes/Gems/Selector/TokenByGroupDateSelector.php:139 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:149 msgid "Answered" msgstr "Beantwoord" -#: classes/Gems/Default/SummaryAction.php:160 -#: classes/Gems/Default/TokenPlanAction.php:327 +#: classes/Gems/Default/SummaryAction.php:170 +#: classes/Gems/Default/TokenPlanAction.php:293 #: classes/Gems/Selector/TokenByGroupDateSelector.php:129 #: classes/Gems/Tracker/Token.php:1038 #: snippets/RespondentTokenTabsSnippet.php:68 msgid "Missed" msgstr "Gemist" -#: classes/Gems/Default/SummaryAction.php:161 +#: classes/Gems/Default/SummaryAction.php:171 +#: classes/Gems/Default/TokenPlanAction.php:287 #: classes/Gems/Tracker/Token.php:1044 msgid "Open" msgstr "Open" -#: classes/Gems/Default/SummaryAction.php:162 -#: classes/Gems/Tracker/Token.php:1040 classes/Gems/Tracker/Token.php:1042 -msgid "Future" -msgstr "Toekomstig" +#: classes/Gems/Default/SummaryAction.php:172 +msgid "Total" +msgstr "Totaal" -#: classes/Gems/Default/SummaryAction.php:163 -#: classes/Gems/Util/Translated.php:233 -msgid "Unknown" -msgstr "Onbekend" +#: classes/Gems/Default/SummaryAction.php:180 +msgid "Filler" +msgstr "Invuller" -#: classes/Gems/Default/SummaryAction.php:165 -msgid "Success" -msgstr "Succes" - -#: classes/Gems/Default/SummaryAction.php:166 -msgid "Removed" -msgstr "Verwijderd" - -#: classes/Gems/Default/SummaryAction.php:179 +#: classes/Gems/Default/SummaryAction.php:205 msgid "Summary" msgstr "Samenvatting" -#: classes/Gems/Default/SummaryAction.php:190 -#: classes/Gems/Default/TokenPlanAction.php:480 +#: classes/Gems/Default/SummaryAction.php:216 +#: classes/Gems/Default/TokenPlanAction.php:463 #: classes/Gems/Default/TrackAction.php:450 #: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 msgid "token" @@ -2912,98 +2904,106 @@ msgid "Not used in tracks." msgstr "Niet in trajecten gebruikt." -#: classes/Gems/Default/TokenPlanAction.php:117 +#: classes/Gems/Default/TokenPlanAction.php:112 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:56 msgid "Round / Details" msgstr "Ronde / Details" -#: classes/Gems/Default/TokenPlanAction.php:118 -#: classes/Gems/Default/TokenPlanAction.php:233 +#: classes/Gems/Default/TokenPlanAction.php:113 +#: classes/Gems/Default/TokenPlanAction.php:223 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:57 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:73 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:385 msgid "Valid from" msgstr "Geldig vanaf" -#: classes/Gems/Default/TokenPlanAction.php:119 -#: classes/Gems/Default/TokenPlanAction.php:234 +#: classes/Gems/Default/TokenPlanAction.php:114 +#: classes/Gems/Default/TokenPlanAction.php:224 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:58 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:74 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:386 #: classes/Gems/Tracker/Model/StandardTokenModel.php:198 msgid "Valid until" msgstr "Geldig tot" -#: classes/Gems/Default/TokenPlanAction.php:120 +#: classes/Gems/Default/TokenPlanAction.php:115 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:59 msgid "Contact date" msgstr "Contactdatum" -#: classes/Gems/Default/TokenPlanAction.php:174 +#: classes/Gems/Default/TokenPlanAction.php:169 #, php-format msgid "Email %s" msgstr "Email %s" -#: classes/Gems/Default/TokenPlanAction.php:180 +#: classes/Gems/Default/TokenPlanAction.php:175 msgid "No tokens found." msgstr "Geen kenmerken gevonden." -#: classes/Gems/Default/TokenPlanAction.php:235 +#: classes/Gems/Default/TokenPlanAction.php:225 msgid "E-Mailed on" msgstr "Email verstuurd op" -#: classes/Gems/Default/TokenPlanAction.php:236 +#: classes/Gems/Default/TokenPlanAction.php:226 msgid "Completion date" msgstr "Datum ingevuld op" -#: classes/Gems/Default/TokenPlanAction.php:240 +#: classes/Gems/Default/TokenPlanAction.php:230 +#: classes/Gems/Snippets/AutosearchFormSnippet.php:116 msgid "For date" msgstr "Met datum" -#: classes/Gems/Default/TokenPlanAction.php:287 +#: classes/Gems/Default/TokenPlanAction.php:252 msgid "Select:" msgstr "Selecteren:" -#: classes/Gems/Default/TokenPlanAction.php:293 +#: classes/Gems/Default/TokenPlanAction.php:258 msgid "(all tracks)" msgstr "(alle trajecten)" -#: classes/Gems/Default/TokenPlanAction.php:304 +#: classes/Gems/Default/TokenPlanAction.php:269 msgid "(all rounds)" msgstr "(alle rondes)" -#: classes/Gems/Default/TokenPlanAction.php:318 +#: classes/Gems/Default/TokenPlanAction.php:283 msgid "(all surveys)" msgstr "(alle vragenlijsten)" -#: classes/Gems/Default/TokenPlanAction.php:321 +#: classes/Gems/Default/TokenPlanAction.php:286 msgid "(all actions)" msgstr "(alle acties)" -#: classes/Gems/Default/TokenPlanAction.php:322 +#: classes/Gems/Default/TokenPlanAction.php:288 msgid "Not emailed" msgstr "Niet gemaild" -#: classes/Gems/Default/TokenPlanAction.php:323 +#: classes/Gems/Default/TokenPlanAction.php:289 msgid "To email" msgstr "Te mailen" -#: classes/Gems/Default/TokenPlanAction.php:324 +#: classes/Gems/Default/TokenPlanAction.php:290 msgid "Needs reminder" msgstr "Herinnering nodig" -#: classes/Gems/Default/TokenPlanAction.php:325 +#: classes/Gems/Default/TokenPlanAction.php:291 msgid "Yet to Answer" msgstr "Nog te beantwoorden" -#: classes/Gems/Default/TokenPlanAction.php:341 -#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:79 +#: classes/Gems/Default/TokenPlanAction.php:294 +msgid "Removed" +msgstr "Verwijderd" + +#: classes/Gems/Default/TokenPlanAction.php:308 +#: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:88 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:90 msgid "(all fillers)" msgstr "(alle invullers)" -#: classes/Gems/Default/TokenPlanAction.php:360 +#: classes/Gems/Default/TokenPlanAction.php:327 msgid "(all staff)" msgstr "(alle medewerkers)" -#: classes/Gems/Default/TokenPlanAction.php:471 +#: classes/Gems/Default/TokenPlanAction.php:454 #: classes/Gems/Snippets/TokenModelSnippetAbstract.php:59 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:122 #: snippets/BrowseSingleSurveyTokenSnippet.php:144 @@ -3011,7 +3011,7 @@ msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:485 +#: classes/Gems/Default/TokenPlanAction.php:468 msgid "Token planning" msgstr "Per kenmerk plannen" @@ -3243,7 +3243,7 @@ msgstr[1] "velden" #: classes/Gems/Default/TrackFieldsAction.php:175 -#: classes/Gems/Menu/MenuAbstract.php:477 +#: classes/Gems/Menu/MenuAbstract.php:480 msgid "Fields" msgstr "Velden" @@ -3375,7 +3375,7 @@ msgstr[1] "rondes" #: classes/Gems/Default/TrackRoundsAction.php:227 -#: classes/Gems/Menu/MenuAbstract.php:485 +#: classes/Gems/Menu/MenuAbstract.php:488 msgid "Rounds" msgstr "Rondes" @@ -3638,81 +3638,81 @@ msgid "Track Summary" msgstr "Traject Samenvatting" -#: classes/Gems/Menu/MenuAbstract.php:327 +#: classes/Gems/Menu/MenuAbstract.php:329 msgid "Track Compliance" msgstr "Traject Voortgang" -#: classes/Gems/Menu/MenuAbstract.php:330 +#: classes/Gems/Menu/MenuAbstract.php:333 msgid "By period" msgstr "Per periode" -#: classes/Gems/Menu/MenuAbstract.php:331 +#: classes/Gems/Menu/MenuAbstract.php:334 msgid "By token" msgstr "Per kenmerk" -#: classes/Gems/Menu/MenuAbstract.php:332 +#: classes/Gems/Menu/MenuAbstract.php:335 msgid "By respondent" msgstr "Per patiënt" -#: classes/Gems/Menu/MenuAbstract.php:336 +#: classes/Gems/Menu/MenuAbstract.php:339 msgid "Bulk mail" msgstr "Bulk mail" -#: cla... [truncated message content] |
From: <gem...@li...> - 2013-01-17 17:34:42
|
Revision: 1111 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1111&view=rev Author: matijsdejong Date: 2013-01-17 17:34:35 +0000 (Thu, 17 Jan 2013) Log Message: ----------- ComplianceAction.php now looks nice and exports to excel Modified Paths: -------------- trunk/new_project/htdocs/gems/css/gems.css Modified: trunk/new_project/htdocs/gems/css/gems.css =================================================================== --- trunk/new_project/htdocs/gems/css/gems.css 2013-01-17 17:34:11 UTC (rev 1110) +++ trunk/new_project/htdocs/gems/css/gems.css 2013-01-17 17:34:35 UTC (rev 1111) @@ -81,6 +81,55 @@ text-align: center; } +.compliance .rounds { + overflow: hidden; + white-space: pre; +} + +.compliance .rounds th { + border-top: transparent none; +} + +.compliance td.answered { + background-color: green; + color: green; +} + +.compliance td.missed { + background-color: red; + color: red; +} + +.compliance td.newRound, .compliance th.newRound { + border-left-width: 3px; +} + +.compliance td.open { + background-color: yellow; + color: yellow; +} + +.compliance td.round, .compliance th.round { + min-width: 14px; + max-width: 14px; + overflow: hidden; +} + +.compliance td.unknown { + background-color: white; + color: white; +} + +.compliance td.waiting { + background-color: lightblue; + color: lightblue; +} + +.compliance td.empty { + background-color: white; + color: white; +} + .currentRow { background-color: aqua; border: 3px solid darkblue !important; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-17 17:34:20
|
Revision: 1110 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1110&view=rev Author: matijsdejong Date: 2013-01-17 17:34:11 +0000 (Thu, 17 Jan 2013) Log Message: ----------- ComplianceAction.php now looks nice and exports to excel Simple _addPeriodSelectors function, will add to TokenPlanAction and RespondentPlanAction Modified Paths: -------------- trunk/library/classes/Gems/Default/ComplianceAction.php trunk/library/classes/Gems/Default/SummaryAction.php trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php Modified: trunk/library/classes/Gems/Default/ComplianceAction.php =================================================================== --- trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-17 14:21:18 UTC (rev 1109) +++ trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-17 17:34:11 UTC (rev 1110) @@ -79,12 +79,88 @@ 'gr2t_id_organization' => 'gr2o_id_organization' )); $model->addTable('gems__tracks', array('gr2t_id_track' => 'gtr_id_track')); + $model->addTable('gems__reception_codes', array('gr2t_reception_code' => 'grc_id_reception_code')); + $model->addFilter(array('grc_success' => 1)); $model->resetOrder(); $model->set('gr2o_patient_nr', 'label', $this->_('Respondent nr')); $model->set('gr2t_start_date', 'label', $this->_('Start date'), 'dateFormat', 'dd-MM-yyyy'); $model->set('gr2t_end_date', 'label', $this->_('End date'), 'dateFormat', 'dd-MM-yyyy'); + $filter = $this->util->getRequestCache('index')->getProgramParams(); + MUtil_Echo::track($filter); + if (! (isset($filter['gr2t_id_track']) && $filter['gr2t_id_track'])) { + $model->setFilter(array('1=0')); + $this->autofilterParameters['onEmpty'] = $this->_('No track selected...'); + return $model; + } + + // Add the period filter - if any + if ($where = Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($filter, $this->db)) { + $model->addFilter(array($where)); + } + + $select = $this->db->select(); + $select->from('gems__rounds', array('gro_id_round', 'gro_id_order', 'gro_round_description')) + ->joinInner('gems__surveys', 'gro_id_survey = gsu_id_survey', array('gsu_survey_name')) + ->where('gro_id_track = ?', $filter['gr2t_id_track']) + ->order('gro_id_order'); + + if (isset($filter['gsu_id_primary_group']) && $filter['gsu_id_primary_group']) { + $select->where('gsu_id_primary_group = ?', $filter['gsu_id_primary_group']); + } + + $data = $this->db->fetchAll($select); + + if (! $data) { + return $model; + } + + $status = new Zend_Db_Expr(" + CASE + WHEN gto_completion_time IS NOT NULL THEN 'A' + WHEN gto_valid_from IS NULL THEN 'U' + WHEN gto_valid_from > CURRENT_TIMESTAMP THEN 'W' + WHEN gto_valid_until < CURRENT_TIMESTAMP THEN 'M' + ELSE 'O' + END + "); + + $select = $this->db->select(); + $select->from('gems__tokens', array('gto_id_respondent_track', 'gto_id_round', 'status' => $status)) + ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) + ->where('grc_success = 1') + ->where('gto_id_track = ?', $filter['gr2t_id_track']) + ->order('gto_id_respondent_track') + ->order('gto_round_order'); + + // MUtil_Echo::track($this->db->fetchAll($select)); + $newModel = new MUtil_Model_SelectModel($select, 'tok'); + $newModel->setKeys(array('gto_id_respondent_track')); + + $transformer = new MUtil_Model_Transform_CrossTabTransformer(); + $transformer->setCrosstabFields('gto_id_round', 'status'); + + foreach ($data as $row) { + $name = 'col_' . $row['gro_id_round']; + $transformer->set($name, 'label', MUtil_Lazy::call('substr', $row['gsu_survey_name'], 0, 2), + 'description', sprintf("%s\n[%s]", $row['gsu_survey_name'], $row['gro_round_description']), + 'noSort', true, + 'round', $row['gro_round_description'] + ); + } + + $newModel->addTransformer($transformer); + // MUtil_Echo::track($data); + + $joinTrans = new MUtil_Model_Transform_JoinTransformer(); + $joinTrans->addModel($newModel, array('gr2t_id_respondent_track' => 'gto_id_respondent_track')); + + $model->resetOrder(); + $model->set('gr2o_patient_nr'); + $model->set('gr2t_start_date'); + $model->addTransformer($joinTrans); + return $model; } Modified: trunk/library/classes/Gems/Default/SummaryAction.php =================================================================== --- trunk/library/classes/Gems/Default/SummaryAction.php 2013-01-17 14:21:18 UTC (rev 1109) +++ trunk/library/classes/Gems/Default/SummaryAction.php 2013-01-17 17:34:11 UTC (rev 1110) @@ -153,7 +153,6 @@ ->joinInner('gems__surveys', 'gro_id_survey = gsu_id_survey', array('gsu_survey_name', 'gsu_id_primary_group')) ->group(array('gro_id_order', 'gro_round_description', 'gsu_survey_name', 'gsu_id_primary_group')); - // ->order('gto_round_order'); // MUtil_Model::$verbose = true; $model = new MUtil_Model_SelectModel($select, 'summary'); @@ -181,7 +180,14 @@ $model->set('gsu_id_primary_group', 'label', $this->_('Filler'), 'multiOptions', $this->util->getDbLookup()->getGroups()); - if (!$this->getTrackId()) { + $data = $this->util->getRequestCache('index')->getProgramParams(); + if (isset($data['gto_id_track'])) { + // Add the period filter + if ($where = Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($data, $this->db)) { + $select->joinInner('gems__respondent2track', 'gto_id_respondent_track = gr2t_id_respondent_track', array()); + $model->addFilter(array($where)); + } + } else { $model->setFilter(array('1=0')); $this->autofilterParameters['onEmpty'] = $this->_('No track selected...'); } @@ -209,16 +215,4 @@ { return $this->plural('token', 'tokens', $count); } - - /** - * - * @return int Return the track id if any or null - */ - public function getTrackId() - { - $data = $this->util->getRequestCache('index')->getProgramParams(); - if (isset($data['gto_id_track'])) { - return $data['gto_id_track']; - } - } } Modified: trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-01-17 14:21:18 UTC (rev 1109) +++ trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-01-17 17:34:11 UTC (rev 1110) @@ -89,18 +89,71 @@ */ protected $searchButtonId = 'AUTO_SEARCH_TEXT_BUTTON'; + /** + * Generate two date selectors and - depending on the number of $dates passed - + * either a hidden element containing the field name or an radio button or + * dropdown selector for the type of date to use. + * + * @param array $elements Search element array to which the element are added. + * @param mixed $dates A string fieldName to use or an array of fieldName => Label + * @param string $defaultDate Optional element, otherwise first is used. + * @param int $switchToSelect The number of dates where this function should switch to select display + */ + protected function _addPeriodSelectors(array &$elements, $dates, $defaultDate = null, $switchToSelect = 4) + { + if (is_array($dates) && (1 === count($dates))) { + reset($dates); + $dates = key($dates); + } + if (is_string($dates)) { + $element = new Zend_Form_Element_Hidden('dateused'); + $element->setValue($dates); + $fromLabel = $this->_('From'); + } else { + if (count($dates) >= $switchToSelect) { + $element = $this->_createSelectElement('dateused', $dates); + $element->setLabel($this->_('For date')); + + $fromLabel = ''; + } else { + $element = $this->_createRadioElement('dateused', $dates); + $element->setSeparator(' '); + + $fromLabel = html_entity_decode(' » ', ENT_QUOTES, 'UTF-8'); + } + $fromLabel .= $this->_('from'); + + if ((null === $defaultDate) || (! isset($dates[$defaultDate]))) { + // Set value to first key + reset($dates); + $defaultDate = key($dates); + } + $element->setValue($defaultDate); + } + $elements[] = $element; + + $options = array(); + $options['label'] = $fromLabel; + MUtil_Model_FormBridge::applyFixedOptions('date', $options); + $elements[] = new Gems_JQuery_Form_Element_DatePicker('datefrom', $options); + + $options['label'] = ' ' . $this->_('until'); + $elements[] = new Gems_JQuery_Form_Element_DatePicker('dateuntil', $options); + } + /** * Creates a Zend_Form_Element_Select * * If $options is a string it is assumed to contain an SQL statement. * + * @param string $class Name of the class to use * @param string $name Name of the select element * @param string|array $options Can be a SQL select string or key/value array of options * @param string $empty Text to display for the empty selector - * @return Zend_Form_Element_Select + * @return Zend_Form_Element_Multi */ - protected function _createSelectElement($name, $options, $empty = null) + private function _createMultiElement($class, $name, $options, $empty) { if ($options instanceof MUtil_Model_ModelAbstract) { $options = $options->get($name, 'multiOptions'); @@ -113,13 +166,43 @@ if (null !== $empty) { $options = array('' => $empty) + $options; } - $element = new Zend_Form_Element_Select($name, array('multiOptions' => $options)); + $element = new $class($name, array('multiOptions' => $options)); return $element; } } /** + * Creates a Zend_Form_Element_Select + * + * If $options is a string it is assumed to contain an SQL statement. + * + * @param string $name Name of the select element + * @param string|array $options Can be a SQL select string or key/value array of options + * @param string $empty Text to display for the empty selector + * @return Zend_Form_Element_Radio + */ + protected function _createRadioElement($name, $options, $empty = null) + { + return $this->_createMultiElement('Zend_Form_Element_Radio', $name, $options, $empty); + } + + /** + * Creates a Zend_Form_Element_Select + * + * If $options is a string it is assumed to contain an SQL statement. + * + * @param string $name Name of the select element + * @param string|array $options Can be a SQL select string or key/value array of options + * @param string $empty Text to display for the empty selector + * @return Zend_Form_Element_Select + */ + protected function _createSelectElement($name, $options, $empty = null) + { + return $this->_createMultiElement('Zend_Form_Element_Select', $name, $options, $empty); + } + + /** * Called after the check that all required registry values * have been set correctly has run. * @@ -255,7 +338,48 @@ } /** + * Helper function to generate a period query string * + * @param array $data A filter array or $request->getParams() + * @param Zend_Db_Adapter_Abstract $db + * @return string + */ + public static function getPeriodFilter(array $data, Zend_Db_Adapter_Abstract $db) + { + if (isset($data['dateused'])) { + $options = array(); + MUtil_Model_FormBridge::applyFixedOptions('date', $options); + + $outFormat = 'yyyy-MM-dd'; + $inFormat = isset($options['dateFormat']) ? $options['dateFormat'] : null; + + if (isset($data['datefrom']) && $data['datefrom']) { + if (isset($data['dateuntil']) && $data['dateuntil']) { + return sprintf( + '%s BETWEEN %s AND %s', + $db->quoteIdentifier($data['dateused']), + $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)), + $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) + ); + } + return sprintf( + '%s >= %s', + $db->quoteIdentifier($data['dateused']), + $db->quote(MUtil_Date::format($data['datefrom'], $outFormat, $inFormat)) + ); + } + if (isset($data['dateuntil']) && $data['dateuntil']) { + return sprintf( + '%s <= %s', + $db->quoteIdentifier($data['dateused']), + $db->quote(MUtil_Date::format($data['dateuntil'], $outFormat, $inFormat)) + ); + } + } + } + + /** + * * @return array The data to fill the form with */ protected function getSearchData() Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-17 14:21:18 UTC (rev 1109) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-17 17:34:11 UTC (rev 1110) @@ -65,6 +65,28 @@ $this->util->getDbLookup()->getOrganizationsWithRespondents(), $this->_('(all organizations)')); + $elements[] = null; + + $dates = array( + 'gr2t_start_date' => $this->_('Track start'), + 'gr2t_end_date' => $this->_('Track end'), + ); + // $dates = 'gto_valid_from'; + $this->_addPeriodSelectors($elements, $dates, 'gto_valid_from'); + + $elements[] = null; + + $sql = "SELECT DISTINCT ggp_id_group, ggp_name + FROM gems__groups INNER JOIN gems__surveys ON ggp_id_group = gsu_id_primary_group + INNER JOIN gems__rounds ON gsu_id_survey = gro_id_survey + INNER JOIN gems__tracks ON gro_id_track = gtr_id_track + WHERE ggp_group_active = 1 AND + gro_active=1 AND + gtr_active=1 AND + gtr_track_type='T' + ORDER BY ggp_name"; + $elements[] = $this->_createSelectElement('gsu_id_primary_group', $sql, $this->_('(all fillers)')); + return $elements; } Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-17 14:21:18 UTC (rev 1109) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-17 17:34:11 UTC (rev 1110) @@ -47,126 +47,126 @@ class Gems_Snippets_Tracker_Compliance_ComplianceTableSnippet extends Gems_Snippets_ModelTableSnippetGeneric { /** + * Adds columns from the model to the bridge that creates the browse table. * - * @var Zend_Db_Adapter_Abstract - */ - protected $db; - - /** + * Overrule this function to add different columns to the browse table, without + * having to recode the core table building code. * - * @var Gems_Loader + * @param MUtil_Model_TableBridge $bridge + * @param MUtil_Model_ModelAbstract $model + * @return void */ - protected $loader; - - /** - * Creates the model - * - * @return MUtil_Model_ModelAbstract - */ - protected function createModel() + protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { - $model = parent::createModel(); - $trackId = $this->getTrackId(); + $table = $bridge->getTable(); + $table->appendAttrib('class', 'compliance'); - if (! $trackId) { - return $model; - } + $thead = $table->thead(); + $th_row = $thead->tr(array('class' => 'rounds')); + $th = $th_row->td(); + $span = 1; + $cRound = null; + $thead->tr(); - $select = $this->db->select(); - $select->from('gems__rounds', array('gro_id_round', 'gro_id_order', 'gro_round_description')) - ->where('gro_id_track = ?', $trackId) - ->order('gro_id_order'); - - $data = $this->db->fetchAll($select); - - if (! $data) { - return $model; + if ($showMenuItem = $this->getShowMenuItem()) { + $bridge->addItemLink($showMenuItem->toActionLinkLower($this->request, $bridge)); } - $status = new Zend_Db_Expr(" - CASE - WHEN gto_completion_time IS NOT NULL THEN 'A' - WHEN gto_valid_from IS NULL THEN 'U' - WHEN gto_valid_from > CURRENT_TIMESTAMP THEN 'W' - WHEN gto_valid_until < CURRENT_TIMESTAMP THEN 'M' - ELSE 'O' - END - "); + foreach($model->getItemsOrdered() as $name) { + if ($label = $model->get($name, 'label')) { + $round = $model->get($name, 'round'); + if ($round == $cRound) { + $span++; + $class = null; + } else { + $th->append($cRound); + $th->colspan = $span; - $select = $this->db->select(); - $select->from('gems__tokens', array('gto_id_respondent_track', 'gto_id_round', 'status' => $status)) - ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) - ->where('grc_success = 1') - ->where('gto_id_track = ?', $trackId) - ->order('gto_id_respondent_track') - ->order('gto_round_order'); + $span = 1; + $cRound = $round; + $class = 'newRound'; + $th = $th_row->td(array('class' => $class)); + } - // MUtil_Echo::track($this->db->fetchAll($select)); - - $newModel = new MUtil_Model_SelectModel($select, 'tok'); - $newModel->setKeys(array('gto_id_respondent_track')); - - $transformer = new MUtil_Model_Transform_CrossTabTransformer(); - $transformer->setCrosstabFields('gto_id_round', 'status'); - - foreach ($data as $row) { - $name = 'col_' . $row['gro_id_round']; - $transformer->set($name, 'label', $row['gro_id_order'], 'description', $row['gro_round_description']); + if ($model->get($name, 'noSort')) { + $tds = $bridge->addColumn( + array( + $bridge->$name, + 'class' => array('round', MUtil_Lazy::method($this, 'getClassFor', $bridge->$name)), + 'title' => array( + MUtil_Lazy::method($this, 'getDescriptionFor', $bridge->$name), + "\n" . $model->get($name, 'description') + ), + ), + array($label, 'title' => $model->get($name, 'description'), 'class' => 'round') + ); + } else { + $tds = $bridge->addSortable($name, $label); + } + if ($class) { + $tds->appendAttrib('class', $class); + } + } } - - $newModel->addTransformer($transformer); - // MUtil_Echo::track($data); - - $joinTrans = new MUtil_Model_Transform_JoinTransformer(); - $joinTrans->addModel($newModel, array('gr2t_id_respondent_track' => 'gto_id_respondent_track')); - - $model->resetOrder(); - $model->set('gr2o_patient_nr'); - $model->set('gr2t_start_date'); - $model->addTransformer($joinTrans); - return $model; + $th->append($cRound); + $th->colspan = $span; } /** - * Returns a show menu item, if access is allowed by privileges + * Returns the class to display the answer * - * @return Gems_Menu_SubMenuItem + * @param string $value Character + * @return string */ - protected function getShowMenuItem() + public function getClassFor($value) { - return $this->findMenuItem('track', 'show-track'); + switch ($value) { + case 'A': + return 'answered'; + case 'M': + return 'missed'; + case 'O': + return 'open'; + case 'U': + return 'unknown'; + case 'W': + return 'waiting'; + default: + return 'empty'; + } } /** + * Returns the decription to add to the answer * - * @return int Return the track id if any or null + * @param string $value Character + * @return string */ - public function getTrackId() + public function getDescriptionFor($value) { - if ($this->requestCache) { - $data = $this->requestCache->getProgramParams(); - if (isset($data['gr2t_id_track'])) { - return $data['gr2t_id_track']; - } - } else { - return $this->request->getParam('gr2t_id_track'); + switch ($value) { + case 'A': + return $this->_('Answered'); + case 'M': + return $this->_('Missed deadline'); + case 'O': + return $this->_('Open - can be answered now'); + case 'U': + return $this->_('Valid from date unknown'); + case 'W': + return $this->_('Valid from date in the future'); + default: + return $this->_('Token does not exist'); } } /** - * Overrule to implement snippet specific filtering and sorting. + * Returns a show menu item, if access is allowed by privileges * - * @param MUtil_Model_ModelAbstract $model + * @return Gems_Menu_SubMenuItem */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + protected function getShowMenuItem() { - $trackId = $this->getTrackId(); - - if ($trackId) { - parent::processFilterAndSort($model); - } else { - $model->setFilter(array('1=0')); - $this->onEmpty = $this->_('No track selected...'); - } + return $this->findMenuItem('track', 'show-track'); } } Modified: trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php 2013-01-17 14:21:18 UTC (rev 1109) +++ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php 2013-01-17 17:34:11 UTC (rev 1110) @@ -66,7 +66,18 @@ $this->_('(all organizations)')); $elements[] = null; - + + $dates = array( + 'gr2t_start_date' => $this->_('Track start'), + 'gr2t_end_date' => $this->_('Track end'), + 'gto_valid_from' => $this->_('Valid from'), + 'gto_valid_until' => $this->_('Valid until'), + ); + // $dates = 'gto_valid_from'; + $this->_addPeriodSelectors($elements, $dates, 'gto_valid_from'); + + $elements[] = null; + $sql = "SELECT DISTINCT ggp_id_group, ggp_name FROM gems__groups INNER JOIN gems__surveys ON ggp_id_group = gsu_id_primary_group INNER JOIN gems__rounds ON gsu_id_survey = gro_id_survey @@ -80,5 +91,4 @@ return $elements; } - } Modified: trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php 2013-01-17 14:21:18 UTC (rev 1109) +++ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php 2013-01-17 17:34:11 UTC (rev 1110) @@ -122,6 +122,10 @@ */ public function showPercentage($part, $total) { - return sprintf($this->_('%d%%'), round($part / $total * 100, 0)); + if ($total) { + return sprintf($this->_('%d%%'), round($part / $total * 100, 0)); + } else { + return $this->_('-'); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-01-17 14:21:25
|
Revision: 1109 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1109&view=rev Author: matijsdejong Date: 2013-01-17 14:21:18 +0000 (Thu, 17 Jan 2013) Log Message: ----------- Excel export now uses autofilterParameters to get identical results Added excel export to SummaryAction SummaryAction now looks more like Harm wants it Modified Paths: -------------- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/SummaryAction.php trunk/library/classes/Gems/Menu/MenuAbstract.php trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php trunk/library/configs/db/patches.sql Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2013-01-16 18:46:11 UTC (rev 1108) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2013-01-17 14:21:18 UTC (rev 1109) @@ -53,10 +53,12 @@ * @var array Mixed key => value array for snippet initialization */ private $_autofilterExtraParameters = array( - 'browse' => true, - 'containingId' => 'autofilter_target', - 'keyboard' => true, - 'onEmpty' => 'getOnEmptyText', + 'browse' => true, + 'containingId' => 'autofilter_target', + 'keyboard' => true, + 'onEmpty' => 'getOnEmptyText', + 'sortParamAsc' => 'asrt', + 'sortParamDesc' => 'dsrt', ); /** @@ -187,14 +189,34 @@ */ public function excelAction() { + // Make sure we have all the parameters used by the model + $this->autofilterParameters = $this->autofilterParameters + $this->_autofilterExtraParameters; + // Set the request cache to use the search params from the index action $requestCache = $this->util->getRequestCache('index', true); - $filter = $requestCache->getProgramParams(); + $filter = $requestCache->getProgramParams(); + $model = $this->getModel(); - $model = $this->getModel(); + // Set any defaults. + if (isset($this->autofilterParameters['sortParamAsc'])) { + $model->setSortParamAsc($this->autofilterParameters['sortParamAsc']); + } + if (isset($this->autofilterParameters['sortParamDesc'])) { + $model->setSortParamDesc($this->autofilterParameters['sortParamDesc']); + } + // Remove all empty values (but not arrays) from the filter + $filter = array_filter($filter, function($i) { return is_array($i) || strlen($i); }); $model->applyParameters($filter); + // Add any defaults. + if (isset($this->autofilterParameters['extraFilter'])) { + $model->addFilter($this->autofilterParameters['extraFilter']); + } + if (isset($this->autofilterParameters['extraSort'])) { + $model->addSort($this->autofilterParameters['extraSort']); + } + // $this->addExcelColumns($model); // Hook to modify the model // Use $this->formatExcelData to switch between formatted and unformatted data Modified: trunk/library/classes/Gems/Default/SummaryAction.php =================================================================== --- trunk/library/classes/Gems/Default/SummaryAction.php 2013-01-16 18:46:11 UTC (rev 1108) +++ trunk/library/classes/Gems/Default/SummaryAction.php 2013-01-17 14:21:18 UTC (rev 1109) @@ -56,7 +56,10 @@ * * @var array Mixed key => value array for snippet initialization */ - protected $autofilterParameters = array('browse' => false); + protected $autofilterParameters = array( + 'browse' => false, + 'extraSort' => array('gro_id_order' => SORT_ASC), + ); /** * The snippets used for the autofilter action. @@ -110,6 +113,15 @@ (gto_valid_until >= CURRENT_TIMESTAMP OR gto_valid_until IS NULL) THEN 1 ELSE 0 END )'); + $fields['total'] = new Zend_Db_Expr('SUM( + CASE + WHEN grc_success = 1 AND ( + gto_completion_time IS NOT NULL OR + (gto_valid_from IS NOT NULL AND gto_valid_from <= CURRENT_TIMESTAMP) + ) + THEN 1 ELSE 0 END + )'); + /* $fields['future'] = new Zend_Db_Expr('SUM( CASE WHEN grc_success = 1 AND gto_completion_time IS NULL AND gto_valid_from > CURRENT_TIMESTAMP @@ -131,6 +143,7 @@ WHEN grc_success = 0 THEN 1 ELSE 0 END )'); + // */ $select = $this->db->select(); $select->from('gems__tokens', $fields) @@ -139,33 +152,40 @@ array('gro_round_description', 'gro_id_survey')) ->joinInner('gems__surveys', 'gro_id_survey = gsu_id_survey', array('gsu_survey_name', 'gsu_id_primary_group')) - ->group(array('gro_round_description', 'gro_id_order', 'gsu_survey_name', 'gsu_id_primary_group')) - ->order('gto_round_order'); + ->group(array('gro_id_order', 'gro_round_description', 'gsu_survey_name', 'gsu_id_primary_group')); + // ->order('gto_round_order'); // MUtil_Model::$verbose = true; $model = new MUtil_Model_SelectModel($select, 'summary'); - // Make sure of filter for these fields + // Make sure of filter and sort for these fields + $model->set('gro_id_order'); + $model->set('gsu_id_primary_group'); $model->set('gto_id_track'); $model->set('gto_id_organization'); - $model->set('gsu_id_primary_group'); $model->resetOrder(); $model->set('gro_round_description', 'label', $this->_('Round')); $model->set('gsu_survey_name', 'label', $this->_('Survey')); - $model->set('gsu_id_primary_group', 'label', $this->_('Filler'), - 'multiOptions', $this->util->getDbLookup()->getGroups()); - $model->set('answered', 'label', $this->_('Answered'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); $model->set('missed', 'label', $this->_('Missed'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); $model->set('open', 'label', $this->_('Open'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - $model->set('future', 'label', $this->_('Future'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - $model->set('unknown', 'label', $this->_('Unknown'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + $model->set('total', 'label', $this->_('Total'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('future', 'label', $this->_('Future'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('unknown', 'label', $this->_('Unknown'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); // $model->set('is', 'label', ' ', 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - $model->set('success', 'label', $this->_('Success'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); - $model->set('removed', 'label', $this->_('Removed'), 'tdClass', 'deleted centerAlign', - 'thClass', 'centerAlign'); + // $model->set('success', 'label', $this->_('Success'), 'tdClass', 'centerAlign', 'thClass', 'centerAlign'); + // $model->set('removed', 'label', $this->_('Removed'), 'tdClass', 'deleted centerAlign', + // 'thClass', 'centerAlign'); + $model->set('gsu_id_primary_group', 'label', $this->_('Filler'), + 'multiOptions', $this->util->getDbLookup()->getGroups()); + + if (!$this->getTrackId()) { + $model->setFilter(array('1=0')); + $this->autofilterParameters['onEmpty'] = $this->_('No track selected...'); + } + return $model; } @@ -189,4 +209,16 @@ { return $this->plural('token', 'tokens', $count); } + + /** + * + * @return int Return the track id if any or null + */ + public function getTrackId() + { + $data = $this->util->getRequestCache('index')->getProgramParams(); + if (isset($data['gto_id_track'])) { + return $data['gto_id_track']; + } + } } Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-16 18:46:11 UTC (rev 1108) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-17 14:21:18 UTC (rev 1109) @@ -322,11 +322,14 @@ { $infoPage = $this->addContainer($label); - $infoPage->addPage($this->_('Track Summary'), 'pr.plan.summary', 'summary', 'index') - ->addAutofilterAction(); - $infoPage->addPage($this->_('Track Compliance'), 'pr.plan.compliance', 'compliance', 'index') - ->addAutofilterAction(); + $page = $infoPage->addPage($this->_('Track Summary'), 'pr.plan.summary', 'summary', 'index'); + $page->addAutofilterAction(); + $page->addExcelAction(); + $page = $infoPage->addPage($this->_('Track Compliance'), 'pr.plan.compliance', 'compliance', 'index'); + $page->addAutofilterAction(); + $page->addExcelAction(); + $plans[] = $infoPage->addPage($this->_('By period'), 'pr.plan.overview', 'overview-plan', 'index'); $plans[] = $infoPage->addPage($this->_('By token'), 'pr.plan.token', 'token-plan', 'index'); $plans[] = $infoPage->addPage($this->_('By respondent'), 'pr.plan.respondent', 'respondent-plan', 'index'); Modified: trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php 2013-01-16 18:46:11 UTC (rev 1108) +++ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php 2013-01-17 14:21:18 UTC (rev 1109) @@ -47,13 +47,6 @@ class Gems_Snippets_Tracker_Summary_SummaryTableSnippet extends Gems_Snippets_ModelTableSnippetGeneric { /** - * When true (= default) the headers get sortable links. - * - * @var boolean - */ - public $sortableLinks = false; - - /** * Adds columns from the model to the bridge that creates the browse table. * * Overrule this function to add different columns to the browse table, without @@ -65,20 +58,37 @@ */ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { - $bridge->getTable()->setAlternateRowClass('odd', 'odd', 'even', 'even'); + // $bridge->getTable()->setAlternateRowClass('odd', 'odd', 'even', 'even'); - $bridge->add('gro_round_description'); - $bridge->add('answered'); - $bridge->add('missed'); - $bridge->add('open'); - $bridge->add('future'); - $bridge->add('unknown'); + // MUtil_Model::$verbose = true; + + $bridge->add( + 'gro_round_description', + $bridge->createSortLink('gro_id_order', $model->get('gro_round_description', 'label')) + ); + $bridge->addSortable('gsu_survey_name'); + $bridge->th(array($bridge->createSortLink('answered'), 'colspan' => 2))->class = 'centerAlign'; + $bridge->td($bridge->answered)->class = 'centerAlign'; + $bridge->td($this->percentageLazy($bridge->answered, $bridge->total))->class = 'rightAlign'; + $bridge->th(array($bridge->createSortLink('missed'), 'colspan' => 2))->class = 'centerAlign'; + $bridge->td($bridge->missed)->class = 'centerAlign'; + $bridge->td($this->percentageLazy($bridge->missed, $bridge->total))->class = 'rightAlign'; + $bridge->th(array($bridge->createSortLink('open'), 'colspan' => 2))->class = 'centerAlign'; + $bridge->td($bridge->open)->class = 'centerAlign'; + $bridge->td($this->percentageLazy($bridge->open, $bridge->total))->class = 'rightAlign'; + // $bridge->addSortable('answered'); + // $bridge->addSortable('missed'); + // $bridge->addSortable('open'); + // $bridge->add('future'); + // $bridge->add('unknown'); $bridge->addColumn(array('=', 'class' => 'centerAlign')); - $bridge->add('success'); - $bridge->tr(); + $bridge->addSortable('total'); + $bridge->addSortable('gsu_id_primary_group'); + // $bridge->tr(); // $bridge->add('gsu_survey_name')->colspan = 4; // $bridge->add('gsu_id_primary_group')->colspan = 2; // $bridge->addColumn(); + /* $bridge->addColumn( array( $bridge->gsu_survey_name, @@ -90,38 +100,28 @@ ) )->colspan = 7; $bridge->add('removed'); + // */ } /** * - * @return int Return the track id if any or null + * @param MUtil_Lazy_LazyInterface $part + * @param MUtil_Lazy_LazyInterface $total + * @return MUtil_Lazy_Call */ - public function getTrackId() + public function percentageLazy($part, $total) { - if ($this->requestCache) { - $data = $this->requestCache->getProgramParams(); - if (isset($data['gto_id_track'])) { - return $data['gto_id_track']; - } - } else { - return $this->request->getParam('gto_id_track'); - } + return MUtil_Lazy::method($this, 'showPercentage', $part, $total); } /** - * Overrule to implement snippet specific filtering and sorting. * - * @param MUtil_Model_ModelAbstract $model + * @param int $part + * @param int $total + * @return string */ - protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + public function showPercentage($part, $total) { - $trackId = $this->getTrackId(); - - if ($trackId) { - parent::processFilterAndSort($model); - } else { - $model->setFilter(array('1=0')); - $this->onEmpty = $this->_('No track selected...'); - } + return sprintf($this->_('%d%%'), round($part / $total * 100, 0)); } } Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2013-01-16 18:46:11 UTC (rev 1108) +++ trunk/library/configs/db/patches.sql 2013-01-17 14:21:18 UTC (rev 1109) @@ -467,3 +467,9 @@ UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.plan.summary') WHERE grl_privileges LIKE '%pr.plan.%' AND grl_privileges NOT LIKE '%pr.plan.summary%'; + +UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.plan.compliance.excel') + WHERE grl_privileges LIKE '%pr.plan.%' AND grl_privileges NOT LIKE '%pr.plan.compliance.excel%'; + +UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.plan.summary.excel') + WHERE grl_privileges LIKE '%pr.plan.%' AND grl_privileges NOT LIKE '%pr.plan.summary.excel%'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |