about summary refs log tree commit diff
path: root/gn2/wqflask/templates
diff options
context:
space:
mode:
authorJohn Nduli2024-08-30 12:19:50 +0300
committerBonfaceKilz2024-09-11 16:56:35 +0300
commit29ff1b6b7b00b34317e8d9764bcedd5b7dacbc02 (patch)
tree03708054b497ba3cb9e452252b7e09274ddf40ed /gn2/wqflask/templates
parent8618fdc8f4c05153f48e1afdbf9d2c337ba79929 (diff)
downloadgenenetwork2-29ff1b6b7b00b34317e8d9764bcedd5b7dacbc02.tar.gz
feat: add ai search box to xapian results page
Diffstat (limited to 'gn2/wqflask/templates')
-rw-r--r--gn2/wqflask/templates/gsearch_gene.html26
1 files changed, 20 insertions, 6 deletions
diff --git a/gn2/wqflask/templates/gsearch_gene.html b/gn2/wqflask/templates/gsearch_gene.html
index 3432662d..c32f1ee1 100644
--- a/gn2/wqflask/templates/gsearch_gene.html
+++ b/gn2/wqflask/templates/gsearch_gene.html
@@ -10,12 +10,26 @@
 
     <div class="container">
 
-        <h3>GN searched for the term(s) <b>"{{ terms }}"</b> in 754 datasets and 39,765,944 traits across 10 species<br/>
-            and found <b>{{ trait_count }}</b> results that match your query.<br/>
-            You can filter these results by adding key words in the fields below<br/>
-            and you can also sort results on most columns.</h3>
-        <p>To study a record, click on its Record ID below.<br />Check records below and click Add button to add to selection.</p>
-
+        <div class="row">
+          <div class="col-sm-7">
+            <h3>GN searched for the term(s) <b>"{{ terms }}"</b> in 754 datasets and 39,765,944 traits across 10 species<br/>
+                and found <b>{{ trait_count }}</b> results that match your query.<br/>
+                You can filter these results by adding key words in the fields below<br/>
+                and you can also sort results on most columns.</h3>
+            <p>To study a record, click on its Record ID below.<br />Check records below and click Add button to add to selection.</p>
+          </div>
+          {% if ai_result %}
+          <div class="col-sm-5">
+            <div class="panel panel-info">
+              <div class="panel-heading">AI Search: {{ ai_result["search_term"] }}</div>
+              <div class="panel-body">
+                <p>{{ ai_result["search_result"] }}</p>
+                <p><a class="btn btn-default" href="{{ ai_result["search_url"] }}" role="button">See References</a></p>
+              </div>
+            </div>
+            {% endif %}
+          </div>
+        </div>
         <div>
             <br />
             <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>