X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ui%2Ftopmenu.py;h=988af27aaddeba2849d88ad1d5a98d4828a5fa1f;hb=6e1d4c932e926236ad7a9a73b8ddcc49a8f8ff02;hp=be21db228f83542a81b6d249a9944e2acbdbe487;hpb=7c1abf68ca485c1485543399fb05233069e888f6;p=unfold.git diff --git a/ui/topmenu.py b/ui/topmenu.py index be21db22..988af27a 100644 --- a/ui/topmenu.py +++ b/ui/topmenu.py @@ -39,6 +39,7 @@ def topmenu_items_static (current, request): # 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 +70,9 @@ 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') + # XXX TODO This should be triggered only when user is logged in + # We might use local storage instead + query_pi_auths = Query.get('user').filter_by('user_hrn', '==', '$user_hrn' ).select('user_hrn','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