From 590ec9d2f26a6536fc65c5fb79d476ab517b4f2c Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 26 Jul 2022 16:27:55 +0000 Subject: Change formatting for search term + add line break in description text --- wqflask/wqflask/templates/search_result_page.html | 31 ++++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 2df10990..9e486217 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -11,49 +11,50 @@ {% endblock %} {% block content %} -
Search Results: We searched {{ dataset.fullname }} - to find all records +
We searched {{ dataset.fullname }}
+
+ to find all records
{% if go_term is not none %}
- with Gene Ontology ID GO:{{ go_term }}.
+ with Gene Ontology ID GO:{{ go_term }}.
{% 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 %}
{% 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
+ 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 %}
{% 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 %}
+ {% 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 %}
- A total of {{ results|count }} records were found.
+ {{ results|count }} records were found.