fixed label
[sgn.git] / mason / search / phenotypes / qtl.mas
blob41e0e493283aa0c7264dd6070c700eeefa80a6a3
1 <%doc>
2 QTL search form.
3 </%doc>
5 <%perl>
7 my $qtl_tool = CXGN::Phenome::Qtl::Tools->new();
8 my $links    = $qtl_tool->browse_traits();
9 my @qtl_pops = $qtl_tool->has_qtl_data();
11 my  $pop_links;
13 foreach my $qtl_pop (@qtl_pops) 
14   {
15     my $is_public  = $qtl_pop->get_privacy_status();
16     my $owner_id   = $qtl_pop->get_sp_person_id();
17     my $user_type  = $c->user->get_object->get_user_type() if $c->user;
18     my $user_id    = $c->user->get_object->get_sp_person_id if $c->user;
19    
20     if ( $is_public || $user_type eq 'curator' || $user_id == $owner_id )
21       {
22         my $pop_id   = $qtl_pop->get_population_id();
23         my $pop_name = $qtl_pop->get_name();
24         $pop_links  .= qq |<a href="/qtl/population/$pop_id">$pop_name</a> <br /> |;     
25       }
26   }
27   
28 </%perl>
30 <div class="container-fluid">
32 <&| /page/info_section.mas, title => 'Search QTLs', collapsible=>1, collapsed=>0, subtitle=>'[<a href="/qtl/form">Submit QTL Data</a>]   [<a href="/qtl/submission/guide">Submission Guide</a>]   [<a href="/qtl/search/help">Search Help</a>]' &>
34 <form  action= "/qtl/search/results" method="post">
35   <table align=center cellpadding=20px>
36     <tr>
37       <td>
38         <h4>Browse Traits With QTLs: <% $links %></h4>
39       </td>
40     </tr>
41   </table>
42   <br/>
43   <div class="well">
44   <table align=center>
45     <tr>
46       <td><h5>Search QTLs With Trait Name:</h5></td>
47     </tr>
48     <tr>
49       <td><input class="form-control" type="text" name="trait" >
50       <br/><input class="btn btn-primary" type="submit" value="Search"></td>
51     </tr>
52   </table>
53   </div>
54   <table align=center cellpadding=20px>
55     <tr>
56       <td>
57         <h4>Browse QTL Populations:</h4><br/><% $pop_links %>
58       </td>
59     </tr>
60   </table>
61 </form>
63 </&>
65 </div>