5 SGN::Controller::Static - a controller for dispatching to static pages
9 SGN has some static pages that don't merit their own controller. The purpose of this one is to have one common controller for all the static pages that don't fit anywhere else.
11 Please feel free to add your own pages. The actions should essentially just link to a mason component for display.
15 Lukas Mueller <lam87@cornell.edu>
20 package SGN
::Controller
::Static
;
24 BEGIN { extends
'Catalyst::Controller'; }
27 sub mason_forward
:Path
('/pages') Args
(1) {
32 print STDERR
"Forwarding to $page...\n";
34 my $sp_person_id = $c->user() ?
$c->user->get_object()->get_sp_person_id() : undef;
35 $c->stash->{schema
} = $c->dbic_schema("Bio::Chado::Schema", undef, $sp_person_id);
36 $c->stash->{template
} = '/pages/'.$page.".mas";
39 sub mason_forward_with_subfolder
:Path
('/pages/') Args
(2) {
42 my $subfolder = shift;
45 print STDERR
"Forwarding to $subfolder, $page...\n";
46 my $sp_person_id = $c->user() ?
$c->user->get_object()->get_sp_person_id() : undef;
47 $c->stash->{schema
} = $c->dbic_schema("Bio::Chado::Schema", undef, $sp_person_id);
48 $c->stash->{template
} = '/pages/'.$subfolder."/".$page.".mas";
51 sub list_all_uploads
:Path
('/breeders/list_all_uploads') Args
(0) {
54 $c->stash->{template
} = '/breeders_toolbox/complete_upload_list.mas';
57 sub ethz_cass_sync
:Path
('/ethz_cass/sync/') :Args
(0) {
60 #This mason component is in cassbase git repo.
61 $c->stash->{template
} = '/stock/ethz_cass_sync.mas';
64 sub projects_forward
:Path
('/projects') Args
(1) {
69 print STDERR
"Forwarding to $page...\n";
70 $c->stash->{template
} = '/projects/'.$page.".mas";
73 sub test_authentication
:Path
('/test_authentication/') :Args
(0) {
76 $c->stash->{template
} = '/test/test_authenticate.mas';
79 sub progress
:Path
('/progress') Args
(0) {
82 $c->stash->{template
} = '/breeders_toolbox/progress.mas';
86 sub solanaceae_project_afri
:Path
('/solanaceae-project/afri-sol/') {
88 $c->stash->{template
} = '/links/afri_sol.mas';
92 sub sgn_events
:Path
('/sgn-events/') {
94 $c->stash->{template
} = '/homepage/sgn_events.mas';
98 sub phenotype_select
: Path
('/phenome/select') {
101 $c->stash->{template
} = '/phenome/select.mas';
106 sub list_test
: Path
('/list/test') {
109 $c->stash->{template
}= '/list/index.mas';
110 $c->stash->{user_id
} = $c->user();
113 sub usage_policy
: Path
('/usage_policy') {
115 $c->stash->{template
} = '/usage_policy.mas';
118 sub radargraph
: Path
('/radargraph') {
122 $c->stash->{template
}='/breeders_toolbox/radargraph.mas';
125 sub ted
: Path
('/ted') Args
(0) {
127 my $uri = $c->request->uri->as_string();
129 my ($protocol, $empty, $server, $ted, @rest) = split "/", $uri;
131 $c->stash->{page_title
} = "Tomato Expression Database";
132 $c->stash->{param_string
} = join "/", @rest;
133 $c->stash->{server
} = 'ted.sgn.cornell.edu';
134 $c->stash->{port
} = "80"; # get this from conf...
135 $c->stash->{template
} = '/site/iframe.mas';