remove unused digestion.pl
[sgn.git] / mason / search / quick_search.mas
blob08b70d519884cd99a1564ea1f0de53bd0498b4e2
1 <%args>
3   $results
5   $term
7   $show_times => 0
9   $xrefs      => {}
10   $xrefs_time => 0
12 </%args>
14 <& /page/page_title.mas, title => 'Quick search for '.encode_entities( '"'.$term.'"' ) &>
16 <div class="page_introduction">
17   Note: The quick search does not perform exactly the same queries as
18   full searches for the various data types.  If your desired result
19   does not appear, you may want to try again with one of the advanced
20   search tools in the "search" menu.
21 </div>
23 <&| /page/info_section.mas, title => 'Exact matches' &>
25 % if( $show_times ) {
26   <div>Site xref search time: <% sprintf('%0.1f sec', $xrefs_time) %></div>
27 % }
28 % if( @$xrefs ) {
29   <& /sitefeatures/mixed/xref_set/link.mas, xrefs => $xrefs &>
31   <hr style="border: 0; border-bottom: 1px solid #aaa; width: 90%; margin: 1.5em auto 1.2em auto"  />
32 % }
34   <div>
35     <dl>
36     <dt>Identifiers</dt>
37     <dd>
38       <div style="float: left; width: 50%">
39         <% $search{clone} %>
40         <% $search{est} %>
41       </div>
42       <div style="float: right; width: 50%">
43         <% $search{unigene} %>
44         <% $search{microarray} %>
45       </div>
46       <div style="clear: both; margin-bottom: -1.7em">&nbsp;</div>
47     </dd>
48     </dl>
49   </div>
51 </&>
53 <&| /page/info_section.mas,
54     title => 'Fuzzy searches',
55     subtitle => 'click to view search results',
56  &>
57   <div style="float: left; width: 50%">
58     <dl>
59     <dt>Identifiers</dt>
60     <dd>
61       <% $search{marker} %>
62       <% $search{bac} %>
63       <% $search{phenotype} %>
64       <% $search{locus_allele} %>
65     </dd>
66     <dt>People (searching by name)</dt>
67     <dd><% $search{people} %></dd>
68     <dt>Images</dt>
69     <dd>
70       <% $search{image} %>
71     </dd>
72     </dl>
73   </div>
74   <div style="float: right; width: 50%">
75     <dl>
76     <dt>cDNA libraries</dt>
77     <dd><% $search{library} %></dd>
78     <dt>Annotations</dt>
79     <dd>
80       <% $search{manual_annotations} %>
81       <% $search{automatic_annotations} %>
82     </dd>
83     <dt>Web pages</dt>
84     <dd>
85       <% $search{sgn_pages} %>
86       <% $search{external_link} %>
87       <% $search{web} %>
88     </dd>
89     </dl>
90   </div>
91 </&>
93 <%init>
95   use HTML::Entities;
97   my %search = %$results;
98   for my $search ( values %search ) {
99       my ( $url, $desc ) = @{$search->{result}};
100       my $time  = $show_times ? sprintf(' (%0.1f sec)', $search->{time}) : '';
101       my $html = $url ? qq|<div><a class="quicksearch_hit" href="$search->{result}[0]">$search->{result}[1]$time</a></div>|
102                       : qq|<div class="ghosted">$desc$time</div>|;
103       $search = $html;
104   }
106 </%init>