clean
[sgn.git] / lib / SGN / Controller / Static.pm
blobf489b4d3993214a8d14237effefd6139d96195ff
3 =head1 NAME
5 SGN::Controller::Static - a controller for dispatching to static pages
7 =head1 DESCRIPTION
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.
13 =head1 AUTHOR
15 Lukas Mueller <lam87@cornell.edu>
17 =cut
20 package SGN::Controller::Static;
22 use Moose;
24 BEGIN { extends 'Catalyst::Controller'; }
27 sub brapi_test :Path('/brapi_test/') :Args(0) {
28 my $self = shift;
29 my $c = shift;
30 $c->stash->{template} = '/brapiclient/test.mas';
33 sub ethz_cass_sync :Path('/ethz_cass/sync/') :Args(0) {
34 my $self = shift;
35 my $c = shift;
36 #This mason component is in cassbase git repo.
37 $c->stash->{template} = '/stock/ethz_cass_sync.mas';
40 sub personal_calendar :Path('/calendar/personal/') :Args(0) {
41 my $self = shift;
42 my $c = shift;
43 $c->stash->{template} = '/calendar/personal.mas';
46 sub test_authentication :Path('/test_authentication/') :Args(0) {
47 my $self = shift;
48 my $c = shift;
49 $c->stash->{template} = '/test/test_authenticate.mas';
52 sub solanaceae_project_afri :Path('/solanaceae-project/afri-sol/') {
53 my ($self, $c) = @_;
54 $c->stash->{template} = '/links/afri_sol.mas';
58 sub sgn_events :Path('/sgn-events/') {
59 my ($self, $c) = @_;
60 $c->stash->{template} = '/homepage/sgn_events.mas';
64 sub phenotype_select : Path('/phenome/select') {
65 my ($self, $c) = @_;
67 $c->stash->{template} = '/phenome/select.mas';
72 sub list_test : Path('/list/test') {
73 my ($self, $c) = @_;
75 $c->stash->{template}= '/list/index.mas';
76 $c->stash->{user_id} = $c->user();
79 sub usage_policy : Path('/usage_policy') {
80 my ($self, $c) = @_;
81 $c->stash->{template} = '/usage_policy.mas';
84 sub ted : Path('/ted') Args(0) {
85 my ($self, $c) = @_;
86 my $uri = $c->request->uri->as_string();
88 my ($protocol, $empty, $server, $ted, @rest) = split "/", $uri;
90 $c->stash->{page_title} = "Tomato Expression Database";
91 $c->stash->{param_string} = join "/", @rest;
92 $c->stash->{server} = 'ted.sgn.cornell.edu';
93 $c->stash->{port} = "80"; # get this from conf...
94 $c->stash->{template} = '/site/iframe.mas';