~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/base/plugins.py

Created a new help system.

The new help system allows plugins to register their help paths, using
a dict of dicts and helpfile paths. This system allows multiple plugins
to use the same heading for their help files (ie. 'admin').

It also allows XHTMLViews to have a 'help' property, which makes the
context-sensitive help link point to their help path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    or triples, like (routex string, handler class, kwargs dict). The kwargs
31
31
    dict is optional. If present, the members of the kwargs dict will be passed
32
32
    as keyword arguments to the constructor of the view object.
 
33
    
 
34
    View plugins may also have a 'help' property, which should contain a dict
 
35
    of dicts and help file names. This dict is then used to generate the
 
36
    appropriate entries in the help system.
33
37
    """
34
38
    pass
35
39
    
36
40
class OverlayPlugin(BasePlugin):
37
 
    """
38
 
    Marker class for plugins which provide overlays.
 
41
    """Marker class for plugins which provide overlays.
39
42
    
40
43
    Overlay plugins provide mini-views which can be displayed on top of other
41
44
    views. The canonical example of a plugin of this type is the Console plugin.