seedlot upload with accession synonyms. seedlot upload works to update existing seedlots
[sgn.git] / lib / SGN / Controller / Help.pm
blob6e76f371526ab45e4b1040f7481877e7a4afb856
2 package SGN::Controller::Help;
4 use Moose;
6 BEGIN { extends "Catalyst::Controller"; }
10 sub help : Path('/help') Args(0) {
11 my $self = shift;
12 my $c = shift;
14 $c->stash->{template} = '/help/index.mas';
17 sub help_section : Path('/help') Args(1) {
18 my $self = shift;
19 my $c = shift;
20 my $section = shift;
21 $section =~ s/\.\.//g; # prevent shenanigans
24 my $component = '/help/'.$section.".mas";
25 if ($c->view("Mason")->interp->comp_exists($component)) {
26 $c->stash->{basepath} = $c->config->{basepath};
27 $c->stash->{documents_subdir} = $c->config->{documents_subdir};
28 $c->stash->{template} = '/help/'.$section.".mas";
32 else {
33 $c->stash->{template} = '/generic_message.mas';
34 $c->stash->{message} = 'The requested page could not be found. <br /><a href="/help">Help page</a>';