Commit a5ff3c50 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

sample_set.py, all.html add current tag to search bar

In an attempt to make to more apparent that sample_sets have been
filtered by tag, we now display the tag in the filter search bar in a
way that will not impede any further searches performed by the user.

See #2619
parent a6725cb6
...@@ -195,6 +195,9 @@ def all(): ...@@ -195,6 +195,9 @@ def all():
if "filter" not in request.vars : if "filter" not in request.vars :
request.vars["filter"] = "" request.vars["filter"] = ""
if "tag" not in request.vars:
request.vars["tag"] = ""
result = helper.filter(request.vars['filter'], result) result = helper.filter(request.vars['filter'], result)
log.debug("%s list (%.3fs) %s" % (request.vars["type"], time.time()-start, request.vars["filter"])) log.debug("%s list (%.3fs) %s" % (request.vars["type"], time.time()-start, request.vars["filter"]))
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="db_block"> <div class="db_block">
<div class="db_block_left"> <div class="db_block_left">
search search
<input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}" onchange="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'filter' : this.value} )"> <input id="db_filter_input" type="text" value="{{=request.vars["tag"] + " "}}{{=request.vars["filter"]}}" onchange="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'filter' : this.value} )">
</div> </div>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment