fixed error message and validation
[sgn.git] / lib / SGN / Controller / List.pm
blob4e7e85fd0710acacd98631c1c9cf94475f30b1cd
1 package SGN::Controller::List;
3 use Moose;
4 use URI::FromHash 'uri';
5 use Data::Dumper;
8 BEGIN { extends 'Catalyst::Controller'; }
11 sub list_details :Path('/list/details') :Args(0) {
12 my $self = shift;
13 my $c = shift;
14 my $list_id = $c->req->param('list_id');
16 if (! $c->user()) {
17 $c->res->redirect( uri( path => '/user/login', query => { goto_url => $c->req->uri->path_query } ) );
18 return;
21 my $list = CXGN::List->new( { dbh => $c->dbc->dbh, list_id=>$list_id });
23 $c->stash->{list_id} = $list_id;
24 $c->stash->{list_name} = $list->name;
25 $c->stash->{list_description} = $list->description;
26 $c->stash->{list_type} = $list->type;
27 $c->stash->{list_size} = $list->list_size;
28 $c->stash->{template} = '/list/list_details.mas';