X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Ftemplates%2Fonelab%2Fonelab_institution.html;h=c8a668f1f299631d6c9afab9790559605313b938;hb=cf4cdbfa738f4687eae3cab36fdaf4914da1d160;hp=7fea6352868f86a08d7d7a7142e8112d59dcd1d4;hpb=a5d8ec473bf69cbb0540e3afadd66e1b57ebeff4;p=unfold.git
diff --git a/portal/templates/onelab/onelab_institution.html b/portal/templates/onelab/onelab_institution.html
index 7fea6352..c8a668f1 100644
--- a/portal/templates/onelab/onelab_institution.html
+++ b/portal/templates/onelab/onelab_institution.html
@@ -5,11 +5,20 @@
{% endblock head %}
{% block content %}
+
+
+
+
+ Management > Institution:
+
+
+
+
-
-
-
-
-
-
-
![]({{ STATIC_URL }}img/onelab-logo.png)
-
-
-
-
+
@@ -57,12 +56,6 @@
- {% if 'is_pi' in pi %}
-
- {% else %}
-
- {% endif %}
-
![Loading Slices]({{ STATIC_URL }}img/loading.gif)
@@ -78,6 +71,11 @@
{% if 'is_pi' in pi %}
+ {% if 'is_pi' in pi %}
+
+ {% else %}
+
+ {% endif %}
@@ -91,62 +89,6 @@
$(document).ready(function() {
{% if person %}
{% if user_details.parent_authority %}
-
- $.post("/rest/authority/",{'filters':{'authority_hrn':'{{user_details.parent_authority}}'}}, function( data ) {
- var authority_data = [];
- var onelab_data = [];
- /* 'city','enabled','legal','longitude','onelab_membership','address','parent_authority','slice','user','country',
- 'tech','abbreviated_name','url','postcode','description','scientific','authority_hrn','latitude','name' */
- $.each( data, function( key, val ) {
- authority_row = "![]({{ STATIC_URL }}img/institutions/{{user_details.parent_authority}}.gif)
";
- authority_row += "
";
- authority_row += "authority: "+val.authority_hrn+"
";
- authority_row += "
";
- authority_row += ""+val.name+"
";
- authority_row += "
";
- authority_row += "Address: "+val.address+"
";
- authority_row += "City: "+val.postcode+" "+val.city+"
";
- authority_row += "
";
- authority_row += "Country: "+val.country+"
";
- authority_row += "
";
- authority_row += "
";
- authority_row += "Contacts
";
- authority_row += "Legal: ";
- /*
-
- TODO: find a way to express JSON correctly given the constrains: CSV / JSON
-
- legal = jQuery.parseJSON(val.legal);
- if($.isArray(legal)){
- $.each(legal, function(k,v){
- authority_row += k+" "+v+"
";
- });
- }else{
- */
- authority_row += val.legal+"
";
- //}
- authority_row += "
";
- authority_row += "Scientific: ";
- /*
- scientific = jQuery.parseJSON(val.scientific);
- if($.isArray(scientific)){
- $.each(scientific, function(v){
- authority_row += v+", ";
- });
- }else{
- */
- authority_row += val.scientific+"
";
- //}
- onelab_membership = "Status: "+val.onelab_membership;
- onelab_data.push(onelab_membership);
- authority_data.push(authority_row);
-
- });
- $("div#authority-data").html(authority_data.join( "" ));
- $("div#onelab-data").html(onelab_data.join( "" ));
- $("div#authority-tab-loaded").css("display","block");
- $("div#authority-tab-loading").css("display","none");
- });
$.post("/rest/slice/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
var list_slices = [];
@@ -225,9 +167,15 @@ $(document).ready(function() {
e.preventDefault();
$(this).tab('show');
var id = $(this).attr('href').substr(1);
- if (id == 'requests')
+ if ((id == 'requests') || (id == 'about'))
$("#" + id).load('/management/' + id);
});
+ var hash = window.location.hash;
+ if (hash) {
+ $('.nav-tabs a[href='+hash+']').click();
+ } else {
+ $('.nav-tabs a[href=#about]').click();
+ }
});
{% endblock %}