Merge pull request #4422 from solgenomics/topic/brapi_pedigree
[sgn.git] / mason / image / index.mas
blobc2c3a6eefa84d94e804de756047a58ffbd6706c9
2 <%doc>
4 =head1 NAME
6 /image/index.mas - a page for displaying image and image details
8 =head1 DESCRIPTION
10 parameters:
12 =over 5
14 =item $object_id
16 The id of the image in the database
18 =item $dbh
20 a database handle
22 =item $person_id
24 the person logged into the system right now
26 =item size
28 the size of the image to display initially
30 =back
32 =head1 AUTHOR
34 Lukas Mueller
36 =cut
38 </%doc>
40 <%args>
41 $object_id => undef
42 $dbh
43 $person_id => undef
44 $size => 'medium'
45 </%args>
47 <%perl> 
49 use SGN::Image;
51 if (!$object_id) { 
52    print "<br /><br />No image is available with these parameters."; 
53    return; 
54  }
56 my $image = SGN::Image->new($dbh, $object_id);
58 </%perl>
60 <& /page/page_title.mas, title=>"SGN Image ".$image->get_name() &>
62 <&| /page/info_section.mas, title=>"Image data" &>
64     <& /page/form.mas, object_type=>'image', object_id=>"$object_id", form_name=> 'image_form', server_side_script => '/image/ajax/image_ajax_form.pl', form_div_name=>'image_info_div', js_object_name=> 'image_form', page_url => '/image/index.pl', alternate_new_button => '' &>
66 </&>
68 <&| /page/info_section.mas, title=>"Image" &>
69     <& /image/display_image.mas, image=>$image, size=>$size &>
70 </&>