make error page render for microservice controller
[scpubgit/stemmaweb.git] / lib / stemmaweb / Controller / Relation.pm
CommitLineData
b8a92065 1package stemmaweb::Controller::Relation;
2use Moose;
3use namespace::autoclean;
4
5BEGIN { extends 'Catalyst::Controller' }
6
7
8=head1 NAME
9
10stemmaweb::Controller::Relation - Controller for the relationship mapper
11
12=head1 DESCRIPTION
13
14The stemma analysis tool with the pretty colored table.
15
16=head1 METHODS
17
18 GET relation/$textid
19
20Renders the application for the text identified by $textid.
21
22=head2 index
23
24The relationship editor tool.
25
26=cut
27
28sub 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';
37}
38
39=head2 end
40
41Attempt to render a view, if needed.
42
43=cut
44
45sub end : ActionClass('RenderView') {}
46
47=head1 AUTHOR
48
49Tara L Andrews
50
51=head1 LICENSE
52
53This library is free software. You can redistribute it and/or modify
54it under the same terms as Perl itself.
55
56=cut
57
58__PACKAGE__->meta->make_immutable;
59
601;