113
113
crumber = Breadcrumber(req)
115
115
ctx['breadcrumbs'] = []
116
if not req.publicmode:
117
for ancestor in ancestry:
118
crumb = crumber.crumb(ancestor)
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)
128
# If the view has specified text for a breadcrumb, add one.
129
if self.breadcrumb_text:
130
ctx['breadcrumbs'].append(ViewBreadcrumb(req, self))
132
# Allow the view to add its own fake breadcrumbs.
133
ctx['breadcrumbs'].extend(self.extra_breadcrumbs)
116
for ancestor in ancestry:
117
crumb = crumber.crumb(ancestor)
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)
127
# If the view has specified text for a breadcrumb, add one.
128
if self.breadcrumb_text:
129
ctx['breadcrumbs'].append(ViewBreadcrumb(req, self))
131
# Allow the view to add its own fake breadcrumbs.
132
ctx['breadcrumbs'].extend(self.extra_breadcrumbs)
135
134
self.populate_headings(req, ctx)
136
135
tmpl = loader.load(os.path.join(os.path.dirname(__file__),
165
164
for tab in plugin.tabs:
166
# tab is a tuple: name, title, desc, icon, path, weight, admin
167
# (Admin is optional, defaults to false)
165
# tab is a tuple: name, title, desc, icon, path
169
167
new_app['this_app'] = hasattr(self, 'tab') \
170
168
and tab[0] == self.tab
178
176
ctx['favicon'] = icon_url
180
178
new_app['has_icon'] = False
181
# The following check is here, so it is AFTER setting the
182
# icon, but BEFORE actually installing the tab in the menu
183
if len(tab) > 6 and tab[6]:
185
if not (req.user and req.user.admin):
187
179
new_app['path'] = req.make_path(tab[4])
188
180
new_app['desc'] = tab[2]
189
181
new_app['name'] = tab[1]