Commit a327ee58 authored by Ryan Herbert's avatar Ryan Herbert

sample_set.py, all.html, custom.html autocomplete search bar

See #2621
parent 42203d9a
...@@ -170,9 +170,7 @@ def all(): ...@@ -170,9 +170,7 @@ def all():
request.vars["filter"] = "" request.vars["filter"] = ""
search, tags = parse_search(request.vars["filter"]) search, tags = parse_search(request.vars["filter"])
group_ids = [int(g.id) for g in get_group_list(auth)] group_ids = get_involved_groups()
parent_group_ids = [int(g.id) for f in auth.get_user_group_parents()]
group_ids = group_ids + parent_group_ids
list = SampleSetList(type, page, step, tags=tags) list = SampleSetList(type, page, step, tags=tags)
list.load_creator_names() list.load_creator_names()
...@@ -376,6 +374,8 @@ def custom(): ...@@ -376,6 +374,8 @@ def custom():
) )
myGroupBy = db.sequence_file.id|db.patient.id|db.run.id|db.generic.id|db.results_file.config_id myGroupBy = db.sequence_file.id|db.patient.id|db.run.id|db.generic.id|db.results_file.config_id
group_ids = get_involved_groups()
##filter ##filter
if "filter" not in request.vars : if "filter" not in request.vars :
request.vars["filter"] = "" request.vars["filter"] = ""
...@@ -428,7 +428,8 @@ def custom(): ...@@ -428,7 +428,8 @@ def custom():
config_id=config_id, config_id=config_id,
config=config, config=config,
helper=helper, helper=helper,
tag_decorator=tag_decorator) tag_decorator=tag_decorator,
group_ids=group_ids)
def confirm(): def confirm():
if auth.can_modify_sample_set(request.vars["id"]): if auth.can_modify_sample_set(request.vars["id"]):
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
<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["filter"]}}" onchange="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'filter' : this.value} )"
onfocus="new VidjilAutoComplete().setupAtWho(this);"
data-needs-atwho="true" data-group-ids="{{=group_ids}}">
</div> </div>
</div> </div>
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
<input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}" <input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}"
onchange="db.call('sample_set/custom', {'config_id' : '{{=request.vars["config_id"]}}', onchange="db.call('sample_set/custom', {'config_id' : '{{=request.vars["config_id"]}}',
'filter' : this.value, 'filter' : this.value,
'custom_list' : db.getListInput('custom_result[]')} )" > 'custom_list' : db.getListInput('custom_result[]')} )"
onfocus="new VidjilAutoComplete().setupAtWho(this);"
data-needs-atwho="true" data-group-ids="{{=group_ids}}">
</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