Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
authorYasin <mohammed-yasin.rahman@lip6.fr>
Wed, 23 Apr 2014 09:48:27 +0000 (11:48 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Wed, 23 Apr 2014 09:48:27 +0000 (11:48 +0200)
portal/templates/home-view.html
portal/templates/institution.html
portal/templates/onelab/onelab_institution.html

index d31c3e0..c008692 100644 (file)
                                        <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 %}
+                                       <button id="signupbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-user"></span> Sign Up</button>
                                {% endif %}
                                </td>
                                <td class="support">
-                                       <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
-                                       <div>
-                                               <a href="/portal/contact">Contact</a> <br />
-                                       <!--    <a href="/portal/support/documentation">Documentation</a> -->
-                                       </div>
+                                       <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
                                </td>
                        </tr>
                </table>
                $('button#ticketbtn').click(function() {
                        window.location="/portal/contact/";
                });
+               $('button#signupbtn').click(function() {
+                       window.location="/portal/register/";
+               });
                $('button#slicerequestbtn').click(function() {
                        window.location="/portal/slice_request/";
                });
index ea404fc..8ec395b 100644 (file)
@@ -89,7 +89,7 @@
         $.post("/rest/slice/",{'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", "user", "slice_urn", "slice_expires" */
+            /* "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 ) {
                 list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
                 if(val.nodes=="undefined" || val.nodes==null){
                 }else{
                     nodes_length=val.nodes.length;
                 }
-
-                if(val.user=="undefined" || val.user==null){
-                    user_length=0;
+                if(val.users=="undefined" || val.users==null){
+                    users_length=0;
                 }else{
-                    user_length=val.user.length;
+                    users_length=val.users.length;
                 }
 
                 if(val.slice_url=="undefined" || val.slice_url==null){
                 slice_row = "<tr id='"+val.slice_hrn+"'>";
                 slice_row += "<td><input type='checkbox' class='slice' id='"+val.slice_hrn+"'></td>";
                 slice_row += "<td><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
-                slice_row += "<td>"+user_length+"</td>";
+                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>";
index 1b6a122..0a424fa 100644 (file)
         $.post("/rest/slice/",{'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", "user", "slice_urn", "slice_expires" */
+            /* "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 ) {
                 list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
                 if(val.nodes=="undefined" || val.nodes==null){
                 }else{
                     nodes_length=val.nodes.length;
                 }
-
-                if(val.user=="undefined" || val.user==null){
-                    user_length=0;
+                console.log(val);
+                if(val.users=="undefined" || val.users==null){
+                    users_length=0;
                 }else{
-                    user_length=val.user.length;
+                    users_length=val.users.length;
                 }
 
                 if(val.slice_url=="undefined" || val.slice_url==null){
                 slice_row = "<tr id='"+val.slice_hrn+"'>";
                 slice_row += "<td><input type='checkbox' class='slice' id='"+val.slice_hrn+"'></td>";
                 slice_row += "<td><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
-                slice_row += "<td>"+user_length+"</td>";
+                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>";