From e412d0dd01e47e9594afdfa25f8fd7540e0068dc Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 26 Jul 2022 16:51:57 +0000 Subject: Change search result text/formatting --- wqflask/wqflask/templates/search_result_page.html | 28 +++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 9e486217..e7743f98 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -25,36 +25,40 @@ {% else %} {% for word in search_terms %} {% if word.key|lower == "rif" %} - with GeneRIF containing {{ word.search_term[0] }}{% if loop.last %}.{% else %} and {% endif %} + with GeneRIF containing {{ word.search_term[0] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.key|lower == "go" %} - with Gene Ontology ID {{ word.search_term[0] }}{% if loop.last %}.{% else %} and {% endif %} + with Gene Ontology ID {{ word.search_term[0] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.key|lower == "wiki" %} - with GeneWiki containing {{ word.search_term[0] }}{% if loop.last %}.{% else %} and {% endif %} + with GeneWiki containing {{ word.search_term[0] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.key|lower == "mean" %} - with mean between {{ word.search_term[0] }} and {{ word.search_term[1] }}{% if loop.last %}.{% else %} and {% endif %} + with mean between {{ word.search_term[0] }} and {{ word.search_term[1] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.key|lower == "range" %} - with RANGE between {{ word.search_term[0] }} and {{ word.search_term[1] }}{% if loop.last %}.{% else %} and {% endif %} + with RANGE between {{ word.search_term[0] }} and {{ word.search_term[1] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.key|lower == "lrs" or word.key|lower == "lod" or word.key|lower == "translrs" or word.key|lower == "cislrs" or word.key|lower == "translod" or word.key|lower == "cislod" %} {% if word.search_term|length == 1 %} - with {% if word.key|lower == "translrs" %}trans{% elif word.key|lower == "cislrs" %}cis{% endif %}LRS {% if word.separator == ">" %} greater than {% elif word.separator == "<" %} less than {% elif word.separator == ">=" %} greater than or equal to {% elif word.separator == "<=" %} less than or equal to {% endif %} {{ word.search_term[0] }}{% if loop.last %}.{% else %} and {% endif %} + with {% if word.key|lower == "translrs" %}trans{% elif word.key|lower == "cislrs" %}cis{% endif %}LRS {% if word.separator == ">" %} greater than {% elif word.separator == "<" %} less than {% elif word.separator == ">=" %} greater than or equal to {% elif word.separator == "<=" %} less than or equal to {% endif %} {{ word.search_term[0] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.search_term|length == 2 %} - with {{ word.key|upper }} between {{ word.search_term[0] }} and {{ word.search_term[1] }}{% if loop.last %}.{% else %} and {% endif %} + with {{ word.key|upper }} between {{ word.search_term[0] }} and {{ word.search_term[1] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.search_term|length == 3 %} - with {{ word.key|upper }} between {{ word.search_term[0] }} and {{ word.search_term[1] }} on chromosome {{ word.search_term[2] }}{% if loop.last %}.{% else %} and {% endif %} + with {{ word.key|upper }} between {{ word.search_term[0] }} and {{ word.search_term[1] }} on chromosome {{ word.search_term[2] }}{% if loop.last %}{% else %} and {% endif %} {% elif word.search_term|length == 4 %} with {{ word.key|upper }} between {{ word.search_term[0] }} and {{ word.search_term[1] }} on chromosome {{ word.search_term[3] }} with an exclusion zone of {{ word.search_term[2] }} Mb {% elif word.search_term|length == 5 %} - with {{ word.key|upper }} between {{ word.search_term[0] }} and {{ word.search_term[1] }} on chromosome {{ word.search_term[2] }} between {{ word.search_term[3] }} and {{ word.search_term[4] }} Mb{% if loop.last %}.{% else %} and {% endif %} + with {{ word.key|upper }} between {{ word.search_term[0] }} and {{ word.search_term[1] }} on chromosome {{ word.search_term[2] }} between {{ word.search_term[3] }} and {{ word.search_term[4] }} Mb{% if loop.last %}{% else %} and {% endif %} {% endif %} {% elif word.key|lower == "position" or word.key|lower == "mb" %} - with target genes on chromosome {% if (word.search_term[0]|lower).split('chr')|length > 1 %}{{ (word.search_term[0]|lower).split('chr')[1] }}{% else %}{{ word.search_term[0] }}{% endif %} between {{ word.search_term[1] }} and {{ word.search_term[2] }} Mb{% if loop.last %}.{% else %} and {% endif %} + with target genes on chromosome {% if (word.search_term[0]|lower).split('chr')|length > 1 %}{{ (word.search_term[0]|lower).split('chr')[1] }}{% else %}{{ word.search_term[0] }}{% endif %} between {{ word.search_term[1] }} and {{ word.search_term[2] }} Mb{% if loop.last %}{% else %} and {% endif %} {% else %} {% if word.search_term[0] == "*" %} in the dataset.{% else %}{% if loop.first %}that match: {% endif %}{{ word.search_term[0] }}{% if loop.last %}{% else %} and {% endif %}{% endif %} {% endif %} {% endfor %} {% endif %}
- {{ results|count }} records were found. + {% if results|count > 0 %} + {{ results|count }} record{% if results|count > 1 %}s{% else %}{% endif %} found + {% else %} + No (0) records found for this search. Modify your search, check target dataset, or use Search All above. + {% endif %}

{% if results|count > 0 %} @@ -143,7 +147,7 @@ {% endif %} {% else %}
- + {% endif %}
-- cgit v1.2.3