univbris am plugin-first try,dirty code
[unfold.git] / ui / topmenu.py
index be21db2..9a6c58c 100644 (file)
@@ -33,12 +33,14 @@ def topmenu_items_static (current, request):
         dropdown.append({'label':'Platforms', 'href': '/portal/platforms/'})
         dropdown.append({'label':'My Account', 'href': '/portal/account/'})
         dropdown.append({'label':'Contact Support', 'href': '/portal/contact/'})
+       dropdown.append({'label':'UNIVBRIS info', 'href': '/portal/univbris/'})
         result.append({'label': 'More', 'href':"#", 'dropdown':True, 'contents':dropdown})
     else:
         result.append({'label':'Home', 'href': '/login'})
         # looks like this is accessible to non-logged users
         result.append({'label':'Platforms', 'href': '/portal/platforms/'})
         result.append({'label':'Register', 'href': '/portal/register/'})
+        result.append({'label':'Join us', 'href': '/portal/join/'})
         result.append({'label':'Contact Support', 'href': '/portal/contact/'})
 
     # mark active if the provided 'current', even if shorter, matches the beginning of d['label']
@@ -69,7 +71,7 @@ from plugins.topmenuvalidation import TopmenuValidation
 # for asynchronous management of topmenu
 def topmenu_items_live (current, page):
     request=page.request
-    query_pi_auths = Query.get('ple:user').filter_by('user_hrn', '==', '$user_hrn' ).select('pi_authorities')
+    query_pi_auths = Query.get('user').filter_by('user_hrn', '==', '$user_hrn' ).select('pi_authorities')
     page.enqueue_query(query_pi_auths)
 #        # even though this plugin does not have any html materialization, the corresponding domid
 #        # must exist because it is searched at init-time to create the JS plugin