X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Ftemplates%2Ffibre%2Ffibre_institution.html;fp=portal%2Ftemplates%2Ffibre%2Ffibre_institution.html;h=3ee7a5531174ac0734d1882d21c42949c4675d52;hb=e494918d8e6d9dab21b9ff30c3c2db2157dc0a20;hp=50cbd8c9fd17b1e5d854639dc34ba9453402fc9a;hpb=bcfa189c6a5e3a20fb510fbda6a0a4a5113b46d1;p=myslice.git diff --git a/portal/templates/fibre/fibre_institution.html b/portal/templates/fibre/fibre_institution.html index 50cbd8c9..3ee7a553 100644 --- a/portal/templates/fibre/fibre_institution.html +++ b/portal/templates/fibre/fibre_institution.html @@ -38,8 +38,8 @@ + - @@ -98,10 +98,13 @@ $(document).ready(function() { {% if user_details.parent_authority %} $.post("/rest/slice/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) { + var username = "{{person.username}}"; var list_slices = []; var table_slices = []; /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "users", "slice_urn", "slice_expires" */ $.each( data, function( key, val ) { + if(String(val.users).indexOf("@") != -1){ + if(String(val.users).split("@")[1] == username.split("@")[1]){ list_slices.push( "
  • " + val.slice_hrn + "
  • " ); if(val.nodes=="undefined" || val.nodes==null){ nodes_length=0; @@ -130,7 +133,8 @@ $(document).ready(function() { slice_row += ""; slice_row += ""; table_slices.push(slice_row); - + } + } }); /* $("div#slice-list").html($( ""; - user_row += ""; - user_row += ""; - user_row += ""; - user_row += ""; - user_row += ""; - user_row += ""; - user_row += ""; - table_users.push(user_row); + if (val.user_hrn.indexOf('@') != -1 ){ + if (val.user_hrn.split("@")[1] == username.split("@")[1]){ + list_users.push( "
  • " + val.user_email + "
  • " ); + user_row = ""; + user_row += ""; + user_row += ""; + user_row += ""; + user_row += ""; + user_row += ""; + user_row += ""; + user_row += ""; + table_users.push(user_row);} + } }); $("table#user-tab tr:last").after(table_users.join( "" )); $("div#user-tab-loaded").css("display","block");
    +/-User hrn EmailUser hrn First name Last name Enabled"+val.slice_expires+"
    "+val.user_email+""+val.user_hrn+""+val.user_first_name+""+val.user_last_name+""+val.user_enabled+"
    "+val.user_hrn+""+val.user_email+""+val.user_first_name+""+val.user_last_name+""+val.user_enabled+"