From: Ciro Scognamiglio Date: Thu, 27 Mar 2014 10:51:28 +0000 (+0100) Subject: Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab X-Git-Tag: myslice-1.1~170^2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=be718e3336ee7ad98e90b0b3c97b58b37a467788;hp=6a832d61d008d5dd1a41df9fe3f63867e31da79e;p=myslice.git Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab --- diff --git a/myslice/settings.py b/myslice/settings.py index 21c28978..ccf94ddb 100644 --- a/myslice/settings.py +++ b/myslice/settings.py @@ -2,6 +2,7 @@ import os.path + DEBUG = True TEMPLATE_DEBUG = DEBUG @@ -19,6 +20,12 @@ except: import traceback traceback.print_exc() +# themes +from myslice.configengine import ConfigEngine +configEngine = ConfigEngine() +if configEngine.myslice.theme : + theme = configEngine.myslice.theme + # find out HTTPROOT, which is different from ROOT # when deployed from a package # this code is run by collectstatic too, so we cannot @@ -186,6 +193,8 @@ TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. + os.path.join(HTTPROOT,"portal/templates", theme), + os.path.join(HTTPROOT,"portal/templates"), os.path.join(HTTPROOT,"templates"), ) diff --git a/portal/theme.py b/myslice/theme.py similarity index 100% rename from portal/theme.py rename to myslice/theme.py diff --git a/portal/about.py b/portal/about.py index 49a890bb..5080601f 100644 --- a/portal/about.py +++ b/portal/about.py @@ -12,7 +12,7 @@ from manifoldapi.manifoldresult import ManifoldResult from ui.topmenu import topmenu_items, the_user from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView class AboutView (FreeAccessView, ThemeView): template_name = 'about.html' diff --git a/portal/accountview.py b/portal/accountview.py index 9b0c4666..8243e392 100644 --- a/portal/accountview.py +++ b/portal/accountview.py @@ -11,7 +11,7 @@ from django.http import HttpResponse, HttpResponseRedirec from django.contrib import messages from django.contrib.auth.decorators import login_required -from theme import ThemeView +from myslice.theme import ThemeView # import json, os, re, itertools diff --git a/portal/actions.py b/portal/actions.py index 399cae64..c612b096 100644 --- a/portal/actions.py +++ b/portal/actions.py @@ -8,7 +8,7 @@ from django.contrib.auth.models import User from django.template.loader import render_to_string from django.core.mail import EmailMultiAlternatives -from theme import ThemeView +from myslice.theme import ThemeView theme = ThemeView() diff --git a/portal/contactview.py b/portal/contactview.py index 13450dfd..b89aa753 100644 --- a/portal/contactview.py +++ b/portal/contactview.py @@ -7,7 +7,7 @@ from ui.topmenu import topmenu_items, the_user from portal.forms import ContactForm -from theme import ThemeView +from myslice.theme import ThemeView # splitting the 2 functions done here # GET is for displaying the empty form diff --git a/portal/dashboardview.py b/portal/dashboardview.py index 2b0ab828..06f02f83 100644 --- a/portal/dashboardview.py +++ b/portal/dashboardview.py @@ -11,7 +11,7 @@ from unfold.loginrequired import LoginRequiredAutoLogoutView from ui.topmenu import topmenu_items_live, the_user -from theme import ThemeView +from myslice.theme import ThemeView #This view requires login class DashboardView (LoginRequiredAutoLogoutView, ThemeView): diff --git a/portal/django_passresetview.py b/portal/django_passresetview.py index 7d7f52e9..a0018b0f 100644 --- a/portal/django_passresetview.py +++ b/portal/django_passresetview.py @@ -87,7 +87,7 @@ from portal.actions import manifold_update_user from portal.forms import PassResetForm from portal.actions import manifold_update_user -from theme import ThemeView +from myslice.theme import ThemeView # 4 views for password reset: # - password_reset sends the mail diff --git a/portal/documentationview.py b/portal/documentationview.py index 6a75a629..ccd42fa1 100644 --- a/portal/documentationview.py +++ b/portal/documentationview.py @@ -12,7 +12,7 @@ from manifoldapi.manifoldresult import ManifoldResult from ui.topmenu import topmenu_items, the_user from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView class DocumentationView (FreeAccessView, ThemeView): template_name = 'documentationview.html' diff --git a/portal/homeview.py b/portal/homeview.py index 14487c96..7c47d99c 100644 --- a/portal/homeview.py +++ b/portal/homeview.py @@ -12,7 +12,7 @@ from manifoldapi.manifoldresult import ManifoldResult from ui.topmenu import topmenu_items, the_user from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView class HomeView (FreeAccessView, ThemeView): template_name = 'home-view.html' diff --git a/portal/institution.py b/portal/institution.py index 6c55517d..4ee9016b 100644 --- a/portal/institution.py +++ b/portal/institution.py @@ -13,7 +13,7 @@ from manifoldapi.manifoldresult import ManifoldResult from ui.topmenu import topmenu_items, the_user from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView import json class InstitutionView (FreeAccessView, ThemeView): diff --git a/portal/joinview.py b/portal/joinview.py index abe73f39..a2b8b7d9 100644 --- a/portal/joinview.py +++ b/portal/joinview.py @@ -19,7 +19,7 @@ from manifold.core.query import Query from portal.models import PendingUser,PendingAuthority from portal.actions import authority_get_pi_emails, manifold_add_user,manifold_add_account -from theme import ThemeView +from myslice.theme import ThemeView # since we inherit from FreeAccessView we cannot redefine 'dispatch' # so let's override 'get' and 'post' instead diff --git a/portal/manageuserview.py b/portal/manageuserview.py index 369d6e95..7687d341 100644 --- a/portal/manageuserview.py +++ b/portal/manageuserview.py @@ -10,7 +10,7 @@ from ui.topmenu import topmenu_items_live, the_user from django.http import HttpResponse, HttpResponseRedirect from django.contrib import messages from django.contrib.auth.decorators import login_required -from theme import ThemeView +from myslice.theme import ThemeView # import json, os, re, itertools diff --git a/portal/platformsview.py b/portal/platformsview.py index eef773a3..c31cd174 100644 --- a/portal/platformsview.py +++ b/portal/platformsview.py @@ -5,7 +5,7 @@ from unfold.loginrequired import FreeAccessView from ui.topmenu import topmenu_items_live, the_user from plugins.querytable import QueryTable -from theme import ThemeView +from myslice.theme import ThemeView # View for platforms class PlatformsView(FreeAccessView, ThemeView): diff --git a/portal/platformview.py b/portal/platformview.py index d70c99b5..b0fc3ec7 100644 --- a/portal/platformview.py +++ b/portal/platformview.py @@ -15,7 +15,7 @@ from ui.topmenu import topmenu_items_live, the_user from plugins.querytable import QueryTable from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView # View for 1 platform and its details class PlatformView(FreeAccessView, ThemeView): diff --git a/portal/registrationview.py b/portal/registrationview.py index 9f5f39f4..396d357b 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -17,7 +17,7 @@ from manifold.core.query import Query from portal.models import PendingUser from portal.actions import create_pending_user -from theme import ThemeView +from myslice.theme import ThemeView # since we inherit from FreeAccessView we cannot redefine 'dispatch' # so let's override 'get' and 'post' instead diff --git a/portal/resourceview.py b/portal/resourceview.py index a407725a..d670645b 100644 --- a/portal/resourceview.py +++ b/portal/resourceview.py @@ -10,7 +10,7 @@ from plugins.lists.simplelist import SimpleList from plugins.slicestat import SliceStat from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView # View for 1 platform and its details class ResourceView(FreeAccessView, ThemeView): diff --git a/portal/slicerequestview.py b/portal/slicerequestview.py index dfa46585..fc093d12 100644 --- a/portal/slicerequestview.py +++ b/portal/slicerequestview.py @@ -10,7 +10,7 @@ from portal.forms import SliceRequestForm from unfold.loginrequired import LoginRequiredAutoLogoutView from ui.topmenu import topmenu_items_live, the_user -from theme import ThemeView +from myslice.theme import ThemeView import json, time diff --git a/portal/sliceresourceview.py b/portal/sliceresourceview.py index 3ba1084c..7d4ab089 100644 --- a/portal/sliceresourceview.py +++ b/portal/sliceresourceview.py @@ -19,7 +19,7 @@ from plugins.queryupdater import QueryUpdater from plugins.testbeds import TestbedsPlugin from plugins.scheduler2 import Scheduler2 -from theme import ThemeView +from myslice.theme import ThemeView class SliceResourceView (LoginRequiredView, ThemeView): template_name = "slice-resource-view.html" diff --git a/portal/slicetabexperiment.py b/portal/slicetabexperiment.py index cd1d6adb..cca8afbd 100644 --- a/portal/slicetabexperiment.py +++ b/portal/slicetabexperiment.py @@ -12,7 +12,7 @@ from manifoldapi.manifoldresult import ManifoldResult from ui.topmenu import topmenu_items, the_user from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView class ExperimentView (FreeAccessView, ThemeView): template_name = 'slice-tab-experiment.html' diff --git a/portal/slicetabinfo.py b/portal/slicetabinfo.py index 7e7b78ea..fc7fa291 100644 --- a/portal/slicetabinfo.py +++ b/portal/slicetabinfo.py @@ -14,7 +14,7 @@ from unfold.page import Page from manifold.core.query import Query, AnalyzedQuery from manifoldapi.manifoldapi import execute_query -from theme import ThemeView +from myslice.theme import ThemeView class SliceInfoView (LoginRequiredView, ThemeView): template_name = "slice-tab-info.html" diff --git a/portal/slicetabtestbeds.py b/portal/slicetabtestbeds.py index a93f6787..abd6ce65 100644 --- a/portal/slicetabtestbeds.py +++ b/portal/slicetabtestbeds.py @@ -3,7 +3,7 @@ from django.shortcuts import render_to_response from unfold.loginrequired import LoginRequiredView -from theme import ThemeView +from myslice.theme import ThemeView class SliceTabTestbeds (LoginRequiredView, ThemeView): template_name = "slice-tab-testbeds.html" diff --git a/portal/slicetabusers.py b/portal/slicetabusers.py index e1a1742f..861b0cbe 100644 --- a/portal/slicetabusers.py +++ b/portal/slicetabusers.py @@ -14,7 +14,7 @@ from unfold.page import Page from manifold.core.query import Query, AnalyzedQuery from manifoldapi.manifoldapi import execute_query -from theme import ThemeView +from myslice.theme import ThemeView class SliceUserView (LoginRequiredView, ThemeView): template_name = "slice-tab-users-view.html" diff --git a/portal/sliceview.py b/portal/sliceview.py index 008222c1..10cab7cd 100644 --- a/portal/sliceview.py +++ b/portal/sliceview.py @@ -14,7 +14,7 @@ from unfold.page import Page from manifold.core.query import Query, AnalyzedQuery from manifoldapi.manifoldapi import execute_query -from theme import ThemeView +from myslice.theme import ThemeView class SliceView (LoginRequiredView, ThemeView): template_name = "slice-view.html" diff --git a/portal/sliceviewold.py b/portal/sliceviewold.py index e7991537..7cf80f93 100644 --- a/portal/sliceviewold.py +++ b/portal/sliceviewold.py @@ -31,7 +31,7 @@ from plugins.slicestat import SliceStat from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView tmp_default_slice='ple.upmc.myslicedemo' diff --git a/portal/static/css/fantaastic.css b/portal/static/css/fantaastic.css new file mode 100644 index 00000000..07a77eb6 --- /dev/null +++ b/portal/static/css/fantaastic.css @@ -0,0 +1,480 @@ +html { height: 100% } + +body { + background-color:white; + color:black; + margin:0; + padding:0; + height: 100%; +} +a, a:active, a:focus { + outline: 0; +} + +h1 { + border-bottom:1px solid #DDDDDD; + padding:0 0 0 0; + margin:0 0 0 0; + font-size:18pt; +} +h1 img { + vertical-align:middle; + margin-bottom:6px; +} +h2 { + font-size:14pt; + color:#333333; +} +h3 { + font-size:13pt; + color:#201E62; +} + +div.wrapper { + width:980px; + margin:0 auto; + position:relative; +} +div.container { + width:980px; + margin:25px auto; +} +div.wide { + margin:25px auto; + padding:0 25px; +} + +span.label { + font-size:11pt; + color:gray; + font-weight:normal; + padding:0; +} +/***** Notifications *****/ +.warning { + border: 1px solid red; + margin: 20px 60px; + padding: 10px 20px; + color: red; + background-color: #f2dbdb; + text-align: center; +} +/* HEADER */ +div#header { + height:100px; + background-color:white; +} + +div#secondary { + +} + +div#secondary ul { + position:absolute; + top:20px; + right:0; +} + +div#secondary li { + font-size:10pt; + float:left; + list-style:none; + margin-right:30px; +} +div#secondary li a { + color:black; +} +div#secondary li a:hover { + color:#270A5A; + text-decoration:none; +} +div#secondary li:last-child { + margin-right:0; +} + +div#navigation { + background-color:black; + width:100%; + height:40px; +} +div#navigation div.wrapper { + text-align:center; +} +div#navigation ul { + margin:0; + padding:0; + display: inline-block; + list-style-type: none; + white-space: nowrap; +} + +div#navigation li { + color:white; + font-family:helvetica, sans-serif; + font-size:10pt ; + font-weight:normal; + line-height:0.8em; + letter-spacing:0.6pt; + list-style:none; + float:left; + padding:0; + margin:15px 50px 0 0; +} +div#navigation li a { + color:white; +} +div#navigation li a:hover { + text-decoration:none; + color:#B8B2FF; +} +div#navigation li:last-child { + margin-right:0; +} + +div#navigation li.active { + padding:5px; + padding-top: 15px; + min-height: 40px; + margin-top: 0px; + background-color:gray; + color:#FF0000; +} +div#navigation li.slices { + position:relative; + cursor:pointer; +} +div#navigation .dropdown-menu { + color:white; + padding:0 15px 15px 15px; + margin-top:5px; + margin-left:-16px; + background-color:black; +} +div#navigation .dropdown-menu a { + color:white; +} + +div#menu-slice-list{ + display:none; + position:absolute; + background-color:black; + padding:15px; + left:-15px; + z-index:10; +} + +div#navigation .dropdown-menu li:first-child { + border-bottom:1px solid white; + padding-bottom:5px; + +} +/* HOME DASHBOARD */ +div#home-dashboard { + color:black; + margin:0 auto 25px auto; +} +div#home-dashboard table { + margin:25px; + width:100%; +} +div#home-dashboard table td { + text-align:center; + padding:15px 0; + width:33%; +} +div#home-dashboard table tr:first-child td { + font-size:12pt; + font-weight:bold; + color:#270A5A; +} +div#home-dashboard table tr:last-child td { + vertical-align:top; + padding:25px 0; +} +div#home-dashboard table tr:last-child td.logged-in { + border-right:1px solid #DDDDDD; + padding:25px; +} +div#home-dashboard table tr:last-child td.support { + border-left:1px solid #DDDDDD; + padding:25px; +} +div#home-dashboard table tr:last-child td:first-child { +} +div#home-dashboard table tr:last-child td:last-child { + border-right:0; +} +div#home-dashboard table tr:last-child td.logged-in div { + text-align:left; + padding:25px 0; +} +div#home-dashboard table tr:last-child td.support div { + text-align:left; + padding:25px 0; +} +div#home-dashboard div.login-widget { + padding:20px; +} +div#home-dashboard table td.support { +} +div#home-dashboard table td.support a { +} +div#home-dashboard table td.support a:hover { + text-decoration:none; +} + +div#home-dashboard div#manager { + display:none; +} + +div#home-dashboard div#home-slice-list { + margin:25px 0; + padding:0 25px; + text-align:left; +} +div#home-dashboard div#home-slice-list ul { + list-style: none; + padding:0; + margin:0; +} +div#home-dashboard div#home-slice-list li { + +} + +.login-submit { + vertical-align:middle; + padding:0; +} +.lost-password { + font-size:10pt; + color:#CCCCCC; + text-align:right; + padding:0px; +} +.lost-password a { +} +.login-signup { + border-top:1px solid #CCCCCC; + text-align:center; + margin-top:15px; + padding:5px 0 0 0; +} +/**/ + +/**/ +/* WELL */ +div.well { +} +/**/ +/* BUTTON */ +.btn.btn-default { + font-weight: bold; +} + +.btn.btn-default:hover { + font-weight: bold; +} +/**/ +/* TABLE */ +table.table { + margin:0; +} +table.table thead { + padding:0; +} +table.table tbody { + padding:0; +} +table.table tr { + padding:0; +} +table.table td { + padding:0; +} +/* INSTITUTION */ +div#institution { + color:black; +} +.form-hint { + font-size:11pt; + font-style:italic; + color:gray; +} + + +.form-hint { + font-size:11pt; + font-style:italic; + color:gray; +} + + + +/* TICKET REQUEST */ +div#ticket-request { + color:black; +} +.form-hint { + font-size:11pt; + font-style:italic; + color:gray; +} +div#ticket-request p { + margin:20px 0; +} + +ul.nav-tabs {} +ul.nav-tabs ul {} +ul.nav-tabs li {} + +ul.nav-section li a { + border-bottom:0; +} +ul.nav-section li:first-child { + padding:0; +} +ul.nav-section li:first-child a { + font-weight:bold; + padding:6px 15px 4px 15px; +} +ul.nav-section li:first-child.active a { + padding:6px 15px 3px 15px; +} +ul.nav-section li:first-child img { + margin:0 4px 1px 0; + padding:0; +} + +ul.nav-resources { + margin:15px 0; +} +ul.nav-resources a { + padding: 4px 10px 5px 10px; +} + + +/* SLICE VIEW */ + + +div#slice-view { + margin:0; +} +div.list-group-item { + border:0; + background-color:white; + font-weight:bold; + padding-left:0; +} +a.list-group-item { + border:0; + background-color:white; + padding:3px 0 3px 10px; + border-left:2pt white solid; +} +a.list-group-item.active, a.list-group-item.active:hover { + font-weight: bold; + color:black; + background-color:transparent; + border-left:2pt blue solid; +} +a.list-group-item.active:hover { + background-color:#dddddd; +} +a.list-group-item:hover { + border-left:2pt blue solid; +} +a.list-group-item p.list-group-item-text { + font-size:9pt; + font-style:italic; + font-weight: normal; + color: black !important; +} + +div#slice-info { + margin-top:25px; +} +div#slice-info table { + width:100%; + margin:0 auto; +} +div#slice-info table td:first-child { + text-align:right; + font-weight:bold; + padding-right:15px; +} +div#slice-info td { + padding:5px; +} + +/* SLICE VIEW sections */ +.slice-sections, .slice-pending { + margin:0; + padding:0; +} +.slice-sections ul, .slice-pending ul { + margin:0; + padding:0; +} +.slice-pending ul { + width:400px; + margin:0 auto 15px auto; +} +.slice-sections li { + text-align:left; + margin:0; + padding:0; +} +.slice-pending li { + padding-right:15px; +} +.slice-sections li a, .slice-pending li a { + font-size:14px; + color:black; + padding:0; +} +.slice-sections li.active a, .slice-pending li.active a { + color:#201E62; + background-color:#EFEFEF; + text-decoration:underline; + padding:0; +} +.slice-sections ul.nav-pills li a:hover, .slice-pending ul.nav-pills li a:hover { + text-decoration:underline; + background-color:#EFEFEF; + color:black; +} +.slice-sections ul.nav-pills li.active, .slice-pending ul.nav-pills li.active { + +} +.slice-sections li:first-child, .slice-sections li:first-child a { + color:#201E62; + font-weight:bold; +} +.slice-experiment { + text-align:right; + padding:0; +} +.slice-experiment button { + margin:3px 0 0 0; + background-color:#CC4125; + color:white; +} + +.slice-pending { +} +.slice-pending button { + font-size:9pt; + margin:-2px 0 0 0; + padding:3px 5px; +} +.slice-pending button.apply { +} +.slice-pending button.clear { +} +tr.active, tr.active td { + background-color:#FFFFCC !important; +} +div.dataTables_filter label{ + float:left; + width:400px; +} diff --git a/portal/static/img/fantaastic-s.png b/portal/static/img/fantaastic-s.png new file mode 100644 index 00000000..ea33949d Binary files /dev/null and b/portal/static/img/fantaastic-s.png differ diff --git a/portal/static/img/ict_logo-s.png b/portal/static/img/ict_logo-s.png new file mode 100644 index 00000000..78183ee3 Binary files /dev/null and b/portal/static/img/ict_logo-s.png differ diff --git a/portal/static/js/myslice.js b/portal/static/js/myslice.js index 7038e53e..c7c32d20 100644 --- a/portal/static/js/myslice.js +++ b/portal/static/js/myslice.js @@ -6,24 +6,6 @@ function list() { this.elements = []; } -list.prototype.save = function() { - for (var prop in this) { - if (typeof this[prop] != 'function') { - console.log("prop: " + prop); - } else { - console.log("func: " + prop); - } - } - //localStorage.setItem(name, JSON.stringify(value)); -}; - -list.prototype.load = function(name) { - this.pending = JSON.parse(localStorage.getItem(name)); - if (!this.pending) { - this.pending = []; - } -}; - list.prototype.add = function(element) { if (!this.has(element)) { this.elements.push(element); @@ -60,14 +42,14 @@ function resources() { }; }; -function users() { +function leases() { this.pending = { toremove: new list(), toadd: new list(), }; }; -function leases() { +function users() { this.pending = { toremove: new list(), toadd: new list(), @@ -83,27 +65,19 @@ function slice(name) { this.users = new users(); this.leases = new leases(); -}; -slice.prototype.pending = function() { - -}; -slice.prototype.reserve = function() { - -}; -slice.prototype.unreserve = function() { - }; + /* * User */ -function user(u) { - this.u = u; - this.testbeds = {}; - this.slices = {}; +function user(user) { + this.user = user; + this.testbeds = new list(); + this.slices = new list(); - for (i = 0; i < this.u.slices.length; i++) { - this.slices[this.u.slices[i]] = new slice(this.u.slices[i]); + for (i = 0; i < this.user.slices.length; i++) { + this.slices[this.user.slices[i]] = new slice(this.user.slices[i]); } }; @@ -113,7 +87,7 @@ user.prototype.slice = function(name) { user.prototype.list = function() { for (s in this.slices) { - for (o in s) { + for (o in s) { if (typeof o != 'function') { console.log(o); } else { @@ -128,7 +102,21 @@ user.prototype.list = function() { */ var myslice = { user: {}, - + + user: function() { + if ($.isEmptyObject(this.user)) { + //this.login(function() { return this.user; }); + } else { + return this.user; + } + }, + + login: function(fn) { + $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) { + myslice.user = new user(data[0]); + }); + }, + getSlices: function(name) { }, @@ -197,6 +185,8 @@ var myslice = { $(document).ready(function() { + //console.log(myslice.user().slices); + // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function(data) { // myslice.user = new user(data[0]); // console.log(myslice.user.slices); diff --git a/portal/supportview.py b/portal/supportview.py index bbb5b495..f42bbd87 100644 --- a/portal/supportview.py +++ b/portal/supportview.py @@ -12,7 +12,7 @@ from manifoldapi.manifoldresult import ManifoldResult from ui.topmenu import topmenu_items, the_user from myslice.configengine import ConfigEngine -from theme import ThemeView +from myslice.theme import ThemeView class SupportView (FreeAccessView, ThemeView): template_name = 'supportview.html' diff --git a/portal/templates/onelab/onelab__widget-topmenu.html b/portal/templates/_widget-topmenu.html similarity index 100% rename from portal/templates/onelab/onelab__widget-topmenu.html rename to portal/templates/_widget-topmenu.html diff --git a/ui/templates/base.html b/portal/templates/base.html similarity index 93% rename from ui/templates/base.html rename to portal/templates/base.html index 85139519..6dc48e73 100644 --- a/ui/templates/base.html +++ b/portal/templates/base.html @@ -1,3 +1,4 @@ +{% load portal_filters %} {# This is required by insert_above #}{% insert_handler %} OneLab - {{ section }} @@ -8,6 +9,7 @@ + @@ -33,7 +35,7 @@ {% block container %} {% block topmenu %} - {% include theme|add:"__widget-topmenu.html" %} + {% widget "_widget-topmenu.html" %} {% endblock topmenu %} {% include 'messages-transient.html' %} {% block base_content %} diff --git a/portal/templates/fantaastic/fantaastic_widget-topmenu.html b/portal/templates/fantaastic/fantaastic_widget-topmenu.html new file mode 100644 index 00000000..de37b04c --- /dev/null +++ b/portal/templates/fantaastic/fantaastic_widget-topmenu.html @@ -0,0 +1,76 @@ + + + diff --git a/portal/templates/fed4fire/fed4fire__widget-topmenu.html b/portal/templates/fed4fire/fed4fire_widget-topmenu.html similarity index 100% rename from portal/templates/fed4fire/fed4fire__widget-topmenu.html rename to portal/templates/fed4fire/fed4fire_widget-topmenu.html diff --git a/portal/templates/home-view.html b/portal/templates/home-view.html index c88902d2..453ed2fa 100644 --- a/portal/templates/home-view.html +++ b/portal/templates/home-view.html @@ -1,13 +1,13 @@ {% extends "layout.html" %} +{% load portal_filters %} {% block content %} - -
+
-
+
@@ -15,49 +15,106 @@ - - + + -
ACCOUNTSUPPORT
- {% include '_widget-login-user.html' %} + {% if person %} + + +
+ {% if person.last_name %} + {{person.first_name}} {{person.last_name}}
+ {% endif %} + Email: {{person.email}} +
+ {% else %} +
+ {% widget '_widget-login-user.html' %} + {% endif %} - + {% if person %} + +
Loading Slices
+ {% else %} + {% endif %}
- - + +
-
+
- + - - + + -
INSTITUTION SLICESSUPPORTREQUESTS
- {% include '_widget-login-manager.html' %} + {% if person %} + + + {% else %} + + {% widget '_widget-login-manager.html' %} + {% endif %} - + {% if person %} + + {% endif %} - - + {% if person %} + + {% endif %}
+ {% endblock %} diff --git a/portal/templates/institution-tab-info.html b/portal/templates/institution-tab-info.html new file mode 100644 index 00000000..e69de29b diff --git a/portal/templates/onelab/onelab_widget-topmenu.html b/portal/templates/onelab/onelab_widget-topmenu.html new file mode 100644 index 00000000..4ed429ad --- /dev/null +++ b/portal/templates/onelab/onelab_widget-topmenu.html @@ -0,0 +1,76 @@ + + + diff --git a/portal/templates/slice-resource-view.html b/portal/templates/slice-resource-view.html index 9200f001..3831a5e0 100644 --- a/portal/templates/slice-resource-view.html +++ b/portal/templates/slice-resource-view.html @@ -1,4 +1,5 @@ {% extends "layout_wide.html" %} +{% load portal_filters %} {% block head %} @@ -24,7 +25,7 @@
- {% include theme|add:"_widget-slice-sections.html" %} + {% widget '_widget-slice-sections.html' %}