1 package TreeOfTexts::Controller::Relation;
3 use namespace::autoclean;
5 BEGIN { extends 'Catalyst::Controller' }
10 TreeOfTexts::Controller::Relation - Controller for the relationship mapper
14 The stemma analysis tool with the pretty colored table.
20 Renders the application for the text identified by $textid.
24 The relationship editor tool.
28 sub index :Path :Args(1) {
29 my( $self, $c, $textid ) = @_;
30 my $m = $c->model('Directory');
31 my $tradition = $m->tradition( $textid );
32 my $table = $tradition->collation->make_alignment_table();
33 my $witlist = map { $_->{'witness'} } @{$table->{'alignment'}};
34 $c->stash->{witnesses} = $witlist;
35 $c->stash->{alignment} = $table;
36 $c->stash->{template} = 'relate.tt';
41 Attempt to render a view, if needed.
45 sub end : ActionClass('RenderView') {}
53 This library is free software. You can redistribute it and/or modify
54 it under the same terms as Perl itself.
58 __PACKAGE__->meta->make_immutable;