Revision: 18075
http://sourceforge.net/p/gate/code/18075
Author: ian_roberts
Date: 2014-06-12 11:01:09 +0000 (Thu, 12 Jun 2014)
Log Message:
-----------
Jobs with only common options (no per-unit options) were showing a spurious "No
data available" - now fixed.
Modified Paths:
--------------
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
Modified:
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
===================================================================
---
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
2014-06-12 01:19:54 UTC (rev 18074)
+++
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
2014-06-12 11:01:09 UTC (rev 18075)
@@ -98,17 +98,22 @@
// construct the CML with the specified caption and common radio
// options
- cml.append("<h2 id=\"unit_text\">{{text}}</h2>\n\n" + "{% if detail %}\n"
+ cml.append("<h2 id=\"unit_text\">{{text}}</h2>\n\n"
+ + "{% unless detail == \"No data available\" %}\n"
+ " <div class=\"well\">{{detail}}</div>\n"
- + "{% endif %}\n" + "<cml:radios validates=\"required\" label=\"");
+ + "{% endunless %}\n"
+ + "<cml:radios validates=\"required\" label=\"");
StringEscapeUtils.escapeXml(cml, caption);
- cml.append("\" name=\"answer\">\n" + " {% for opt in options %}\n"
- + " {% if opt.description %}\n"
- + " {% assign desc = opt.description %}\n"
- + " {% else %}\n" + " {% assign desc = opt.value %}\n"
- + " {% endif %}\n"
- + " <cml:radio value=\"{{opt.value}}\" label=\"{{desc}}\" />\n"
- + " {% endfor %}\n");
+ cml.append("\" name=\"answer\">\n"
+ + " {% unless options == \"No data available\" %}\n"
+ + " {% for opt in options %}\n"
+ + " {% if opt.description %}\n"
+ + " {% assign desc = opt.description %}\n"
+ + " {% else %}\n" + " {% assign desc = opt.value %}\n"
+ + " {% endif %}\n"
+ + " <cml:radio value=\"{{opt.value}}\" label=\"{{desc}}\"
/>\n"
+ + " {% endfor %}\n"
+ + " {% endunless %}\n");
if(commonOptions != null) {
for(List<String> opt : commonOptions) {
cml.append(" <cml:radio value=\"");
@@ -349,9 +354,10 @@
+ " {% for tok in tokens %}\n"
+ " <cml:checkbox label=\"{{ tok }}\" value=\"{{
forloop.index0 }}\" />\n"
+ " {% endfor %}\n" + " </cml:checkboxes>\n" + "</div>\n"
- + "{% if detail %}\n"
+ + "{% unless detail == \"No data available\" %}\n"
+ " <div class=\"well\">{{detail}}</div>\n"
- + "{% endif %}\n" + "<div class=\"gate-no-entities\">\n"
+ + "{% endunless %}\n"
+ + "<div class=\"gate-no-entities\">\n"
// TODO work out how to customize the validation error
// message
+ " <cml:checkbox name=\"noentities\" label=\"");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs