upload fieldbook from manage phenotyping
[sgn.git] / mason / phenome / display_owners.mas
bloba9371373b52226880ff2f95a606d7e864611332a
3 <%doc>
5 =head1 NAME
7 /phenome/assign_owner.mas - a component for displaying object (locus/stock etc) owner form
9 =head1 DESCRIPTION
12 Parameters:
14 =over 3
16 =item object_id
18 object  id
20 =item  object_type
22 the type of the object (e.g. 'locus', 'stock')
25 =item owners_div
26 defaults to 'object_owners'
28 =back
30 =head1 AUTHOR
32 Naama Menda <nm249@cornell.edu>
34 =cut
36 </%doc>
38 <%args>
40   $object_id
41   $object_type
42   $owners_div => 'object_owners'
43 </%args>
45 <div id = "<% $owners_div %>" >&nbsp;Loading..</div>
47 <script language="javascript">
49   jQuery(document).ready(function() { 
51   display_owners("<% $owners_div %>");
53   function display_owners(owners_div) {
54   jQuery.ajax( { url: "/<% $object_type %>/<% $object_id %>/owners" , dataType: "json",
55       success: function(response) {
56          jQuery("#"+owners_div).html(response.html);   
57       }
58   } );
61 });
63 </script>