~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: 2010-02-17 12:00:09 UTC
  • Revision ID: grantw@unimelb.edu.au-20100217120009-o48s4r1junx8oq8n
Tags: 1.0beta2
Drop version number to 1.0beta2. We are going in for another one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
        crumber = Breadcrumber(req)
114
114
 
115
115
        ctx['breadcrumbs'] = []
116
 
        for ancestor in ancestry:
117
 
            crumb = crumber.crumb(ancestor)
118
 
            if crumb is None:
119
 
                continue
120
 
 
121
 
            if hasattr(crumb, 'extra_breadcrumbs_before'):
122
 
                ctx['breadcrumbs'].extend(crumb.extra_breadcrumbs_before)
123
 
            ctx['breadcrumbs'].append(crumb)
124
 
            if hasattr(crumb, 'extra_breadcrumbs_after'):
125
 
                ctx['breadcrumbs'].extend(crumb.extra_breadcrumbs_after)
126
 
 
127
 
        # If the view has specified text for a breadcrumb, add one.
128
 
        if self.breadcrumb_text:
129
 
            ctx['breadcrumbs'].append(ViewBreadcrumb(req, self))
130
 
 
131
 
        # Allow the view to add its own fake breadcrumbs.
132
 
        ctx['breadcrumbs'].extend(self.extra_breadcrumbs)
 
116
        if not req.publicmode:
 
117
            for ancestor in ancestry:
 
118
                crumb = crumber.crumb(ancestor)
 
119
                if crumb is None:
 
120
                    continue
 
121
 
 
122
                if hasattr(crumb, 'extra_breadcrumbs_before'):
 
123
                    ctx['breadcrumbs'].extend(crumb.extra_breadcrumbs_before)
 
124
                ctx['breadcrumbs'].append(crumb)
 
125
                if hasattr(crumb, 'extra_breadcrumbs_after'):
 
126
                    ctx['breadcrumbs'].extend(crumb.extra_breadcrumbs_after)
 
127
 
 
128
            # If the view has specified text for a breadcrumb, add one.
 
129
            if self.breadcrumb_text:
 
130
                ctx['breadcrumbs'].append(ViewBreadcrumb(req, self))
 
131
 
 
132
            # Allow the view to add its own fake breadcrumbs.
 
133
            ctx['breadcrumbs'].extend(self.extra_breadcrumbs)
133
134
 
134
135
        self.populate_headings(req, ctx)
135
136
        tmpl = loader.load(os.path.join(os.path.dirname(__file__),