# TODO not used yet, will load user texts later
my $user = $c->request->param( 'user' ) || 'ALL';
my @textlist;
- foreach my $id ( $m->tradition_ids ) {
- my $t = $m->info( $id );
- push( @textlist, $t );
- }
-
+ $m->scan( sub {
+ push( @textlist, {
+ 'id' => $m->object_to_id( @_ ),
+ 'name' => $_[0]->name } )
+ } );
$c->stash->{texts} = \@textlist;
$c->stash->{template} = 'directory.tt';
}
$m->store( $tradition );
}
- $c->stash->{'result'} = $tradition->stemma->as_svg;
+ $c->stash->{'result'} = $tradition->stemma
+ ? $tradition->stemma->as_svg
+ : '';
$c->forward('View::SVG');
}