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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-07-06 09:30:39 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090706093039-e933t7q0mtj6v20j
Fix XHTMLUnauthorizedView to take the extra breadcrumb-related arg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from ivle.webapp.base.views import BaseView
29
29
from ivle.webapp.base.plugins import ViewPlugin, OverlayPlugin
30
30
from ivle.webapp.errors import HTTPError, Unauthorized
31
 
from ivle.webapp.publisher import NoPath
 
31
from ivle.webapp.routing import NoPath
32
32
from ivle.webapp.breadcrumbs import Breadcrumber
33
33
 
34
34
class XHTMLView(BaseView):
39
39
    """
40
40
 
41
41
    template = 'template.html'
 
42
 
 
43
    plugin_scripts = {}
 
44
    plugin_styles = {}
 
45
    scripts_init = []
 
46
 
 
47
    extra_breadcrumbs = []
 
48
 
42
49
    allow_overlays = True
43
 
 
44
 
    def __init__(self, *args, **kwargs):
45
 
        super(XHTMLView, self).__init__(*args, **kwargs)
46
 
 
47
 
        self.overlay_blacklist = []
48
 
 
49
 
        self.plugin_scripts = {}
50
 
        self.plugin_styles = {}
51
 
        self.scripts_init = []
52
 
 
53
 
        self.extra_breadcrumbs = []
54
 
        self.overlay_blacklist = []
 
50
    overlay_blacklist = []
55
51
 
56
52
    def get_context_ancestry(self, req):
57
 
        return req.publisher.get_ancestors(self.context)
 
53
        return req.router.get_ancestors(self.context)
58
54
 
59
55
    def filter(self, stream, ctx):
60
56
        return stream
214
210
        self.lastobj = lastobj
215
211
 
216
212
    def get_context_ancestry(self, req):
217
 
        return req.publisher.get_ancestors(self.lastobj)
 
213
        return req.router.get_ancestors(self.lastobj)
218
214
 
219
215
    def populate(self, req, ctx):
220
216
        ctx['req'] = req