6 use CXGN
::Page
::FormattingHelpers qw
/
7 blue_section_html info_section_html
8 columnar_table_html page_title_html
10 use CXGN
::Search
::CannedForms
;
11 use CXGN
::Searches
::Family
;
13 my $page = CXGN
::Page
->new("SGN Family Search Results", "Chris");
16 print page_title_html
("Family Search Results");
18 my $search = CXGN
::Searches
::Family
->new();
19 my $query = $search->new_query();
20 $search->page_size(20);
22 my %params = $page->get_all_encoded_arguments();
23 $query->from_request(\
%params);
28 my $result = $search->do_search($query);
30 while(my $r = $result->next_result()) {
31 push(@results, [map {$_}
33 "<a href=\"/search/family.pl?family_id=" . $r->[0] . "\">" . $r->[2] . "</a>", $r->[3], $r->[4], $r->[6], $r->[0], $r->[1] )] );
36 my $pagination_html = $search->pagination_buttons_html($query, $result);
38 my $results_html = '<div id="searchresults">';
40 $results_html .= columnar_table_html
(headings
=> ['Family Number', 'Number of Members', 'I-Value', 'Build #', 'Family ID', 'Annotation'],
41 data
=> \
@results, __alt_freq
=> 2);
43 $results_html .= "</div>\n$pagination_html\n";
46 print blue_section_html
('Results', , sprintf('<span class="paginate_summary">%s matches </span>', $result->total_results(), $result->time), $results_html);
49 print '<span class=""><h4>No matches found</h4></span>';
51 print info_section_html
(title
=> 'Search again', contents
=>CXGN
::Search
::CannedForms
::family_search_form
($page, $query));