#!/usr/bin/env perl
use Mojolicious::Lite;
push @{ app->plugins->namespaces }, 'PerlServices::Plugin';
plugin 'Ticket' => app->config->{otrs};
app->defaults(
bodyclass => 'start',
active => 'home',
);
get '/' => 'static/index';
get '/imprint' => 'static/imprint';
get '/privacy' => 'static/privacy';
get '/jobs' => 'static/jobs';
under '/otrs' => sub {
shift->stash(bodyclass => 'otrs', active => 'otrs');
return 1;
};
get '/' => 'static/otrs';
get '/support' => 'static/otrs-support';
get '/development' => 'static/otrs-development';
under '/perl' => sub {
shift->stash(bodyclass => 'perl', active => 'perl');
return 1;
}
get '/' => 'static/perl';
under '/academy' => sub {
shift->stash(bodyclass => 'schulung',active => 'academy');
return 1;
};
get '/' => 'static/academy';
under '/' => sub {
my $c = shift;
$c->stash(
errors => {},
values => {},
);
return 1;
};
get '/kontakt.cgi' => 'contact/form';
post '/kontakt.cgi' => \&_send_contact_request;
post '/get-in-touch' => \&_send_contact_request;
under '/';
any '/*anything' => sub {
my $c = shift;
$c->redirect_to( '/' );
};
app->start;