From: Jordan Augé Date: Wed, 26 Feb 2014 16:27:20 +0000 (+0100) Subject: Instituiton - list of slices - ple.upmc hardcoded X-Git-Tag: myslice-1.1~287^2~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ba5bd31c6e9b4b0b4b54659ea6a1147f62d9bf46;hp=50b0885272edb338be08c7dab5cbf0c694a5aa2c;p=unfold.git Instituiton - list of slices - ple.upmc hardcoded --- diff --git a/portal/templates/institution.html b/portal/templates/institution.html index 0f68468e..44aa55d9 100644 --- a/portal/templates/institution.html +++ b/portal/templates/institution.html @@ -69,29 +69,22 @@ @@ -111,6 +104,48 @@ window.location="/portal/slice_request/"; */ }); + {% if person %} + $.getJSON("/rest/slice/", function( data ) { + var list_slices = []; + var table_slices = []; + /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "user", "slice_urn", "slice_expires" */ + $.each( data, function( key, val ) { + list_slices.push( "
  • " + val.slice_hrn + "
  • " ); + if(val.nodes=="undefined" || val.nodes==null){ + nodes_length=0; + }else{ + nodes_length=val.nodes.length; + } + + if(val.user=="undefined" || val.user==null){ + user_length=0; + }else{ + user_length=val.user.length; + } + + if(val.slice_url=="undefined" || val.slice_url==null){ + slice_url=""; + }else{ + slice_url=""+val.slice_url+""; + } + + slice_row = ""; + slice_row += ""; + slice_row += "" + val.slice_hrn + ""; + slice_row += ""+user_length+""; + slice_row += ""+slice_url+""; + slice_row += ""+nodes_length+""; + slice_row += ""+val.slice_expires+""; + table_slices.push(slice_row); + + }); + + /* $("div#slice-list").html($( "