Attachment 'EditedSystemPages.py'
Download 1 """
2 EditedSystemPages - list system pages that has been edited in this wiki.
3
4 @copyright: 2004 Nir Soffer <nirs@freeshell.org>
5 @license: GNU GPL, see COPYING for details.
6 """
7
8 class EditedSystemPages:
9
10 def __init__(self, macro, args):
11 self.macro = macro
12 self.request = macro.request
13 self.formatter = macro.formatter
14
15 def renderInPage(self):
16 """ Render macro in page context
17
18 The parser should decide what to do if this macro is placed in a
19 paragraph context.
20 """
21 # Get page list for current user (use this as admin), filter
22 # pages that are both underlay and standard pages.
23 pages = self.request.rootpage.getPageDict()
24 pages = [name for name in pages
25 if pages[name].isStandardPage(includeDeleted=0) and
26 pages[name].isUnderlayPage(includeDeleted=0)]
27
28 # Format as numberd list, sorted by page name
29 pages.sort()
30 result = []
31 f = self.formatter
32 result.append(f.number_list(1))
33 for name in pages:
34 result.append(f.listitem(1))
35 result.append(f.pagelink(1, name, generated=1))
36 result.append(f.text(name))
37 result.append(f.pagelink(0))
38 result.append(f.listitem(0))
39 result.append(f.number_list(0))
40
41 return ''.join(result)
42
43
44 def execute(macro, args):
45 """ Temporary glue code to use with moin current macro system """
46 return EditedSystemPages(macro, args).renderInPage()
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.