view MoinMoin/macro/ @ 1918:bb2e053067fb

fixing copyright headers: remove umlauts (encoding troubles), make epydoc compatible, reformat
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 27 Mar 2007 21:07:33 +0200
parents 6dd2e29acffe
children b06ef2a53efa
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - Create an action link

    @copyright: 2004 Johannes Berg <>
    @license: GNU GPL, see COPYING for details.

Dependencies = ["language"]

def execute(self, args):
    result = ''
    # we don't want to spend much CPU for spiders requesting nonexisting pages
    if not self.request.isSpiderAgent:
        # Get list of template pages readable by current user
        filter =
        templates = self.request.rootpage.getPageList(filter=filter)
        result = []
        if templates:
            page =
            # send list of template pages
            for template in templates:
                result.append(page.link_to(self.request, template, querystr={'action': 'edit', 'template': template}))
        result = ''.join(result)
    return result