X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Ftemplates%2Fbase.html;h=82fa444f6efcb2b2517e920e8fe32a873c804e74;hb=335a5be14ae49e9f9ed35710be9e516f9ea8b789;hp=df8fd9c12773e06d962e484ad48f4e637b5b9fda;hpb=558fe659b62f98ccc7f4e64cab68dee712a9be30;p=myslice.git diff --git a/portal/templates/base.html b/portal/templates/base.html index df8fd9c1..82fa444f 100644 --- a/portal/templates/base.html +++ b/portal/templates/base.html @@ -3,7 +3,16 @@ {{theme}} portal - {{ section }} - + + +{% if theme == "fed4fire" %} + +{% elif theme == "smartfire" %} + +{% else %} + +{% endif %} + {# This is where insert_str will end up #}{% media_container prelude %} {% include 'messages-transient-header.html' %} @@ -14,10 +23,16 @@ + + + + + {{ header_prelude }} {% block head %} {% endblock head %} {# let's add these ones no matter what #} +{#NOTE: DO NOT ADD JQUERY-UI JS & CSS HERE. IT BREAKS THE RESOURCE BROWSING PAGE -- DETAILS WITH JORDAN AUGE#} {% insert_str prelude "js/jquery.min.js" %} {% insert_str prelude "js/angular/angular.min.js" %} {% insert_str prelude "js/jquery.html5storage.min.js" %} @@ -48,58 +63,58 @@ XXX TODO: session This list of slices should go into SESSION ! */ $(document).ready(function() { - {% if username %} - myslice.login(); - - user = myslice.user(); - - var slices = []; - if($.isEmptyObject(user)){ - $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) { - if(data.length > 0){ - drawSlices(data[0].slices); - }else{ - $("div#home-slice-list").html( - "
You do not yet have a slice
"); - $("ul#dropdown-slice-list").append("
  • no slice
  • "); - slices.push("no slice"); - } - }); - }else{ - slices = user.slices; - drawSlices(slices); - } +{% if username %} + myslice.login(function(){ + user = myslice.user(); - /* - Launch queries to get the resources and leases in Manifold Cache - */ - - $.post("/rest/resource/", function( data ) { - }); - $.post("/rest/lease/", function( data ) { + var slices = []; + if($.isEmptyObject(user)){ + $("div#home-slice-list").html( + "
    You do not yet have a slice
    "); + $("ul#dropdown-slice-list").append("
  • no slice
  • "); + slices.push("no slice"); + }else{ + slices = user.slices; + drawSlices(slices); + } + {% if theme == "fed4fire" %} + p = myslice.projects(); + if(p != null){ + drawProjects(p); + } + {% endif %} }); - function drawSlices(slices){ var items = []; $.each( slices, function(i, val) { items.push( "
  • " + val + "
  • " ); - /* - Launch a Query for each slice to get resources and leases in Manifold Cache - */ - $.post("/rest/slice/", { 'filters': { 'slice_hrn' : val } }, function(data) { - }); }); $("div#home-slice-list").html($( "