1
2 """
3 MoinMoin - MyPageLinks
4
5 This macro lists the quicklinks of the current user
6
7 <<MyPageLinks>>
8
9 @copyright: 2008 MoinMoin:ReimarBauer
10 @license: GNU GPL, see COPYING for details.
11 """
12 Dependencies = ['user']
13
14 def macro_MyPageLinks(macro):
15 user = macro.request.user
16 result = []
17 if user.exists():
18 result.append(macro.formatter.bullet_list(True))
19 for page_name in user.getQuickLinks():
20 result.append(macro.formatter.listitem(True))
21 result.append(macro.formatter.pagelink(1, page_name, generated=1))
22 result.append(macro.formatter.text(page_name))
23 result.append(macro.formatter.pagelink(0, page_name))
24 result.append(macro.formatter.listitem(False))
25 result.append(macro.formatter.bullet_list(False))
26 return ''.join(result)
MoinMoin: MacroMarket/MyPageLinks (last edited 2008-08-08 11:16:18 by ReimarBauer)