From: Tara L Andrews Date: Mon, 10 Oct 2011 14:01:43 +0000 (+0200) Subject: make standalone svg rendering inside an HTML page X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb1ac99d799cb00c69ec2620aa5087349f221cc0;p=scpubgit%2Fstemmatology.git make standalone svg rendering inside an HTML page --- diff --git a/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm b/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm index e9deda3..82cc961 100644 --- a/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm +++ b/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm @@ -62,8 +62,8 @@ sub view_svg :Local { my( $self, $c ) = @_; my $m = $c->model( 'Analysis' ); my $t = $m->{'data'}->[ $c->request->params->{'textid'} ]; - $c->stash->{result} = $t->{'svg'}; - $c->forward( "View::SVG" ); + $c->stash->{svg} = $t->{'svg'}; + $c->stash->{template} = 'stemma_gadget.tt'; } diff --git a/TreeOfTexts/root/src/stemma_gadget.tt b/TreeOfTexts/root/src/stemma_gadget.tt new file mode 100644 index 0000000..17160d5 --- /dev/null +++ b/TreeOfTexts/root/src/stemma_gadget.tt @@ -0,0 +1,16 @@ + + + + + + + + + [% INCLUDE style.tt2 %] + + +
+ [% svg %] +
+ +