From: <gem...@li...> - 2013-01-16 18:46:23
|
Revision: 1108 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1108&view=rev Author: matijsdejong Date: 2013-01-16 18:46:11 +0000 (Wed, 16 Jan 2013) Log Message: ----------- SelectModel now has some minimal intelligence as to contents New Summary controller for tracks Modified Paths: -------------- trunk/library/classes/Gems/Menu/MenuAbstract.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php trunk/library/classes/MUtil/Model/ModelAbstract.php trunk/library/classes/MUtil/Model/SelectModel.php trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php trunk/library/configs/db/patches.sql trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Added Paths: ----------- trunk/library/classes/Gems/Default/SummaryAction.php trunk/library/classes/Gems/Snippets/Tracker/Summary/ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php trunk/library/controllers/SummaryController.php Copied: trunk/library/classes/Gems/Default/SummaryAction.php (from rev 1107, trunk/library/classes/Gems/Default/ComplianceAction.php) =================================================================== --- trunk/library/classes/Gems/Default/SummaryAction.php (rev 0) +++ trunk/library/classes/Gems/Default/SummaryAction.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -0,0 +1,192 @@ +<?php + +/** + * Copyright (c) 2012, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package Gems + * @subpackage Default + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ComplianceAction.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class Gems_Default_SummaryAction extends Gems_Controller_ModelSnippetActionAbstract +{ + /** + * The parameters used for the autofilter action. + * + * When the value is a function name of that object, then that functions is executed + * with the array key as single parameter and the return value is set as the used value + * - unless the key is an integer in which case the code is executed but the return value + * is not stored. + * + * @var array Mixed key => value array for snippet initialization + */ + protected $autofilterParameters = array('browse' => false); + + /** + * The snippets used for the autofilter action. + * + * @var mixed String or array of snippets name + */ + protected $autofilterSnippets = 'Tracker_Summary_SummaryTableSnippet'; + + /** + * + * @var Zend_Db_Adapter_Abstract + */ + public $db; + + /** + * The snippets used for the index action, before those in autofilter + * + * @var mixed String or array of snippets name + */ + protected $indexStartSnippets = array('Generic_ContentTitleSnippet', 'Tracker_Summary_SummarySearchFormSnippet'); + + /** + * Creates a model for getModel(). Called only for each new $action. + * + * The parameters allow you to easily adapt the model to the current action. The $detailed + * parameter was added, because the most common use of action is a split between detailed + * and summarized actions. + * + * @param boolean $detailed True when the current action is not in $summarizedActions. + * @param string $action The current action. + * @return MUtil_Model_ModelAbstract + */ + public function createModel($detailed, $action) + { + $select = $this->db->select(); + + $fields['answered'] = new Zend_Db_Expr("SUM( + CASE + WHEN grc_success = 1 AND gto_completion_time IS NOT NULL + THEN 1 ELSE 0 END + )"); + $fields['missed'] = new Zend_Db_Expr('SUM( + CASE + WHEN grc_success = 1 AND gto_completion_time IS NULL AND gto_valid_until < CURRENT_TIMESTAMP + THEN 1 ELSE 0 END + )'); + $fields['open'] = new Zend_Db_Expr('SUM( + CASE + WHEN grc_success = 1 AND gto_completion_time IS NULL AND + gto_valid_from <= CURRENT_TIMESTAMP AND + (gto_valid_until >= CURRENT_TIMESTAMP OR gto_valid_until IS NULL) + 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 + THEN 1 ELSE 0 END + )'); + $fields['unknown'] = new Zend_Db_Expr('SUM( + CASE + WHEN grc_success = 1 AND gto_completion_time IS NULL AND gto_valid_from IS NULL + THEN 1 ELSE 0 END + )'); + $fields['is'] = new Zend_Db_Expr("'='"); + $fields['success'] = new Zend_Db_Expr('SUM( + CASE + WHEN grc_success = 1 + THEN 1 ELSE 0 END + )'); + $fields['removed'] = new Zend_Db_Expr('SUM( + CASE + WHEN grc_success = 0 + THEN 1 ELSE 0 END + )'); + + $select = $this->db->select(); + $select->from('gems__tokens', $fields) + ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) + ->joinInner('gems__rounds', 'gto_id_round = gro_id_round', + 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'); + + // MUtil_Model::$verbose = true; + $model = new MUtil_Model_SelectModel($select, 'summary'); + + // Make sure of filter for these fields + $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('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'); + + return $model; + } + + /** + * 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 + * @return $string + */ + public function getTopic($count = 1) + { + return $this->plural('token', 'tokens', $count); + } +} Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-16 12:56:22 UTC (rev 1107) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -322,8 +322,10 @@ { $infoPage = $this->addContainer($label); - $infoPage->addPage($this->_('Compliance'), 'pr.plan.compliance', 'compliance', 'index') + $infoPage->addPage($this->_('Track Summary'), 'pr.plan.summary', 'summary', 'index') ->addAutofilterAction(); + $infoPage->addPage($this->_('Track Compliance'), 'pr.plan.compliance', 'compliance', 'index') + ->addAutofilterAction(); $plans[] = $infoPage->addPage($this->_('By period'), 'pr.plan.overview', 'overview-plan', 'index'); $plans[] = $infoPage->addPage($this->_('By token'), 'pr.plan.token', 'token-plan', 'index'); Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-16 12:56:22 UTC (rev 1107) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -44,7 +44,7 @@ * @license New BSD License * @since Class available since version 1.5 */ -class Gems_Snippets_Tracker_Compliance_ComplianceSearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet +class Gems_Snippets_Tracker_Compliance_ComplianceSearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet { /** * Returns a text element for autosearch. Can be overruled. @@ -61,7 +61,7 @@ $this->util->getTrackData()->getAllTracks(), $this->_('(select a track)')); - $elements[] = $this->_createSelectElement('gr2o_id_organization', + $elements[] = $this->_createSelectElement('gr2t_id_organization', $this->util->getDbLookup()->getOrganizationsWithRespondents(), $this->_('(all organizations)')); Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-16 12:56:22 UTC (rev 1107) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -93,8 +93,6 @@ END "); - // $labels = $model->getCol('label'); - $select = $this->db->select(); $select->from('gems__tokens', array('gto_id_respondent_track', 'gto_id_round', 'status' => $status)) ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) @@ -107,10 +105,6 @@ $newModel = new MUtil_Model_SelectModel($select, 'tok'); $newModel->setKeys(array('gto_id_respondent_track')); - // $model->addLeftTable('gems__tokens', array('gr2t_id_track' => 'gto_id_track')); - // $model->addLeftTable('gems__reception_codes', array('gto_reception_code' => 'grc_id_reception_code')); - // $model->addFilter(array('grc_success' => 1)); - // $newModel = $model; $transformer = new MUtil_Model_Transform_CrossTabTransformer(); $transformer->setCrosstabFields('gto_id_round', 'status'); @@ -118,7 +112,6 @@ foreach ($data as $row) { $name = 'col_' . $row['gro_id_round']; $transformer->set($name, 'label', $row['gro_id_order'], 'description', $row['gro_round_description']); - // break; } $newModel->addTransformer($transformer); @@ -132,8 +125,6 @@ $model->set('gr2t_start_date'); $model->addTransformer($joinTrans); return $model; - - return $newModel; } /** Copied: trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php (from rev 1107, trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php) =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -0,0 +1,84 @@ +<?php + +/** + * Copyright (c) 2012, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ComplianceSearchFormSnippet.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Snippets_Tracker_Summary_SummarySearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet +{ + /** + * Returns a text element for autosearch. Can be overruled. + * + * The form / html elements to search on. Elements can be grouped by inserting null's between them. + * That creates a distinct group of elements + * + * @param array $data The $form field values (can be usefull, but no need to set them) + * @return array Of Zend_Form_Element's or static tekst to add to the html or null for group breaks. + */ + protected function getAutoSearchElements(array $data) + { + $elements[] = $this->_createSelectElement('gto_id_track', + $this->util->getTrackData()->getAllTracks(), + $this->_('(select a track)')); + + $elements[] = $this->_createSelectElement('gto_id_organization', + $this->util->getDbLookup()->getOrganizationsWithRespondents(), + $this->_('(all organizations)')); + + $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; + } + +} Copied: trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php (from rev 1107, trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php) =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -0,0 +1,127 @@ +<?php + +/** + * Copyright (c) 2012, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ComplianceTableSnippet.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Snippets_Tracker_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 + * having to recode the core table building code. + * + * @param MUtil_Model_TableBridge $bridge + * @param MUtil_Model_ModelAbstract $model + * @return void + */ + protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) + { + $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'); + $bridge->addColumn(array('=', 'class' => 'centerAlign')); + $bridge->add('success'); + $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, + MUtil_Html::create('em', ' - ', $bridge->gsu_id_primary_group) + ), + array( + $model->get('gsu_survey_name', 'label'), + MUtil_Html::create('em', ' - ', $model->get('gsu_id_primary_group', 'label')) + ) + )->colspan = 7; + $bridge->add('removed'); + } + + /** + * + * @return int Return the track id if any or null + */ + public function getTrackId() + { + 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'); + } + } + + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + $trackId = $this->getTrackId(); + + if ($trackId) { + parent::processFilterAndSort($model); + } else { + $model->setFilter(array('1=0')); + $this->onEmpty = $this->_('No track selected...'); + } + } +} Modified: trunk/library/classes/MUtil/Model/ModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-16 12:56:22 UTC (rev 1107) +++ trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -937,7 +937,7 @@ public function has($name, $subkey = null) { if (null === $subkey) { - return isset($this->_model[$name]); + return array_key_exists($name, $this->_model); } else { return isset($this->_model[$name][$subkey]); } @@ -1258,27 +1258,32 @@ $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->_model[$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->_model[$name][$key][] = $value; + } else { + // Otherwise extract subkey + $pos = strpos($key, '['); + $subkey = substr($key, $pos + 1, -1); + $key = substr($key, 0, $pos); + + $this->_model[$name][$key][$subkey] = $value; + } } else { - // Otherwise extract subkey - $pos = strpos($key, '['); - $subkey = substr($key, $pos + 1, -1); - $key = substr($key, 0, $pos); - - $this->_model[$name][$key][$subkey] = $value; + $this->_model[$name][$key] = $value; } - } else { - $this->_model[$name][$key] = $value; } + } elseif (!array_key_exists($name, $this->_model)) { + // Make sure this key occurs + $this->_model[$name] = array(); } - //Now set the order (repeat always, because order can be changed later on) + // Now set the order (repeat always, because order can be changed later on) if (isset($this->_model[$name]['order'])) { $order = $this->_model[$name]['order']; } elseif (isset($this->_model_order[$name]) && is_int($this->_model_order[$name])) { Modified: trunk/library/classes/MUtil/Model/SelectModel.php =================================================================== --- trunk/library/classes/MUtil/Model/SelectModel.php 2013-01-16 12:56:22 UTC (rev 1107) +++ trunk/library/classes/MUtil/Model/SelectModel.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -1,39 +1,48 @@ <?php - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - + /** - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 - * @package MUtil + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @package MUtil * @subpackage Model + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ + +/** + * A model that takes any Zend_Db_Select statement as a source + * + * @package MUtil + * @subpackage Model + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 + */ class MUtil_Model_SelectModel extends MUtil_Model_DatabaseModelAbstract { /** @@ -45,12 +54,30 @@ */ public $canCreate = false; + /** + * + * @var Zend_Db_Select + */ private $_select; + /** + * + * @param Zend_Db_Select $select + * @param string $name Optiona name + */ public function __construct(Zend_Db_Select $select, $name = null) { $this->_select = $select; + // Make sure the columns are known to the model + foreach ($select->getPart(Zend_Db_Select::COLUMNS) as $column) { + if (isset($column[2])) { + $this->set($column[2]); + } elseif (is_string($column[1])) { + $this->set($column[1]); + } + } + if (null === $name) { $name = 'rnd' . rand(10000, 999999); } @@ -58,21 +85,45 @@ parent::__construct($name); } + /** + * Delete items from the model + * + * @param mixed $filter True to use the stored filter, array to specify a different filter + * @return int The number of items deleted + */ public function delete($filter = true) { throw new Exception('Cannot delete ' . __CLASS__ . ' data.'); } + /** + * The database adapter used by the model. + * + * @return Zend_Db_Adapter_Abstract + */ public function getAdapter() { return $this->_select->getAdapter(); } + /** + * The select object where we get the query from. + * + * @return Zend_Db_Table_Select + */ public function getSelect() { return clone $this->_select; } + /** + * Save a single model item. + * + * @param array $newValues The values to store for a single model item. + * @param array $filter If the filter contains old key values these are used + * to decide on update versus insert. + * @return array The values as they are after saving (they may change). + */ public function save(array $newValues, array $filter = null) { throw new Exception('Cannot save ' . __CLASS__ . ' data.'); Modified: trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php =================================================================== --- trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2013-01-16 12:56:22 UTC (rev 1107) +++ trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -121,7 +121,7 @@ } else { foreach($model->getItemsOrdered() as $name) { if ($label = $model->get($name, 'label')) { - $bridge->addColumn($bridge->$name, $label); + $bridge->add($name, $label); } } } Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2013-01-16 12:56:22 UTC (rev 1107) +++ trunk/library/configs/db/patches.sql 2013-01-16 18:46:11 UTC (rev 1108) @@ -465,3 +465,5 @@ UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.plan.compliance') WHERE grl_privileges LIKE '%pr.plan.%' AND grl_privileges NOT LIKE '%pr.plan.compliance%'; +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%'; Copied: trunk/library/controllers/SummaryController.php (from rev 1107, trunk/library/controllers/ComplianceController.php) =================================================================== --- trunk/library/controllers/SummaryController.php (rev 0) +++ trunk/library/controllers/SummaryController.php 2013-01-16 18:46:11 UTC (rev 1108) @@ -0,0 +1,50 @@ +<?php + +/** + * Copyright (c) 2012, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package Gems + * @subpackage Default + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: ComplianceController.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class SummaryController extends Gems_Default_SummaryAction +{ + +} 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-16 12:56:22 UTC (rev 1107) +++ trunk/library/languages/default-en.po 2013-01-16 18:46:11 UTC (rev 1108) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-15 19:02+0100\n" +"POT-Creation-Date: 2013-01-16 19:26+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:381 -#: classes/Gems/Menu/MenuAbstract.php:394 +#: classes/Gems/Menu/MenuAbstract.php:383 +#: classes/Gems/Menu/MenuAbstract.php:396 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:390 -#: classes/Gems/Menu/MenuAbstract.php:472 snippets/AddTracksSnippet.php:238 +#: classes/Gems/Menu/MenuAbstract.php:392 +#: classes/Gems/Menu/MenuAbstract.php:474 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:397 -#: classes/Gems/Menu/MenuAbstract.php:459 +#: classes/Gems/Menu/MenuAbstract.php:399 +#: classes/Gems/Menu/MenuAbstract.php:461 #: 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:354 +#: classes/Gems/Menu.php:593 classes/Gems/Menu/MenuAbstract.php:356 msgid "Project" msgstr "Project" @@ -817,7 +817,6 @@ msgstr "End date" #: classes/Gems/Default/ComplianceAction.php:98 -#: classes/Gems/Menu/MenuAbstract.php:325 msgid "Compliance" msgstr "Compliance" @@ -1222,6 +1221,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/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 @@ -1757,6 +1757,7 @@ #: 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 msgid "(all organizations)" msgstr "(all organizations)" @@ -2054,7 +2055,7 @@ msgstr "Session content" #: classes/Gems/Default/ProjectInformationAction.php:226 -#: classes/Gems/Menu/MenuAbstract.php:355 +#: classes/Gems/Menu/MenuAbstract.php:357 msgid "Session" msgstr "Session" @@ -2524,7 +2525,7 @@ msgstr[1] "sources" #: classes/Gems/Default/SourceAction.php:249 -#: classes/Gems/Menu/MenuAbstract.php:450 +#: classes/Gems/Menu/MenuAbstract.php:452 msgid "Survey Sources" msgstr "Survey Sources" @@ -2606,6 +2607,68 @@ 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/Email/OneMailForm.php:55 +#: classes/Gems/Export/RespondentExport.php:157 +#: classes/Gems/Menu/MenuAbstract.php:497 +#: 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/Selector/TokenByGroupDateSelector.php:139 +msgid "Answered" +msgstr "Answered" + +#: classes/Gems/Default/SummaryAction.php:160 +#: classes/Gems/Default/TokenPlanAction.php:327 +#: 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/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:163 +#: classes/Gems/Util/Translated.php:233 +msgid "Unknown" +msgstr "Unknown" + +#: 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 +msgid "Summary" +msgstr "Summary" + +#: classes/Gems/Default/SummaryAction.php:190 +#: classes/Gems/Default/TokenPlanAction.php:480 +#: classes/Gems/Default/TrackAction.php:450 +#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 +msgid "token" +msgid_plural "tokens" +msgstr[0] "token" +msgstr[1] "tokens" + #: classes/Gems/Default/SurveyAction.php:72 #: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:179 msgid "Add survey" @@ -2912,19 +2975,8 @@ msgid "Yet to Answer" msgstr "Yet to Answer" -#: classes/Gems/Default/TokenPlanAction.php:326 -#: classes/Gems/Selector/TokenByGroupDateSelector.php:139 -msgid "Answered" -msgstr "Answered" - -#: classes/Gems/Default/TokenPlanAction.php:327 -#: classes/Gems/Selector/TokenByGroupDateSelector.php:129 -#: classes/Gems/Tracker/Token.php:1038 -#: snippets/RespondentTokenTabsSnippet.php:68 -msgid "Missed" -msgstr "Missed" - #: classes/Gems/Default/TokenPlanAction.php:341 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:79 msgid "(all fillers)" msgstr "(all fillers)" @@ -2940,14 +2992,6 @@ msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:480 -#: classes/Gems/Default/TrackAction.php:450 -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 -msgid "token" -msgid_plural "tokens" -msgstr[0] "token" -msgstr[1] "tokens" - #: classes/Gems/Default/TokenPlanAction.php:485 msgid "Token planning" msgstr "Token planning" @@ -3175,7 +3219,7 @@ msgstr[1] "fields" #: classes/Gems/Default/TrackFieldsAction.php:175 -#: classes/Gems/Menu/MenuAbstract.php:475 +#: classes/Gems/Menu/MenuAbstract.php:477 msgid "Fields" msgstr "Fields" @@ -3304,7 +3348,7 @@ msgstr[1] "rounds" #: classes/Gems/Default/TrackRoundsAction.php:227 -#: classes/Gems/Menu/MenuAbstract.php:483 +#: classes/Gems/Menu/MenuAbstract.php:485 msgid "Rounds" msgstr "Rounds" @@ -3384,11 +3428,6 @@ msgid "BBCode info page" msgstr "BBCode info page" -#: classes/Gems/Email/Mailer.php:235 classes/Gems/Email/TemplateMailer.php:360 -#, php-format -msgid "Invalid e-mail address '%s'." -msgstr "Invalid e-mail address '%s'." - #: classes/Gems/Email/MailTemplateForm.php:56 msgid "Send (test)" msgstr "Send (test)" @@ -3430,13 +3469,6 @@ msgid "Survey cannot be taken at this moment." msgstr "Survey cannot be taken at this moment." -#: classes/Gems/Email/OneMailForm.php:55 -#: classes/Gems/Export/RespondentExport.php:157 -#: classes/Gems/Menu/MenuAbstract.php:495 -#: classes/Gems/Tracker/Model/StandardTokenModel.php:196 -msgid "Round" -msgstr "Round" - #: classes/Gems/Email/OneMailForm.php:58 #: classes/Gems/Tracker/Model/StandardTokenModel.php:199 msgid "Last contact" @@ -3462,6 +3494,11 @@ msgid "Sent %d e-mails, updated %d tokens." msgstr "Sent %d e-mails, updated %d tokens." +#: classes/Gems/Email/TemplateMailer.php:360 +#, php-format +msgid "Invalid e-mail address '%s'." +msgstr "Invalid e-mail address '%s'." + #: classes/Gems/Event/Survey/BeforeAnswering/GetPreviousAnswers.php:64 msgid "Previous Version Answers Lookup" msgstr "Previous Version Answers Lookup" @@ -3569,77 +3606,85 @@ msgid "Templates" msgstr "Templates" -#: classes/Gems/Menu/MenuAbstract.php:328 +#: classes/Gems/Menu/MenuAbstract.php:325 +msgid "Track Summary" +msgstr "Track Summary" + +#: classes/Gems/Menu/MenuAbstract.php:327 +msgid "Track Compliance" +msgstr "Track Compliance" + +#: classes/Gems/Menu/MenuAbstract.php:330 msgid "By period" msgstr "By period" -#: classes/Gems/Menu/MenuAbstract.php:329 +#: classes/Gems/Menu/MenuAbstract.php:331 msgid "By token" msgstr "By token" -#: classes/Gems/Menu/MenuAbstract.php:330 +#: classes/Gems/Menu/MenuAbstract.php:332 msgid "By respondent" msgstr "By patient" -#: classes/Gems/Menu/MenuAbstract.php:334 +#: classes/Gems/Menu/MenuAbstract.php:336 msgid "Bulk mail" msgstr "Bulk mail" -#: classes/Gems/Menu/MenuAbstract.php:352 +#: classes/Gems/Menu/MenuAbstract.php:354 msgid "Errors" msgstr "Errors" -#: classes/Gems/Menu/MenuAbstract.php:353 +#: classes/Gems/Menu/MenuAbstract.php:355 msgid "PHP" msgstr "PHP" -#: classes/Gems/Menu/MenuAbstract.php:356 +#: classes/Gems/Menu/MenuAbstract.php:358 msgid "Maintenance mode" msgstr "Maintenance mode" -#: classes/Gems/Menu/MenuAbstract.php:357 +#: classes/Gems/Menu/MenuAbstract.php:359 msgid "Clean cache" msgstr "Clean cache" -#: classes/Gems/Menu/MenuAbstract.php:424 +#: classes/Gems/Menu/MenuAbstract.php:426 msgid "Reset password" msgstr "Reset password" -#: classes/Gems/Menu/MenuAbstract.php:451 +#: classes/Gems/Menu/MenuAbstract.php:453 msgid "Check status" msgstr "Check status" -#: classes/Gems/Menu/MenuAbstract.php:452 +#: classes/Gems/Menu/MenuAbstract.php:454 msgid "Synchronize surveys" msgstr "Synchronize surveys" -#: classes/Gems/Menu/MenuAbstract.php:453 -#: classes/Gems/Menu/MenuAbstract.php:466 +#: classes/Gems/Menu/MenuAbstract.php:455 +#: classes/Gems/Menu/MenuAbstract.php:468 msgid "Check is answered" msgstr "Check is answered" -#: classes/Gems/Menu/MenuAbstract.php:454 +#: classes/Gems/Menu/MenuAbstract.php:456 msgid "Check attributes" msgstr "Check attributes" -#: classes/Gems/Menu/MenuAbstract.php:455 +#: classes/Gems/Menu/MenuAbstract.php:457 msgid "Synchronize all surveys" msgstr "Synchronize all surveys" -#: classes/Gems/Menu/MenuAbstract.php:456 -#: classes/Gems/Menu/MenuAbstract.php:467 +#: classes/Gems/Menu/MenuAbstract.php:458 +#: classes/Gems/Menu/MenuAbstract.php:469 msgid "Check all is answered" msgstr "Check all is answered" -#: classes/Gems/Menu/MenuAbstract.php:463 +#: classes/Gems/Menu/MenuAbstract.php:465 msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:501 +#: classes/Gems/Menu/MenuAbstract.php:503 msgid "Check assignments" msgstr "Check assignments" -#: classes/Gems/Menu/MenuAbstract.php:504 +#: classes/Gems/Menu/MenuAbstract.php:506 msgid "Check all assignments" msgstr "Check all assignments" @@ -3862,10 +3907,12 @@ msgstr "Unknown respondent %s" #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:62 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:62 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..." @@ -3953,14 +4000,6 @@ msgid "Completed" msgstr "Completed" -#: classes/Gems/Tracker/Token.php:1040 classes/Gems/Tracker/Token.php:1042 -msgid "Future" -msgstr "Future" - -#: classes/Gems/Tracker/Token.php:1044 -msgid "Open" -msgstr "Open" - #: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:135 msgid "No surveys were changed." msgstr "No surveys were changed." @@ -4733,10 +4772,6 @@ 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." 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-16 12:56:22 UTC (rev 1107) +++ trunk/library/languages/default-nl.po 2013-01-16 18:46:11 UTC (rev 1108) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-15 19:03+0100\n" +"POT-Creation-Date: 2013-01-16 19:27+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:381 -#: classes/Gems/Menu/MenuAbstract.php:394 +#: classes/Gems/Menu/MenuAbstract.php:383 +#: classes/Gems/Menu/MenuAbstract.php:396 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:390 -#: classes/Gems/Menu/MenuAbstract.php:472 snippets/AddTracksSnippet.php:238 +#: classes/Gems/Menu/MenuAbstract.php:392 +#: classes/Gems/Menu/MenuAbstract.php:474 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:397 -#: classes/Gems/Menu/MenuAbstract.php:459 +#: classes/Gems/Menu/MenuAbstract.php:399 +#: classes/Gems/Menu/MenuAbstract.php:461 #: 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:354 +#: classes/Gems/Menu.php:593 classes/Gems/Menu/MenuAbstract.php:356 msgid "Project" msgstr "Project" @@ -819,7 +819,6 @@ msgstr "Einddatum" #: classes/Gems/Default/ComplianceAction.php:98 -#: classes/Gems/Menu/MenuAbstract.php:325 msgid "Compliance" msgstr "Voortgang" @@ -1227,6 +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/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 @@ -1766,6 +1766,7 @@ #: 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 msgid "(all organizations)" msgstr "(alle organisaties)" @@ -2065,7 +2066,7 @@ msgstr "Sessie inhoud" #: classes/Gems/Default/ProjectInformationAction.php:226 -#: classes/Gems/Menu/MenuAbstract.php:355 +#: classes/Gems/Menu/MenuAbstract.php:357 msgid "Session" msgstr "Sessie" @@ -2538,7 +2539,7 @@ msgstr[1] "bronnen" #: classes/Gems/Default/SourceAction.php:249 -#: classes/Gems/Menu/MenuAbstract.php:450 +#: classes/Gems/Menu/MenuAbstract.php:452 msgid "Survey Sources" msgstr "Bronnen" @@ -2622,6 +2623,68 @@ msgid "You are not allowed to change this password." msgstr "U mag dit wachtwoord niet wijzigen." +#: classes/Gems/Default/SummaryAction.php:154 +#: classes/Gems/Email/OneMailForm.php:55 +#: classes/Gems/Export/RespondentExport.php:157 +#: classes/Gems/Menu/MenuAbstract.php:497 +#: 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/Selector/TokenByGroupDateSelector.php:139 +msgid "Answered" +msgstr "Beantwoord" + +#: classes/Gems/Default/SummaryAction.php:160 +#: classes/Gems/Default/TokenPlanAction.php:327 +#: 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/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:163 +#: classes/Gems/Util/Translated.php:233 +msgid "Unknown" +msgstr "Onbekend" + +#: 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 +msgid "Summary" +msgstr "Samenvatting" + +#: classes/Gems/Default/SummaryAction.php:190 +#: classes/Gems/Default/TokenPlanAction.php:480 +#: classes/Gems/Default/TrackAction.php:450 +#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 +msgid "token" +msgid_plural "tokens" +msgstr[0] "kenmerk" +msgstr[1] "kenmerken" + #: classes/Gems/Default/SurveyAction.php:72 #: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:179 msgid "Add survey" @@ -2931,19 +2994,8 @@ msgid "Yet to Answer" msgstr "Nog te beantwoorden" -#: classes/Gems/Default/TokenPlanAction.php:326 -#: classes/Gems/Selector/TokenByGroupDateSelector.php:139 -msgid "Answered" -msgstr "Beantwoord" - -#: classes/Gems/Default/TokenPlanAction.php:327 -#: classes/Gems/Selector/TokenByGroupDateSelector.php:129 -#: classes/Gems/Tracker/Token.php:1038 -#: snippets/RespondentTokenTabsSnippet.php:68 -msgid "Missed" -msgstr "Gemist" - #: classes/Gems/Default/TokenPlanAction.php:341 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:79 msgid "(all fillers)" msgstr "(alle invullers)" @@ -2959,14 +3011,6 @@ msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:480 -#: classes/Gems/Default/TrackAction.php:450 -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 -msgid "token" -msgid_plural "tokens" -msgstr[0] "kenmerk" -msgstr[1] "kenmerken" - #: classes/Gems/Default/TokenPlanAction.php:485 msgid "Token planning" msgstr "Per kenmerk plannen" @@ -3199,7 +3243,7 @@ msgstr[1] "velden" #: classes/Gems/Default/TrackFieldsAction.php:175 -#: classes/Gems/Menu/MenuAbstract.php:475 +#: classes/Gems/Menu/MenuAbstract.php:477 msgid "Fields" msgstr "Velden" @@ -3331,7 +3375,7 @@ msgstr[1] "rondes" #: classes/Gems/Default/TrackRoundsAction.php:227 -#: classes/Gems/Menu/MenuAbstract.php:483 +#: classes/Gems/Menu/MenuAbstract.php:485 msgid "Rounds" msgstr "Rondes" @@ -3411,11 +3455,6 @@ msgid "BBCode info page" msgstr "BBCode info pagina" -#: classes/Gems/Email/Mailer.php:235 classes/Gems/Email/TemplateMailer.php:360 -#, php-format -msgid "Invalid e-mail address '%s'." -msgstr "Ongeldig email adres '%s'." - #: classes/Gems/Email/MailTemplateForm.php:56 msgid "Send (test)" msgstr "Verstuur (test)" @@ -3457,13 +3496,6 @@ msgid "Survey cannot be taken at this moment." msgstr "Deze vragenlijst kan op dit moment niet afgenomen worden." -#: classes/Gems/Email/OneMailForm.php:55 -#: classes/Gems/Export/RespondentExport.php:157 -#: classes/Gems/Menu/MenuAbstract.php:495 -#: classes/Gems/Tracker/Model/StandardTokenModel.php:196 -msgid "Round" -msgstr "Ronde" - #: classes/Gems/Email/OneMailForm.php:58 #: classes/Gems/Tracker/Model/StandardTokenModel.php:199 msgid "Last contact" @@ -3489,6 +3521,11 @@ msgid "Sent %d e-mails, updated %d tokens." msgstr "%d emails verzonden en %d kenmerken bijgewerkt." +#: classes/Gems/Email/TemplateMailer.php:360 +#, php-format +msgid "Invalid e-mail address '%s'." +msgstr "Ongeldig email adres '%s'." + #: classes/Gems/Event/Survey/BeforeAnswering/GetPreviousAnswers.php:64 msgid "Previous Version Answers Lookup" msgstr "Antwoorden overnemen van vorige keer" @@ -3597,77 +3634,85 @@ msgid "Templates" msgstr "Sjablonen" -#: classes/Gems/Menu/MenuAbstract.php:328 +#: classes/Gems/Menu/MenuAbstract.php:325 +msgid "Track Summary" +msgstr "Traject Samenvatting" + +#: classes/Gems/Menu/MenuAbstract.php:327 +msgid "Track Compliance" +msgstr "Traject Voortgang" + +#: classes/Gems/Menu/MenuAbstract.php:330 msgid "By period" msgstr "Per periode" -#: classes/Gems/Menu/MenuAbstract.php:329 +#: classes/Gems/Menu/MenuAbstract.php:331 msgid "By token" msgstr "Per kenmerk" -#: classes/Gems/Menu/MenuAbstract.php:330 +#: classes/Gems/Menu/MenuAbstract.php:332 msgid "By respondent" msgstr "Per patiënt" -#: classes/Gems/Menu/MenuAbstract.php:334 +#: classes/Gems/Menu/MenuAbstract.php:336 msgid "Bulk mail" msgstr "Bulk mail" -#: classes/Gems/Menu/MenuAbstract.php:352 +#: classes/Gems/Menu/MenuAbstract.php:354 msgid "Errors" msgstr "Foutmeldingen" -#: classes/Gems/Menu/MenuAbstract.php:353 +#: classes/Gems/Menu/MenuAbstract.php:355 msgid "PHP" msgstr "PHP" -#: classes/Gems/Menu/MenuAbstract.php:356 +#: classes/Gems/Menu/MenuAbstract.php:358 msgid "Maintenance mode" msgstr "Onderhoudsmodus" -#: classes/Gems/Menu/MenuAbstract.php:357 +#: classes/Gems/Menu/MenuAbstract.php:359 msgid "Clean cache" msgstr "Cache opruimen" -#: classes/Gems/Menu/MenuAbstract.php:424 +#: classes/Gems/Menu/MenuAbstract.php:426 msgid "Reset password" msgstr "Wijzig wachtwoord" -#: classes/Gems/Menu/MenuAbstract.php:451 +#: classes/Gems/Menu/MenuAbstract.php:453 msgid "Check status" msgstr "Status controle" -#: classes/Gems/Menu/MenuAbstract.php:452 +#: classes/Gems/Menu/MenuAbstract.php:454 msgid "Synchronize surveys" msgstr "Synchroniseer vragenlijsten" -#: classes/Gems/Menu/MenuAbstract.php:453 -#: classes/Gems/Menu/MenuAbstract.php:466 +#: classes/Gems/Menu/MenuAbstract.php:455 +#: classes/Gems/Menu/MenuAbstract.php:468 msgid "Check is answered" msgstr "Controleer op antwoorden" -#: classes/Gems/Menu/MenuAbstract.php:454 +#: classes/Gems/Menu/MenuAbstract.php:456 msgid "Check attributes" msgstr "Controleer attributen" -#: classes/Gems/Menu/MenuAbstract.php:455 +#: classes/Gems/Menu/MenuAbstract.php:457 msgid "Synchronize all surveys" msgstr "Synchroniseer alle vragenlijsten" -#: classes/Gems/Menu/MenuAbstract.php:456 -#: classes/Gems/Menu/MenuAbstract.php:467 +#: classes/Gems/Menu/MenuAbstract.php:458 +#: classes/Gems/Menu/MenuAbstract.php:469 msgid "Check all is answered" msgstr "Controleer alles op antwoorden" -#: classes/Gems/Menu/MenuAbstract.php:463 +#: classes/Gems/Menu/MenuAbstract.php:465 msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:501 +#: classes/Gems/Menu/MenuAbstract.php:503 msgid "Check assignments" msgstr "Controleer toewijzingen" -#: classes/Gems/Menu/MenuAbstract.php:504 +#: classes/Gems/Menu/MenuAbstract.php:506 msgid "Check all assignments" msgstr "Controleer alle toewijzingen" @@ -3890,10 +3935,12 @@ msgstr "Onbekende patiënt %s" #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:62 +#: classes/Gems/Snippets/Tracker/Summary/SummarySearchFormSnippet.php:62 msgid "(select a track)" msgstr "(selecteer een traject)" #: classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php:178 +#: classes/Gems/Snippets/Tracker/Summary/SummaryTableSnippet.php:124 msgid "No track selected..." msgstr "Geen traject geselecteerd..." @@ -3983,14 +4030,6 @@ msgid "Completed" msgstr "Ingevuld" -#: classes/Gems/Tracker/Token.php:1040 classes/Gems/Tracker/Token.php:1042 -msgid "Future" -msgstr "Toekomstig" - -#: classes/Gems/Tracker/Token.php:1044 -msgid "Open" -msgstr "Open" - #: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:135 msgid "No surveys were changed... [truncated message content] |