create slice shown only when user is in at least one project
authorCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Thu, 16 Apr 2015 14:58:10 +0000 (16:58 +0200)
committerCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Thu, 16 Apr 2015 14:58:10 +0000 (16:58 +0200)
portal/static/css/fed4fire.css
portal/templates/base.html
portal/templates/fed4fire/fed4fire_home-view.html

index 735e78e..99e57d4 100644 (file)
@@ -717,6 +717,9 @@ div.dashboard span.glyphicon {
     width:45px;
     height:25px;
 }
+div.dashboard-create-slice {
+    display:none;
+}
 div.experiment-tools {
 }
 div.experiment-tools h4 {
index fd1869e..27c17ea 100644 (file)
@@ -76,12 +76,12 @@ $(document).ready(function() {
             slices.push("no slice");
         }else{
             slices = user.slices;
-            drawSlices(slices);
+            //drawSlices(slices);
         }
         {% if theme == "fed4fire" %}
         p = myslice.projects();
         if(p != null){
-            drawProjects(p);
+            //drawProjects(p);
             drawProjectsTree(p,slices);
         }
         {% endif %}
@@ -126,7 +126,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();
index 5d05b48..f4e6b4f 100644 (file)
@@ -31,7 +31,8 @@
             <div>
                 
                 <span class="glyphicon glyphicon-cog"></span> <a href="/portal/project_request/">Create/Join project</a>
-                <br />
+            </div>
+            <div class="dashboard-create-slice">
                 <span class="glyphicon glyphicon-plus"></span> <a href="/portal/slice_request/">Create slice</a>
             </div>
             <div class="projects-tree">
@@ -42,7 +43,7 @@
                 those slices will not appear here. <br /><br /> A <b>project</b> is a sub-authority under the responsability of your institution gathering users, 
                 who will be able to create slices for their experiments." class="glyphicon glyphicon-info-sign">&nbsp;</span> 
              
-                <div id="home-project-tree"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
+                <div id="home-project-tree"><img class="projects-loading" src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
             </div>
                         
             <div class="experiment-tools">