Multiple Messages supported when sending Renew to several AMs
[unfold.git] / portal / templates / base.html
index c83c2bd..8fbc2bb 100644 (file)
@@ -55,6 +55,7 @@
 {% insert_str prelude "css/topmenu.css" %}
 {% insert_str prelude "js/logout.js" %}
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/myslice.css">
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/jquery.qtip.min.css">
 
 
@@ -76,9 +77,11 @@ $(document).ready(function() {
             slices.push("no slice");
         }else{
             slices = user.slices;
-            //drawSlices(slices);
+            {% if theme != "fed4fire" or  "onelab" in theme %}
+            drawSlices(slices);
+            {% endif %}
         }
-        {% if theme == "fed4fire" %}
+        {% if theme == "fed4fire" or "onelab" in theme%}
         p = myslice.get_projects();
         if(p != null){
             //drawProjects(p);
@@ -91,18 +94,18 @@ $(document).ready(function() {
         var items = [];
                
         $.each( slices, function(i, val) {
-            items.push( "<li><a href=\"/resources/"+val+"\">" + val + "</a></li>" );
+            items.push( "<li><a href=\"/resources/"+val+"\" title='Add resources to slice "+val+"'><img src='/static/img/icon_slices_small.png' style='width: 12px;'>" + val + "</a></li>" );
         });
         $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
         $("ul#dropdown-slice-list").append(items.join( "" ));
     }
     
-    {% if theme == "fed4fire" %}
+    {% if theme == "fed4fire" or "onelab" in theme%}
     function drawProjects(projects){
         var items = [];
                
         $.each( projects, function(i, val) {
-            items.push( "<li><a href=\"/portal/project/"+val+"\">" + val + "</a></li>" );
+            items.push( "<li><a href=\"/portal/project/"+val+"\" title='Manage project "+val+"'>" + val + "</a></li>" );
         });
         $("div#home-project-list").html($( "<ul/>", { html: items.join( "" ) }));
         $("ul#dropdown-project-list").append(items.join( "" ));
@@ -112,12 +115,12 @@ $(document).ready(function() {
         var items_sl = [];
         $.each( projects, function(i, p) {
             $.each( slices, function(y, s) {
-                console.log(escapeRegExp(p));
                 if (s.match('^' + escapeRegExp(p))) {
-                     items_sl.push( "<li><a href=\"/resources/" + s + "\">" + s.replace(p + '.','') + "</a></li>" );
+                     slicename = s.replace(p + '.','')
+                     items_sl.push( "<li><a href=\"/resources/" + s + "\" title='Add resources to slice "+slicename+"'><img src='/static/img/icon_slices_small.png' style='width: 12px;'>  " + slicename + "</a></li>" );
                 }
             });
-            el = "<li><a href=\"/portal/project/" + p + "\">" + p + "</a>";
+            el = "<li><a href=\"/portal/project/" + p + "\" title='Manage project "+p+"' >" + p + "</a>";
             if (items_sl.length > 0) {
                 el += "<ul>" + items_sl.join( "" ) + "</ul>";
             }
@@ -133,7 +136,7 @@ $(document).ready(function() {
     
     window.setTimeout(function() {
         $('.projects-loading').hide();
-    },10000);
+    },20000);
     {% endif %}
 {% endif %}
        jQuery('[title!=""]').qtip();