From: <gem...@li...> - 2012-05-31 20:11:41
|
Revision: 724 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=724&view=rev Author: michieltcs Date: 2012-05-31 20:11:35 +0000 (Thu, 31 May 2012) Log Message: ----------- Allow export of multiple respondents Modified Paths: -------------- trunk/library/classes/Gems/Default/RespondentExportAction.php Modified: trunk/library/classes/Gems/Default/RespondentExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-05-31 20:05:14 UTC (rev 723) +++ trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-05-31 20:11:35 UTC (rev 724) @@ -72,6 +72,7 @@ $element = new Zend_Form_Element_Text('id'); $element->setLabel($this->_('Respondent number')); + $element->setDescription($this->_('Separate multiple respondents with a comma (,)')); $form->addElement($element); $element = new Zend_Form_Element_Checkbox('group'); @@ -262,6 +263,7 @@ } } + $this->html->h2($respondentId); $this->html[] = $bridge->getTable(); $this->html->hr(); @@ -276,9 +278,9 @@ /** * Renders the entire report (including layout) * - * @param string $respondentId + * @param string[] $respondentId */ - protected function _render($respondentId) + protected function _render($respondents) { $this->html = new MUtil_Html_Sequence(); $this->html->h1($this->_('Respondent report')); @@ -295,7 +297,11 @@ $this->html->br(); - $this->_exportRespondent($respondentId); + foreach ($respondents as $respondentId) { + $this->_exportRespondent($respondentId); + + $this->html->div(array('style' => 'height: 100px')); + } $this->escort->menu->setVisible(false); if ($this->escort instanceof Gems_Project_Layout_MultiLayoutInterface) { @@ -338,11 +344,9 @@ $form->populate($request->getParams()); if ($request->isPost()) { - $respondentId = $request->getParam('id'); + $respondents = explode(',', $request->getParam('id')); - if (!empty($respondentId)) { - $this->_render($respondentId); - } + $this->_render($respondents); } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |