git://git.onelab.eu
/
unfold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
740a2be
)
Dashboard: added icon and info tooltip to list of slices and projects
author
Loic Baron
<loic.baron@lip6.fr>
Tue, 5 May 2015 17:01:00 +0000
(19:01 +0200)
committer
Loic Baron
<loic.baron@lip6.fr>
Tue, 5 May 2015 17:01:00 +0000
(19:01 +0200)
portal/templates/base.html
patch
|
blob
|
history
diff --git
a/portal/templates/base.html
b/portal/templates/base.html
index
5a1248c
..
4760849
100644
(file)
--- a/
portal/templates/base.html
+++ b/
portal/templates/base.html
@@
-76,11
+76,11
@@
$(document).ready(function() {
slices.push("no slice");
}else{
slices = user.slices;
slices.push("no slice");
}else{
slices = user.slices;
- {% if theme != "fed4fire" %}
+ {% if theme != "fed4fire"
or "onelab" in theme
%}
drawSlices(slices);
{% endif %}
}
drawSlices(slices);
{% endif %}
}
- {% if theme == "fed4fire" %}
+ {% if theme == "fed4fire"
or "onelab" in theme
%}
p = myslice.get_projects();
if(p != null){
//drawProjects(p);
p = myslice.get_projects();
if(p != null){
//drawProjects(p);
@@
-93,18
+93,18
@@
$(document).ready(function() {
var items = [];
$.each( slices, function(i, val) {
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( "" ));
}
});
$("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) {
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( "" ));
});
$("div#home-project-list").html($( "<ul/>", { html: items.join( "" ) }));
$("ul#dropdown-project-list").append(items.join( "" ));
@@
-115,10
+115,11
@@
$(document).ready(function() {
$.each( projects, function(i, p) {
$.each( slices, function(y, s) {
if (s.match('^' + escapeRegExp(p))) {
$.each( projects, function(i, p) {
$.each( slices, function(y, s) {
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>";
}
if (items_sl.length > 0) {
el += "<ul>" + items_sl.join( "" ) + "</ul>";
}