X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Ftemplates%2Fonelab%2Fonelab_home-view.html;h=090f66bfb92659c142183df15529888a1d52dd8c;hb=dd64244a2dfe1ae24c9fb6b2cde38ff455b21687;hp=4915b9e2c2f1afd949473b750a963903a84be61d;hpb=d251934bd71c678f552dc9a1d49c3f8efe102e1e;p=myslice.git
diff --git a/portal/templates/onelab/onelab_home-view.html b/portal/templates/onelab/onelab_home-view.html
index 4915b9e2..090f66bf 100644
--- a/portal/templates/onelab/onelab_home-view.html
+++ b/portal/templates/onelab/onelab_home-view.html
@@ -35,7 +35,7 @@
{% if person %}
-
+
{% else %}
{% endif %}
@@ -73,7 +73,7 @@
|
{% if person %}
-
+
{% endif %}
|
@@ -106,12 +106,14 @@
{% if person %}
$.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
var items = [];
- $.each( data[0].slices, function(i, val) {
- items.push( "" + val + "" );
- });
-
- $("div#home-slice-list").html($( "", { html: items.join( "" ) }));
-
+ if(data.length > 0){
+ $.each( data[0].slices, function(i, val) {
+ items.push( "" + val + "" );
+ });
+ $("div#home-slice-list").html($( "", { html: items.join( "" ) }));
+ }else{
+ $("div#home-slice-list").html("no slice");
+ }
});
{% endif %}
});
|