Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.macro.EditedSystemPages.EditedSystemPages Class Reference

List of all members.

Public Member Functions

def __init__
def renderInPage

Public Attributes

 macro
 request
 formatter

Detailed Description

Definition at line 9 of file EditedSystemPages.py.


Constructor & Destructor Documentation

Definition at line 11 of file EditedSystemPages.py.

00011 
00012     def __init__(self, macro):
00013         self.macro = macro
00014         self.request = macro.request
00015         self.formatter = macro.formatter


Member Function Documentation

Render macro in page context

The parser should decide what to do if this macro is placed in a
paragraph context.

Definition at line 16 of file EditedSystemPages.py.

00016 
00017     def renderInPage(self):
00018         """ Render macro in page context
00019 
00020         The parser should decide what to do if this macro is placed in a
00021         paragraph context.
00022         """
00023         from MoinMoin.Page import Page
00024 
00025         # Get page list for current user (use this as admin), filter
00026         # pages that are both underlay and standard pages.
00027         def filterfn(name):
00028             page = Page(self.request, name)
00029             return (page.isStandardPage(includeDeleted=0) and
00030                     page.isUnderlayPage(includeDeleted=0))
00031 
00032         # Get page filtered page list. We don't need to filter by
00033         # exists, because our filter check this already.
00034         pages = self.request.rootpage.getPageList(filter=filterfn, exists=0)
00035 
00036         # Format as numberd list, sorted by page name
00037         pages.sort()
00038         result = []
00039         f = self.formatter
00040         result.append(f.number_list(1))
00041         for name in pages:
00042             result.append(f.listitem(1))
00043             result.append(f.pagelink(1, name, generated=1))
00044             result.append(f.text(name))
00045             result.append(f.pagelink(0, name))
00046             result.append(f.listitem(0))
00047         result.append(f.number_list(0))
00048 
00049         return ''.join(result)
00050 


Member Data Documentation

Definition at line 14 of file EditedSystemPages.py.

Definition at line 12 of file EditedSystemPages.py.

Definition at line 13 of file EditedSystemPages.py.


The documentation for this class was generated from the following file: