highligthing wiki menu items, 1290, thanks Paolo
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.2+timestamp.2013.01.18.09.04.49
|
Version 2.4.1-alpha.2+timestamp.2013.01.18.09.08.52
|
||||||
|
|||||||
+5
-1
@@ -5153,15 +5153,19 @@ class Wiki(object):
|
|||||||
base = match.group('base').replace(' ', '')
|
base = match.group('base').replace(' ', '')
|
||||||
title = match.group('title')
|
title = match.group('title')
|
||||||
link = match.group('link')
|
link = match.group('link')
|
||||||
|
title_page = None
|
||||||
if link.startswith('@'):
|
if link.startswith('@'):
|
||||||
items = link[2:].split('/')
|
items = link[2:].split('/')
|
||||||
if len(items) > 3:
|
if len(items) > 3:
|
||||||
|
title_page = items[3]
|
||||||
link = URL(a=items[0] or None, c=items[1] or None,
|
link = URL(a=items[0] or None, c=items[1] or None,
|
||||||
f=items[2] or None, args=items[3:])
|
f=items[2] or None, args=items[3:])
|
||||||
parent = tree.get(base[1:], tree[''])
|
parent = tree.get(base[1:], tree[''])
|
||||||
subtree = []
|
subtree = []
|
||||||
tree[base] = subtree
|
tree[base] = subtree
|
||||||
parent.append((current.T(title), False, link, subtree))
|
parent.append((current.T(title),
|
||||||
|
request.args(0) == title_page,
|
||||||
|
link, subtree))
|
||||||
if self.can_see_menu():
|
if self.can_see_menu():
|
||||||
submenu = []
|
submenu = []
|
||||||
menu.append((current.T('[Wiki]'), None, None, submenu))
|
menu.append((current.T('[Wiki]'), None, None, submenu))
|
||||||
|
|||||||
Reference in New Issue
Block a user