1 package SGN
::Controller
::Phenotypes
;
5 SGN::Controller::Phenotypes - Catalyst controller for pages dealing with
6 phenotypes submission and associating them with project, experiments, and stock accessions.
11 use namespace
::autoclean
;
12 use YAML
::Any qw
/LoadFile/;
14 use URI
::FromHash
'uri';
16 use File
::Temp qw
/ tempfile /;
20 use CXGN
::Chado
::Stock
;
21 use SGN
::View
::Stock qw
/stock_link stock_organisms stock_types/;
24 BEGIN { extends
'Catalyst::Controller' }
25 with
'Catalyst::Component::ApplicationAttribute';
29 isa
=> 'DBIx::Class::Schema',
33 shift->_app->dbic_schema( 'Bio::Chado::Schema', 'sgn_chado' )
36 has
'default_page_size' => (
43 =head2 submission_guidelines
45 Public path: /phenotype/submission_guide
47 Display the phenotype submission guidelines page
51 sub submission_guidelines
:Path
('/phenotype/submission_guide') Args
(0) {
53 $c->stash(template
=> '/phenotypes/submission_guide.mas');
57 sub delete_uploaded_phenotype_files
: Path
('/breeders/phenotyping/delete/') Args
(1) {
64 $decoded = $json->allow_nonref->utf8->decode($file_id);
66 #print STDERR Dumper($file_id);
67 print "File ID: $file_id\n";
68 my $dbh = $c->dbc->dbh();
69 my $h = $dbh->prepare("delete from metadata.md_files where file_id=?;");
70 $h->execute($decoded);
71 print STDERR
"Layout deleted successfully.\n";
72 $c->response->redirect('/breeders/phenotyping');