Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into fibre
[unfold.git] / portal / templates / onelab / onelab_institution.html
index c8a668f..bd361de 100644 (file)
                                        <th>+/-</th>
                                        <th>Email</th>
                                        <th>User hrn</th>
+                            <!--
                                        <th>First name</th>
                                        <th>Last name</th>
                                        <th>Enabled</th>
+                            -->
                                        </tr>
                                </table>
                                
@@ -65,7 +67,7 @@
                        <th>Users</th>
                        <th>Url</th>
                        <!-- <th>nodes</th> -->
-                       <th>Expiration</th>
+                       <th>Creation</th>
                    </tr>
                </table>                        
            </div>
@@ -90,7 +92,7 @@ $(document).ready(function() {
     {% if person %}
     {% if user_details.parent_authority %}
 
-        $.post("/rest/slice/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
+        $.post("/rest/slice/",{'fields':['slice_hrn','users','url','slice_date_created'],'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
             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" */
@@ -108,10 +110,10 @@ $(document).ready(function() {
                     users_length=val.users.length;
                 }
 
-                if(val.slice_url=="undefined" || val.slice_url==null){
+                if(val.url=="undefined" || val.url==null){
                     slice_url="";
                 }else{
-                    slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
+                    slice_url="<a href='"+val.url+"' target='_blank'>"+val.url+"</a>";
                 }
                 
                 slice_row = "<tr id='"+val.slice_hrn+"'>";
@@ -120,7 +122,7 @@ $(document).ready(function() {
                 slice_row += "<td>"+users_length+"</td>";
                 slice_row += "<td>"+slice_url+"</td>";
                 //slice_row += "<td>"+nodes_length+"</td>";
-                slice_row += "<td>"+val.slice_expires+"</td>";
+                slice_row += "<td>"+val.slice_date_created+"</td>";
                 slice_row += "</tr>";
                 table_slices.push(slice_row);
                 
@@ -133,7 +135,7 @@ $(document).ready(function() {
         });
                
                
-        $.post("/rest/user/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
+        $.post("/rest/user/",{'fields':['user_hrn','user_email'],'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
             var list_users = [];
             var table_users = [];
                    /* Available fields
@@ -146,9 +148,11 @@ $(document).ready(function() {
                 user_row += "<td><input type='checkbox' class='user' id='"+val.user_hrn+"'></td>";
                 user_row += "<td>"+val.user_email+"</td>";
                 user_row += "<td>"+val.user_hrn+"</td>";
+                /*
                 user_row += "<td>"+val.user_first_name+"</td>";
                 user_row += "<td>"+val.user_last_name+"</td>";
                            user_row += "<td>"+val.user_enabled+"</td>";
+                */
                 user_row += "</tr>";
                 table_users.push(user_row);
             });