git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove debug print statement
[unfold.git]
/
ui
/
topmenu.py
diff --git
a/ui/topmenu.py
b/ui/topmenu.py
index
bdee674
..
3a94a21
100644
(file)
--- a/
ui/topmenu.py
+++ b/
ui/topmenu.py
@@
-15,6
+15,7
@@
def topmenu_items (current,request=None):
if has_user:
result.append({'label':'Dashboard', 'href': '/portal/dashboard/'})
result.append({'label':'Request a slice', 'href': '/portal/slice_request/'})
if has_user:
result.append({'label':'Dashboard', 'href': '/portal/dashboard/'})
result.append({'label':'Request a slice', 'href': '/portal/slice_request/'})
+ result.append({'label':'Validation', 'href': '/portal/validate/'})
dropdown = []
dropdown.append({'label':'My Account', 'href': '/portal/account/'})
dropdown.append({'label':'Contact Support', 'href': '/portal/contact/'})
dropdown = []
dropdown.append({'label':'My Account', 'href': '/portal/account/'})
dropdown.append({'label':'Contact Support', 'href': '/portal/contact/'})
@@
-30,12
+31,14
@@
def topmenu_items (current,request=None):
if current is not None:
current=current.lower()
curlen=len(current)
if current is not None:
current=current.lower()
curlen=len(current)
- def mark_active(d):
- if d['label'][:curlen].lower() == current: d['is_active']=True
+ def mark_active(d,up=None):
+ if d['label'][:curlen].lower() == current:
+ d['is_active']=True
+ if up is not None: up['is_active']=True
for d in result:
mark_active(d)
if 'dropdown' in d:
for d in result:
mark_active(d)
if 'dropdown' in d:
- for dd in d['contents']: mark_active(dd)
+ for dd in d['contents']: mark_active(dd
,d
)
return result
def the_user (request):
return result
def the_user (request):