Adds Thingy template variable to permit Javascript visualisation of search results

This commit is contained in:
Patrick Donelan 2010-09-21 15:04:09 -04:00
parent 980986880f
commit 093f7d67e9
5 changed files with 47 additions and 0 deletions

View file

@ -3407,7 +3407,11 @@ sequenceNumber');
push(@searchResult_loop,\%templateVars);
}
$var->{searchResult_loop} = \@searchResult_loop;
# Also expose the search results in the template as a json-encoded string
# so that people can e.g. visualise the results via Javascript
$var->{searchResult_json} = JSON->new->encode(\@searchResult_loop);
$p->appendTemplateVars($var);
$var->{"form_start"} = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl,method=>'GET'})