7 /image/display_image.mas - a mason component to display an image, initially written for the image detail page
17 a CXGN::Image object for the image to be displayed.
21 the user who is currently logged in.
25 The size of the image to display initially
31 Lukas Mueller <lam87@cornell.edu>
45 <& /util/import_javascript.mas, classes => [ 'CXGN.Image', 'Prototype' ] &>
48 <div id="image_size_toolbar">
54 <script language="javascript">
57 function renderContent(image_id, size) {
58 showTabsMenu(image_id, size);
60 getImage(image_id, size);
64 function getImage(image_id, size) {
66 var image = new CXGN.Image;
68 image.set_image_id(image_id);
69 image.image_html('image_div', size);
72 function showTabsMenu(image_id, size) {
73 // alert('size = '+size);
74 var html = "<center>";
75 var mydiv = document.getElementById('image_size_toolbar');
76 var tabList = new Array('thumbnail', 'small', 'medium', 'large', 'original');
80 for (var i=0; i<tabList.length; i++ ) {
85 html = html + item + " ";
88 html = html + '<a href=\"javascript:renderContent('+image_id+', \''+item+'\'); ">'+item+'</a>'+ ' ';
91 html = html + "</center>";
92 mydiv.innerHTML = html;
105 use CXGN::Phenome::Individual;
107 my $image_full_size_url = $image->get_image_url("large");
108 my $object_id = $image->get_image_id();
110 if ($size!~/thumbnail|small|medium|large|original/ ) { $size="medium"; }
116 <script language="javascript">
118 renderContent(<% $object_id %>, '<% $size %>' );
121 <!-- <br /><a href="<% $image_full_size_url %>"> -->
122 <!-- <center><% $image->get_img_src_tag($size) %></center> -->
123 <!-- </a><br /><br /> -->
125 <center><table><tr><td class="boxbgcolor5"><b>Note:</b> The above image may be subject to copyright. Please contact the submitter about permissions to use the image.</td></tr></table></center><br />
127 % my $tag_count = scalar($image->get_tags());
128 <br><b>Associated tags</b> [<a href="/tag/index.pl?image_id=<% $object_id %>&action=new">add/remove</a>]: <% $tag_count %>
130 % foreach my $tag ($image->get_tags()) {
131 % print $tag->get_name()." ";
134 <br /><br /><b>Associated objects</b>: <br />
136 % print $image->get_associated_object_links();