X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstemmaweb%2FController%2FRoot.pm;h=7159680f297c41cfcb8f5740d3d88ade0f144a8f;hb=325d9f4176bba1c6811c031a75be3ef5eced7c94;hp=c77212269e40a148818483be1b5a78138e96476a;hpb=8e26de0f2079f2b952536a2be1af1ba159eba5c5;p=scpubgit%2Fstemmaweb.git diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index c772122..7159680 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -317,6 +317,10 @@ sub textinfo :Local :Args(1) { public => $tradition->public || 0, owner => $tradition->user ? $tradition->user->email : undef, witnesses => [ map { $_->sigil } $tradition->witnesses ], + # TODO Send them all with appropriate parameters so that the + # client side can choose what to display. + reltypes => [ map { $_->name } grep { !$_->is_weak && $_->is_colocation } + $tradition->collation->relationship_types ] }; ## TODO Make these into callbacks in the other controllers maybe? if( $tradition->can('language') ) { @@ -445,7 +449,7 @@ sub stemma :Local :Args(2) { $c->stash->{'result'} = $stemma->as_svg(); $c->forward('View::SVG'); } else { # JSON - $c->stash->{'result'} = { _stemma_info( $stemma, $stemmaid ) }; + $c->stash->{'result'} = _stemma_info( $stemma, $stemmaid ); $c->forward('View::JSON'); } }