Attachment 'modern.diff'
Download 1 --- modern_orig.py 2007-01-21 21:52:18.000000000 +0100
2 +++ modern.py 2007-01-21 22:13:22.000000000 +0100
3 @@ -12,6 +12,32 @@
4
5 name = "modern"
6
7 + def backlink (self, d):
8 + """
9 + Assemble the back button
10 +
11 + @param d: parameter dictionary
12 + @rtype: string
13 + @return: backbutton html
14 + """
15 + _ = self.request.getText
16 + html = ''
17 +
18 + show_backlink = False
19 + backlink_table = []
20 + if hasattr(self.request.cfg, 'show_backlink') and hasattr(self.request.cfg, 'backlink_table'):
21 + show_backlink = self.request.cfg.show_backlink
22 + backlink_table = self.request.cfg.backlink_table
23 +
24 + if show_backlink and backlink_table:
25 + pageurl = self.request.query_string
26 + for item in backlink_table:
27 + if pageurl.find(item) != -1:
28 + backlink = d['page'].link_to(self.request, text=_('Return to page content'), querystr='action=show')
29 + html = '[%s]' % backlink
30 + break
31 + return html
32 +
33 def header(self, d, **kw):
34 """ Assemble wiki header
35
36 @@ -45,6 +71,7 @@
37
38 # Start of page
39 self.startPage(),
40 + self.backlink(d),
41 ]
42 return u'\n'.join(html)
43
44 @@ -85,6 +112,7 @@
45 html = [
46 # End of page
47 self.pageinfo(page),
48 + self.backlink(d),
49 self.endPage(),
50
51 # Pre footer custom html (not recommended!)
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.