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

« back to all changes in this revision

Viewing changes to ivle/webapp/help/__init__.py

Restore the media files (just help.css) to the new help system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import genshi.template
5
5
 
6
6
import ivle.conf
7
 
from ivle.webapp.base.plugins import ViewPlugin
 
7
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
8
8
from ivle.webapp.base.xhtml import XHTMLView
9
9
from ivle.webapp.errors import NotFound, Forbidden
10
10
 
36
36
        self.paths = path.split('/')
37
37
 
38
38
    def populate(self, req, ctx):
 
39
        self.plugin_styles[Plugin] = ['help.css']
 
40
 
39
41
        helpfile = generate_toc(req.plugin_index[ViewPlugin], req)
40
42
        try:
41
43
            for path in self.paths:
61
63
        ctx['toc'] = generate_toc(req.plugin_index[ViewPlugin], req)
62
64
 
63
65
 
64
 
class Plugin(ViewPlugin):
 
66
class Plugin(ViewPlugin, MediaPlugin):
65
67
    """The plugin for viewing help files."""
66
68
 
67
69
    urls = [
68
70
        ('+help', HelpToCView),
69
71
        ('+help/*path', HelpView)
70
72
    ]
 
73
 
 
74
    media = 'media'