Nils Diewald | 1eba657 | 2014-06-17 19:49:53 +0000 | [diff] [blame] | 1 | package Korap::Info; |
| 2 | use Mojo::Base 'Mojolicious::Controller'; |
| 3 | |
| 4 | sub about_match { |
| 5 | my $c = shift; |
Nils Diewald | 1eba657 | 2014-06-17 19:49:53 +0000 | [diff] [blame] | 6 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 7 | my $corpus_id = $c->stash('corpus_id'); |
| 8 | my $doc_id = $c->stash('doc_id'); |
| 9 | my $match_id = $c->stash('match_id'); |
| 10 | |
| 11 | return $c->respond_to( |
| 12 | json => sub { |
| 13 | $c->render(json => $c->notifications(json => $c->match_info($corpus_id, $doc_id, $match_id))) |
| 14 | }, |
| 15 | html => sub { |
| 16 | $c->render( |
| 17 | layout => 'default', |
| 18 | template => 'match_info', |
| 19 | match => $c->match_info($corpus_id, $doc_id, $match_id, foundry => '') |
| 20 | ) |
| 21 | } |
| 22 | ); |
Nils Diewald | 1eba657 | 2014-06-17 19:49:53 +0000 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | 1; |
| 26 | |
| 27 | __END__ |