summaryrefslogtreecommitdiffstats
path: root/web/macros.py
diff options
context:
space:
mode:
Diffstat (limited to 'web/macros.py')
-rw-r--r--web/macros.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/web/macros.py b/web/macros.py
index 5ec9b38..6ee8393 100644
--- a/web/macros.py
+++ b/web/macros.py
@@ -18,17 +18,18 @@ def menu():
18 print('<span><a href="%s">%s</a></span>' % (p.url, hx(p.title))) 18 print('<span><a href="%s">%s</a></span>' % (p.url, hx(p.title)))
19 19
20def breadcrumb(): 20def breadcrumb():
21 stable = '<span id="release">Stable release: <a href="%s">%s</a></span>' \
22 % (release_notes, plugins_release)
21 parents = {p.title: (p.url, p.get('parent')) for p in pages} 23 parents = {p.title: (p.url, p.get('parent')) for p in pages}
22 title = page.title 24 title = page.title
23 output = hx(title) 25 crumbs = hx(title)
24 while parents[title][1] is not None: 26 while parents[title][1] is not None:
25 title = parents[title][1] 27 title = parents[title][1]
26 url = parents[title][0] 28 url = parents[title][0]
27 output = '<a href="%s">%s</a> &raquo; %s' % (url, hx(title), output) 29 crumbs = '<a href="%s">%s</a> &raquo; %s' % (url, hx(title), crumbs)
28 if output == hx(page.title): 30 if crumbs == hx(page.title):
29 output = 'Stable release: <a href="%s">%s</a>' \ 31 crumbs = '&nbsp;' + stable
30 % (release_notes, plugins_release) 32 return crumbs
31 return output
32 33
33def list_kids(): 34def list_kids():
34 kids = [(p.url, p.title) for p in pages if p.get('parent') == page.title] 35 kids = [(p.url, p.title) for p in pages if p.get('parent') == page.title]