Projects with institution and dashboard
authorLoic Baron <loic.baron@lip6.fr>
Thu, 22 Jan 2015 15:41:56 +0000 (16:41 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Thu, 22 Jan 2015 15:41:56 +0000 (16:41 +0100)
portal/homeview.py
portal/institution.py
portal/managementtababout.py
portal/templates/institution.html

index 214bd7f..1fe1d2a 100644 (file)
@@ -95,7 +95,7 @@ class HomeView (FreeAccessView, ThemeView):
                     #else:
                     #    pi = "is_pi"
                     user_email = str(self.request.user)                   
-                    pi = authority_check_pis(self.reques, user_email)
+                    pi = authority_check_pis(self.request, user_email)
 
                     # check if the user has creds or not
                     if acc_user_cred == {} or acc_user_cred == 'N/A':
index cf0055c..bdb7ad6 100644 (file)
@@ -31,7 +31,6 @@ class InstitutionView (LoginRequiredAutoLogoutView, ThemeView):
         return render_to_response(self.template, env, context_instance=RequestContext(request))
 
     def get (self, request, authority_hrn=None, state=None):
-        print " -----  institution",authority_hrn
         env = self.default_env()
         if request.user.is_authenticated(): 
             env['person'] = self.request.user
index 10da9c6..1f5ceca 100644 (file)
@@ -29,7 +29,7 @@ class ManagementAboutView (FreeAccessView, ThemeView):
             # select column.name from local:object where table=='authority'
             authority_query = Query().get('authority').select('authority_hrn', 'name', 'address', 'enabled','description', 
                                                               'scientific', 'city', 'name', 'url', 'country', 'enabled', 'longitude', 
-                                                              'tech', 'latitude', 'pi_users', 'parent_authority', 'onelab_membership', 
+                                                              'tech', 'latitude', 'pi_users', 'onelab_membership', 
                                                               'postcode').filter_by('authority_hrn','==',user_authority)
             authority_details = execute_query(self.request, authority_query)
             
index f168167..6c21760 100644 (file)
@@ -9,7 +9,7 @@
        <div class="row">
                <div class="col-md-12">
                         <div class="breadcrumbs">
-                                Management &nbsp;>&nbsp; Institution: <span id="authority_name"></span>
+                                Management &nbsp;>&nbsp; Institution: <span id="authority_name">{{user_details.parent_authority}}</span>
                         </div>
                </div>
        </div>
@@ -192,9 +192,12 @@ $(document).ready(function() {
                $(this).tab('show');
        var id = $(this).attr('href').substr(1);
         /*
-       if ((id == 'requests') || (id == 'about'))
+       if ((id == 'requests')){
                $("#" + id).load('/management/' + id);
+        }
         */
+       if ((id == 'requests') || (id == 'about'))
+               $("#" + id).load('/management/' + id);
        });
        var hash = window.location.hash;
        if (hash) {