Back to index

moin  1.9.0~rc2
Functions | Variables
MoinMoin.macro.Action Namespace Reference

Functions

def _get_valid_actions
def macro_Action

Variables

list Dependencies = ["language"]

Function Documentation

def MoinMoin.macro.Action._get_valid_actions (   macro) [private]
lists all valid actions 

Definition at line 15 of file Action.py.

00015 
00016 def _get_valid_actions(macro):
00017     """ lists all valid actions """
00018     from MoinMoin import action
00019     # builtin
00020     actions_builtin = action.names
00021     # global
00022     actions_global = ([x for x in action.modules
00023                        if not x in macro.request.cfg.actions_excluded])
00024     # local
00025     actions_local = ([x for x in wikiutil.wikiPlugins('action', macro.cfg)
00026                       if not x in macro.request.cfg.actions_excluded])
00027 
00028     return actions_builtin + actions_global + actions_local

Here is the caller graph for this function:

def MoinMoin.macro.Action.macro_Action (   macro,
  action = u'show',
  text = None,
  _kwargs = None 
)

Definition at line 29 of file Action.py.

00029 
00030 def macro_Action(macro, action=u'show', text=None, _kwargs=None):
00031     _ = macro.request.getText
00032     if text is None:
00033         text = action
00034     if not _kwargs:
00035         _kwargs = {}
00036 
00037     text = _(text)
00038     if action in _get_valid_actions(macro):
00039         page = macro.formatter.page
00040         _kwargs['action'] = action
00041         url = page.url(macro.request, querystr=_kwargs)
00042         return ''.join([
00043             macro.formatter.url(1, url, css='action'),
00044             macro.formatter.text(text),
00045             macro.formatter.url(0),
00046         ])
00047     else:
00048         return macro.formatter.text(text)

Here is the call graph for this function:


Variable Documentation

Definition at line 12 of file Action.py.