about summary refs log tree commit diff
path: root/gn2
diff options
context:
space:
mode:
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/templates/gnqa.html4
-rw-r--r--gn2/wqflask/templates/gnqa_search_history.html10
2 files changed, 6 insertions, 8 deletions
diff --git a/gn2/wqflask/templates/gnqa.html b/gn2/wqflask/templates/gnqa.html
index 8b50fe43..b3bc74fd 100644
--- a/gn2/wqflask/templates/gnqa.html
+++ b/gn2/wqflask/templates/gnqa.html
@@ -93,7 +93,7 @@
 	    AI Search
 	    <small>
 	      <sup>
-		<button class="search-hist-btn" hx-get="/gnqna/hist/" hx-target="#swap" hx-swap="innerHTML" >
+		<button class="search-hist-btn" hx-get="/gnqna/hist" hx-target="#swap" hx-swap="innerHTML">
 		  [Search History]
 		</button>
 	      </sup>
@@ -107,7 +107,7 @@
 	    <button class="btn btn-default btn-sm col-xs-1 col-sm-1 col-sm-offset-3"
 		    hx-post="/gnqna"
 		    hx-target="#swap"
-		    hx-swap="innerHTML"
+		    hx-swap="innerHTML"		  
 		    hx-indicator="#indicator">
 		<i class="fa fa-search fa-3x" aria-hidden="true" title="Search"></i>
 		<img id="indicator" class="htmx-indicator" src="/static/gif/loader.gif"/>
diff --git a/gn2/wqflask/templates/gnqa_search_history.html b/gn2/wqflask/templates/gnqa_search_history.html
index 2c07b8c0..af38392a 100644
--- a/gn2/wqflask/templates/gnqa_search_history.html
+++ b/gn2/wqflask/templates/gnqa_search_history.html
@@ -13,25 +13,23 @@
   </header>
   <div class="container row">
   <div class="panel panel-default col-sm-6 col-sm-offset-3 ">
-    {% for record in prev_queries %}
+    {% for (key,val) in prev_queries.items() %}
     <div class="panel-body">
       <div class="row">
 	<input name="" type="checkbox" value="" class="col-sm-1">
 	<div class="col-sm-10">
-	  {% for id,val in  record.items() %}
 	    <button
-	      hx-get="/gnqna/hist/search/{{id}}"
+	      hx-get="/gnqna/hist?search_term={{key}}"
               hx-target="#swap"
 	      hx-swap="innerHTML"
 	      hx-trigger= "click"
 	      data-bs-toggle="tooltip"
 	      data-bs-placement="left"
-	      title="/gnqna/hist/search?{{id}}"
+	      title="/gnqna/hist?search_term={{key}}"
 	      style="background:transparent;border:none;cursor:pointer"
 	      >
-	      <b class="text-info">{{val}} </b>
+	      <b class="text-info">{{val.get('query')}} </b>
 	    </button>
-	  {% endfor %}
 	</div>
       </div>
       </div>