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 committed by Colin Kuskie
parent e63ce7881c
commit 329c396a3e
5 changed files with 47 additions and 0 deletions

View file

@ -3349,7 +3349,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'})