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') ) {
$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');
}
}