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

« back to all changes in this revision

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

Merge setup-stuff.

phpBB is gone, configuration, setup and jail building are completely redone.

Please read doc/setup/install_proc.txt, or you'll not get far.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import genshi.template
25
25
 
26
26
from ivle.webapp.media import media_url
 
27
from ivle.webapp.core import Plugin as CorePlugin
27
28
from ivle.webapp.base.views import BaseView
28
29
from ivle.webapp.base.plugins import ViewPlugin, OverlayPlugin
29
30
from ivle.webapp.errors import HTTPError, Unauthorized
75
76
        ctx = genshi.template.Context()
76
77
        # XXX: Leave this here!! (Before req.styles is read)
77
78
        ctx['overlays'] = self.render_overlays(req)
78
 
        ctx['app_styles'] = req.styles
79
 
        ctx['scripts'] = req.scripts
 
79
 
 
80
        ctx['styles'] = [media_url(req, CorePlugin, 'ivle.css')]
 
81
        ctx['styles'] += req.styles
 
82
 
 
83
        ctx['scripts'] = [media_url(req, CorePlugin, path) for path in
 
84
                           ('util.js', 'json2.js', 'md5.js')]
 
85
        ctx['scripts'] += req.scripts
 
86
 
80
87
        ctx['scripts_init'] = req.scripts_init
81
88
        ctx['app_template'] = app
82
89
        self.populate_headings(req, ctx)
104
111
            ctx['help_path'] = self.help
105
112
 
106
113
        ctx['apps_in_tabs'] = []
107
 
        for plugin in req.plugin_index[ViewPlugin]:
 
114
        for plugin in req.config.plugin_index[ViewPlugin]:
108
115
            if not hasattr(plugin, 'tabs'):
109
116
                continue
110
117
 
141
148
        if not self.allow_overlays:
142
149
            return overlays
143
150
 
144
 
        for plugin in req.plugin_index[OverlayPlugin]:
 
151
        for plugin in req.config.plugin_index[OverlayPlugin]:
145
152
            for overclass in plugin.overlays:
146
153
                if overclass in self.overlay_blacklist:
147
154
                    continue