</td>
<td>
{% if person %}
- <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request a Slice</button>
+ <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
<div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
{% else %}
{% endif %}
</tr>
<tr>
<td><a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
- <td><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></td>
+ <td><a href="/portal/institution#slices"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
<td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
</tr>
<tr>
</td>
<td>
{% if person %}
- <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create a Slice</button>
+ <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
{% endif %}
</td>
<td class="support">
{% if person %}
$.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
var items = [];
- $.each( data[0].slice, function( key, val ) {
- items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
- });
-
- $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
-
+ if(data.length > 0){
+ $.each( data[0].slices, function(i, val) {
+ items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
+ });
+ $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+ }else{
+ $("div#home-slice-list").html("no slice");
+ }
});
{% endif %}
});