|
From: <gem...@li...> - 2011-11-01 11:23:45
|
Revision: 156
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=156&view=rev
Author: matijsdejong
Date: 2011-11-01 11:23:34 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
Extended Answer display with switch for showing current item.
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
Modified: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-10-31 09:46:30 UTC (rev 155)
+++ trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-11-01 11:23:34 UTC (rev 156)
@@ -83,6 +83,13 @@
protected $locale;
/**
+ * Switch to put the display of the current token as select to true or false.
+ *
+ * @var boolean
+ */
+ protected $showSelected = true;
+
+ /**
* Optional: $request or $tokenData must be set
*
* The display data of the token shown
@@ -111,7 +118,11 @@
protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model)
{
$br = MUtil_Html::create('br');
- $selectedClass = MUtil_Lazy::iff(MUtil_Lazy::comp($bridge->gto_id_token, '==', $this->tokenId), 'selectedColumn', null);
+ if ($this->showSelected) {
+ $selectedClass = MUtil_Lazy::iff(MUtil_Lazy::comp($bridge->gto_id_token, '==', $this->tokenId), 'selectedColumn', null);
+ } else {
+ $selectedClass = null;
+ }
$bridge->th($this->_('Status'));
$td = $bridge->tdh(MUtil_Lazy::first($bridge->grc_description, $this->_('OK')));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-11-01 14:40:49
|
Revision: 162
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=162&view=rev
Author: matijsdejong
Date: 2011-11-01 14:40:39 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
Sort just a little bit more intelligent
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
Modified: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-11-01 14:16:18 UTC (rev 161)
+++ trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-11-01 14:40:39 UTC (rev 162)
@@ -53,7 +53,7 @@
*
* @var array
*/
- protected $_fixedSort = array('gto_round_order' => SORT_ASC);
+ protected $_fixedSort = array('gto_valid_from' => SORT_ASC, 'gto_round_order' => SORT_ASC);
/**
* Shortfix to add class attribute
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-05-15 08:11:29
|
Revision: 681
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=681&view=rev
Author: michieltcs
Date: 2012-05-15 08:11:18 +0000 (Tue, 15 May 2012)
Log Message:
-----------
Add showTakeButton parameter
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
Modified: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2012-05-14 09:06:33 UTC (rev 680)
+++ trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2012-05-15 08:11:18 UTC (rev 681)
@@ -90,6 +90,14 @@
protected $showButtons = true;
/**
+ * Switch to enable/disable the 'take' button underneath each
+ * open token.
+ *
+ * @var boolean
+ */
+ protected $showTakeButton = true;
+
+ /**
* Switch to put the display of the headers on or off
*
* @var boolean
@@ -165,7 +173,7 @@
$bridge->th($this->_('Token'));
$tokenUpper = $bridge->gto_id_token->strtoupper();
- if ($menuItem = $this->menu->find(array('controller' => 'ask', 'action' => 'take', 'allowed' => true))) {
+ if ($this->showTakeButton && $menuItem = $this->menu->find(array('controller' => 'ask', 'action' => 'take', 'allowed' => true))) {
$source = new Gems_Menu_ParameterSource();
$source->setTokenId($bridge->gto_id_token);
$source->offsetSet('can_be_taken', $bridge->can_be_taken);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2013-02-28 16:24:45
|
Revision: 1166
http://sourceforge.net/p/gemstracker/code/1166
Author: mennodekker
Date: 2013-02-28 15:13:09 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
show empty subquestions (common abuse of the array question type in limesurvey)
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
Modified: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2013-02-28 11:02:53 UTC (rev 1165)
+++ trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2013-02-28 15:13:09 UTC (rev 1166)
@@ -175,7 +175,7 @@
foreach($answerNames as $name) {
$label = $model->get($name, 'label');
- if (strlen($label)) {
+ if (!is_null($label)) { // Was strlen($label), but this ruled out empty sub-questions
$bridge->thd($label, array('class' => $model->get($name, 'thClass')));
$td = $bridge->td($bridge->$name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|