merged changes
[myslice.git] / portal / templates / onelab / onelab_home-view.html
index a166e1b..b297024 100644 (file)
@@ -14,9 +14,9 @@
                                <td>SUPPORT</td>
                        </tr>
                        <tr>
-                               <td><a href="./portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
+                               <td><a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
                                <td><a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
-                               <td><a href="./portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
+                               <td><a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
                        </tr>
                        <tr>
                                {% if person %}
@@ -36,6 +36,7 @@
                                <td>
                                {% if person %}
                                        <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request a Slice</button>
+                                       <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
                                {% else %}
                                {% endif %}
                                </td>
@@ -57,9 +58,9 @@
                                <td>REQUESTS</td>
                        </tr>
                        <tr>
-                               <td><a href="./portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
+                               <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><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></td>
+                               <td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
                        </tr>
                        <tr>
                                {% if person %}
                });
                $('button#ticketbtn').click(function() {
                        window.location="/portal/contact/";
-               })
-               ;$('button#slicerequestbtn').click(function() {
+               });
+               $('button#slicerequestbtn').click(function() {
                        window.location="/portal/slice_request/";
                });
+               
+               {% if person %}
+               $.getJSON("rest/user", function( data ) {
+                 var items = [];
+                 $.each( data[0].slice, function( key, val ) {
+                       items.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+                 });
+                 
+                 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+                 
+               });
+               {% endif %}
        });
 </script>
 {% endblock unfold_main %}