Merge pull request #2830 from solgenomics/topic/fix_confirm_trait_property_deletion
[sgn.git] / cgi-bin / sedm / experimental_design.pl
blob8195c843b4b41896c619eb358fede7d29ba3f682
1 #!/usr/bin/perl
3 =head1 NAME
5 experimental_design.pl
6 Code to show the web_page for platform using MASON.
8 =cut
10 =head1 SYNOPSIS
13 =head1 DESCRIPTION
15 This is the script to show the web_page using MASON
17 =cut
19 =head1 AUTHORS
21 Aureliano Bombarely Gomez
22 (ab782@cornell.edu)
24 =cut
27 use strict;
28 use warnings;
30 use CXGN::Page;
32 my $m = CXGN::MasonFactory->new;
34 ## Use of CXGN::Page to take the arguments from the URL
36 my $page = CXGN::Page->new();
37 my %args = $page->get_all_encoded_arguments();
39 ## There are two ways to access to the page, using id=int or name=something. If use other combinations give an error message
41 if (exists $args{'id'} && defined $args{'id'} && $args{'id'} =~ m/^\d+$/) {
42 $m->exec( '/sedm/experimental_design_detail.mas',
43 id => $args{'id'},
45 } elsif (exists $args{'name'} && defined $args{'name'}) {
46 $m->exec( '/sedm/experimental_design_detail.mas',
47 name => $args{'name'},
49 } else {
50 $m->exec( '/sedm/sedm_page_error.mas',
51 object => 'experimental design'