From 4ea9caf926de05046a66ab33e40eda38314db216 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Thu, 20 Sep 2012 16:56:39 -0500 Subject: Added headers to the trait data/analysis tables --- wqflask/wqflask/show_trait/DataEditingPage.py | 15 ++++++--------- wqflask/wqflask/templates/trait_data_and_analysis.html | 11 ++++++++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/wqflask/wqflask/show_trait/DataEditingPage.py b/wqflask/wqflask/show_trait/DataEditingPage.py index 32ecc732..13de0b40 100755 --- a/wqflask/wqflask/show_trait/DataEditingPage.py +++ b/wqflask/wqflask/show_trait/DataEditingPage.py @@ -932,14 +932,13 @@ class DataEditingPage(templatePage): self.MDP_menu.append(('All Cases','0')) self.MDP_menu.append(('%s Only' % fd.RISet, '1')) self.MDP_menu.append(('Non-%s Only' % fd.RISet, '2')) - #stats_row.append("Include: ", self.MDP_menu, HT.BR(), HT.BR()) + else: if (len(other_strains) > 0) and (len(primary_strains) + len(other_strains) > 3): print("ac2") self.MDP_menu.append(('All Cases','0')) self.MDP_menu.append(('%s Only' % fd.RISet,'1')) self.MDP_menu.append(('Non-%s Only' % fd.RISet,'2')) - #stats_row.append("Include: ", self.MDP_menu, " "*3) all_strains = primary_strains all_strains.sort(key=webqtlUtil.natsort_key) all_strains = map(lambda X:"_2nd_"+X, fd.f1list + fd.parlist) + all_strains @@ -950,10 +949,6 @@ class DataEditingPage(templatePage): other_strains.sort(key=webqtlUtil.natsort_key) all_strains = all_strains + other_strains - pass - - #update_button = HT.Input(type='button',value=' Update Figures ', Class="button update") #This is used to reload the page and update the Basic Statistics figures with user-edited data - #stats_row.append(update_button, HT.BR(), HT.BR()) if (len(other_strains)) > 0 and (len(primary_strains) + len(other_strains) > 4): #One set of vals for all, selected strain only, and non-selected only @@ -1764,9 +1759,11 @@ class DataEditingPage(templatePage): fd.allstrainlist = allstrainlist_neworder - self.primary_strains = primary_strains - self.other_strains = other_strains - + self.primary_strains = dict(header = "%s Only" % (fd.RISet), + strains = primary_strains,) + + self.other_strains = dict(header = "Non-%s" % (fd.RISet), + strains = other_strains,) def create_strain_objects(self, fd, varianceDataPage, strainlist, mainForm, thisTrait, other_strainsExist=None, attribute_ids=None, diff --git a/wqflask/wqflask/templates/trait_data_and_analysis.html b/wqflask/wqflask/templates/trait_data_and_analysis.html index 4d7ec58e..110559bc 100644 --- a/wqflask/wqflask/templates/trait_data_and_analysis.html +++ b/wqflask/wqflask/templates/trait_data_and_analysis.html @@ -1245,8 +1245,12 @@
- {% for strain_type in (primary_strains, other_strains) %} -
{# Slightly tortuous, but best way to get the id we need #} + {% for strain_type in (primary_strains, other_strains) %} + +
+

{{ strain_type.header }}

+ +
{# Slightly tortuous, but best way to get the id we need #} @@ -1262,7 +1266,7 @@ - {% for strain in strain_type %} + {% for strain in strain_type.strains %}
SE
{{ loop.index }} @@ -1293,6 +1297,7 @@ {% endfor %}
+
{% endfor %}
-- cgit v1.2.3