Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / cgi-bin / maps / physical / clone_search.pl
blob560d041c616beea265109657b45c13b625a691f9
1 use strict;
2 use warnings;
4 use English;
5 use CXGN::Page;
6 use CXGN::Search::CannedForms;
7 use CXGN::Genomic::Search::Clone;
9 use CXGN::Page::FormattingHelpers qw/blue_section_html page_title_html commify_number columnar_table_html/;
10 use CXGN::Tools::Text;
11 use CXGN::DB::Connection;
13 ######## CONFIGURATION ##########
14 my $clonedatapage = '/maps/physical/clone_info.pl';
15 my $readinfopage = '/maps/physical/clone_read_info.pl';
16 my $default_rows_per_page = 15;
18 #################################
20 #################################
21 # Start a new SGN page.
22 our $page = CXGN::Page->new( 'Clone Search Results', 'Rob Buels');
23 $page->header('BAC Search Results'); #print out header immediately so users get 'in progress' message
25 my $search = CXGN::Genomic::Search::Clone->new;
26 my ($page_size) = $page->get_encoded_arguments('page_size');
27 $page_size ||= 16;
28 $search->page_size($page_size);
29 my $query = $search->new_query;
30 my %params = $page->get_all_encoded_arguments;
31 $query->from_request(\%params);
32 $query->order_by('clone_id' => 'ASC');
33 my $result = $search->do_search($query);
35 #build the HTML to output
36 print page_title_html('BAC Search Results');
38 print $result->to_html;
40 print blue_section_html('Search Again',CXGN::Search::CannedForms::clone_search_form($page,$query));
42 $page->footer();