aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/templates/partial_correlations.html30
-rw-r--r--wqflask/wqflask/templates/with-trait-items.html18
2 files changed, 23 insertions, 25 deletions
diff --git a/wqflask/wqflask/templates/partial_correlations.html b/wqflask/wqflask/templates/partial_correlations.html
index 800222ba..c565d4bf 100644
--- a/wqflask/wqflask/templates/partial_correlations.html
+++ b/wqflask/wqflask/templates/partial_correlations.html
@@ -24,18 +24,8 @@
{%if step == "select-primary":%}
<p>Please select the primary trait (X)</p>
- {%for trait in traits_list:%}
- <div class="label-element-combo with-trait">
- <input type="radio"
- name="primary_trait"
- value="{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['data_hmac']}}"
- id="trait_{{trait['data_hmac']}}"
- class="selector-element" />
- <label for="trait_{{trait['data_hmac']}}" class="label-element">
- {{trait["name"]}} - {{trait["symbol"]}} - {{trait["description"]}}
- </label>
- </div>
- {%endfor%}
+ {%include "with-trait-items.html" %}
+
<button type="submit" class="btn btn-primary">
Next: Select Control Traits
</button>
@@ -46,20 +36,10 @@
{%if step == "select-controls":%}
<p>Select a maximum of three (3) control traits (Z)</p>
- {%for trait in traits_list:%}
- <div class="label-element-combo with-trait">
- <input type="checkbox"
- name="control_traits[]"
- value="{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['data_hmac']}}"
- id="trait_{{trait['data_hmac']}}"
- class="selector-element" />
- <label for="trait_{{trait['data_hmac']}}" class="label-element">
- {{trait["name"]}} - {{trait["symbol"]}} - {{trait["description"]}}
- </label>
- </div>
- {%endfor%}
+ {%include "with-trait-items.html" %}
+
<button type="submit" class="btn btn-primary">
- Next: Select Target Traits
+ Next: Select Target
</button>
{%endif%}
diff --git a/wqflask/wqflask/templates/with-trait-items.html b/wqflask/wqflask/templates/with-trait-items.html
new file mode 100644
index 00000000..66d6fd22
--- /dev/null
+++ b/wqflask/wqflask/templates/with-trait-items.html
@@ -0,0 +1,18 @@
+{%for trait in traits_list:%}
+<div class="with-trait">
+ <input type="{%if step=='select-primary':%}radio{%else:%}checkbox{%endif%}"
+ name="{%if step=='select-primary':%}primary_trait{%else:%}control_traits[]{%endif%}"
+ value="{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['location']}}:::{{trait['mean_expr']}}:::{{trait['max_lrs']}}:::{{trait['data_hmac']}}"
+ id="trait_{{trait['data_hmac']}}"
+ class="selector-element" />
+ <label for="trait_{{trait['data_hmac']}}" class="label-element">
+ <span class="trait-dataset" data-title="dataset">{{trait["dataset"]}}</span>
+ <span class="trait-name" data-title="name">{{trait["name"]}}</span>
+ <span class="trait-symbol" data-title="symbol">{{trait["symbol"]}}</span>
+ <span class="trait-description" data-title="description">{{trait["description"]}}</span>
+ <span class="trait-locatin" data-title="location">{{trait["location"]}}</span>
+ <span class="trait-mean-expr" data-title="mean">{{"%0.3f" % trait["mean_expr"]|float}}</span>
+ <span class="trait-max-lrs" data-title="max LRS">{{trait["max_lrs"]}}</span>
+ </label>
+</div>
+{%endfor%}