redirecting /qtl/search to /qtl/search, to make use of the tab formatted SGN search...
[sgn.git] / lib / SGN / Controller / Trait.pm
blob62d89f3635d9d23fbe2379f6ef8b684f6ae20a99
1 package SGN::Controller::Trait;
3 =head1 NAME
5 SGN::Controller::Trait - Catalyst controller for pages dealing with traits (these are cvterms, specifically Solanaceae Phenotype terms)
7 =cut
9 use Moose;
10 use namespace::autoclean;
12 use HTML::FormFu;
13 use URI::FromHash 'uri';
14 use YAML::Any;
16 has 'schema' => (
17 is => 'rw',
18 isa => 'DBIx::Class::Schema',
19 required => 0,
22 has 'default_page_size' => (
23 is => 'ro',
24 default => 20,
28 BEGIN { extends 'Catalyst::Controller' }
29 with 'Catalyst::Component::ApplicationAttribute';
33 sub _validate_pair {
34 my ($self,$c,$key,$value) = @_;
35 $c->throw( message => "$value is not a valid value for $key" )
36 if ($key =~ m/_id$/ and $value !~ m/\d+/);
39 sub search :Path('/trait/search') Args(0) {
40 my ( $self, $c ) = @_;
41 $self->schema( $c->dbic_schema('Bio::Chado::Schema','sgn_chado') );
43 $c->stash(
44 template => '/ontology/traits.mas',
50 ######
52 ######