aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-09-22 18:30:13 +0000
committerzsloan2021-09-22 18:30:13 +0000
commit9bd85361d58eb67ef9e59eff6031ed9fd00a3411 (patch)
treeacfdd323ed682574a5a0dc3ca11669ecb3918e5e /wqflask
parent7cb23fe9c03e4f8051340e2a8f32645e88acce3a (diff)
downloadgenenetwork2-9bd85361d58eb67ef9e59eff6031ed9fd00a3411.tar.gz
Only show most search page options if results exist; otherwise provide a link back to the home page
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/search_result_page.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 7ec335d5..c499aa8f 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -53,6 +53,7 @@
A total of {{ results|count }} records were found.
</p>
+ {% if results|count > 0 %}
{% if go_term is not none %}
<p><b>The associated genes include:</b><br><br>{% for word in search_terms %}{{ word.search_term[0] }}{% endfor %}</p>
{% endif %}
@@ -133,8 +134,11 @@
</div>
</div>
{% endif %}
+ {% else %}
+ <br>
+ <button type="button" onclick="window.location.href='/'">Return To Index Page</button>
+ {% endif %}
</div>
-
<div id="myModal"></div>
<!-- End of body -->
@@ -171,6 +175,7 @@
return params;
};
+ {% if results|count > 0 %}
//ZS: Need to make sort by symbol, also need to make sure blank symbol fields at the bottom and symbols starting with numbers below letters
trait_table = $('#trait_table').DataTable( {
'drawCallback': function( settings ) {
@@ -412,6 +417,7 @@
var table = $('#trait_table').DataTable();
table.colReorder.reset()
});
+ {% endif %}
submit_special = function(url) {
$("#trait_submission_form").attr("action", url);