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

« back to all changes in this revision

Viewing changes to ivle/webapp/console/__init__.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:
6
6
 
7
7
class ConsoleView(XHTMLView):
8
8
    appname = 'console'
 
9
    help = 'Console'
9
10
 
10
11
    plugin_scripts = {'ivle.webapp.console': ['console.js']}
11
12
    plugin_styles  = {'ivle.webapp.console': ['console.css']}
17
18
    def populate(self, req, ctx):
18
19
        ctx['windowpane'] = False
19
20
 
20
 
 
21
21
class Plugin(ViewPlugin, OverlayPlugin, MediaPlugin):
22
 
    """
23
 
    The Plugin class for the console plugin.
24
 
    """
25
22
    urls = [
26
23
        ('console/service', ConsoleServiceRESTView),
27
24
        ('console', ConsoleView),
30
27
        ConsoleOverlay,
31
28
    ]
32
29
    media = 'media'
 
30
    help = {'Console': 'help.html'}