request.session.user.pi to know if the user is_pi not to Query everytime
[myslice.git] / portal / templates / base.html
index fd1869e..4b5999e 100644 (file)
@@ -66,7 +66,7 @@ This list of slices should go into SESSION !
 $(document).ready(function() {
 {% if username %}
     myslice.login(function(){
-        user = myslice.user();
+        user = myslice.get_user();
 
         var slices = [];
         if($.isEmptyObject(user)){
@@ -76,12 +76,14 @@ $(document).ready(function() {
             slices.push("no slice");
         }else{
             slices = user.slices;
+            {% if theme != "fed4fire" %}
             drawSlices(slices);
+            {% endif %}
         }
         {% if theme == "fed4fire" %}
-        p = myslice.projects();
+        p = myslice.get_projects();
         if(p != null){
-            drawProjects(p);
+            //drawProjects(p);
             drawProjectsTree(p,slices);
         }
         {% endif %}
@@ -126,7 +128,14 @@ $(document).ready(function() {
             items_sl = [];
         });
         $("div#home-project-tree").html($( "<ul/>", { html: items.join( "" ) }));
+        if (projects.length > 0) {
+            $('.dashboard-create-slice').show();
+        }
     }
+    
+    window.setTimeout(function() {
+        $('.projects-loading').hide();
+    },10000);
     {% endif %}
 {% endif %}
        jQuery('[title!=""]').qtip();