blob: e8726ee62cde0c948be275ccf343d38bfd6864d5 [file] [log] [blame]
Nils Diewald2329e1d2014-06-12 16:07:57 +00001package Korap::Tutorial;
2use Mojo::Base 'Mojolicious::Controller';
3
4sub page {
5 my $c = shift;
Nils Diewaldb22abdf2014-06-18 22:57:50 +00006
Nils Diewald9c90c002014-11-13 21:21:15 +00007 # Redundant in Search
8 $c->stash(test_port => (
9 $c->req->url->to_abs->port == 6666 ||
10 $c->app->mode =~ m/^development|test$/) ? 1 : 0);
11
Nils Diewald4af3f0b2014-06-25 01:43:17 +000012 if ($c->param('embedded')) {
Nils Diewaldb22abdf2014-06-18 22:57:50 +000013 $c->layout('snippet');
Nils Diewald4af3f0b2014-06-25 01:43:17 +000014 $c->stash(embedded => 1);
Nils Diewaldb22abdf2014-06-18 22:57:50 +000015 }
16 else {
17 $c->layout('default');
18 };
Nils Diewald2329e1d2014-06-12 16:07:57 +000019 $c->title('KorAP');
20
21 my $page = $c->stash('tutorial');
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000022 return $c->render(template => 'tutorial/' . $page);
Nils Diewald2329e1d2014-06-12 16:07:57 +000023};
24
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000025
Nils Diewald2329e1d2014-06-12 16:07:57 +0000261;
27
28
29__END__