Short description
As stated in UsabilityObservation/UserCannotReturnToWikiPageAfterPerformedAction, most users don't know, after having called an action showing some metainformation on a page (diff, info, AttachFile), how to return to the original wiki page again, i.e. how to view the content of the page again. Using the back button of the browser will cause serious trouble especially after file upload. In modern theme, there is yet a mechanism for returning: by clicking on the page tab you can return easily to a wiki page, however most users I know haven't passed that IQ test. Therefore it would be nice if there would be another, more easy, self explaining, comprehensible way to return to a page, e.g. like TWiki shows a link "View topic" at the top and bottom of a page. Inspired by this and the proposed solution on UsabilityObservation/UserCannotReturnToWikiPageAfterPerformedAction, I came up with the idea to display a "back to page content" link right at the beginning of the page, like you can see here:
In wikiconfig.py you can configure for which actions the "back to page" link should be displayed:
show_backlink = True backlink_table = ['action=info', 'action=diff', 'action=AttachFile', ]
Here is a patch for modern theme Moin 1.6dev (moin-1-6-main-7c58e8af1a97):
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!)
I like this solution, however one problem remains: after successfull file-upload, it is true that the back link suddenly disappears as stated on MoinMoinBugs/NoActionInQueryStringAfterFileUpload although the link is badly needed there. Alas, I don't know how to fix that bug. Maybe someone can give a tip on that or provide a patch.
-- OliverSiemoneit 2007-01-21 21:47:34
This is a duplication of a page function already available. Look at the line where RecentChanges, FindPage ... starts and click on the last entry. -- ReimarBauer 2007-01-22 07:46:34
Looked at it, didn't find there a link to return. Please explain that in more detail what you mean by "Look where RecentChanges starts and click on the last entry"... Don't understand this...
Of course it is some dublication! I mentioned that above since you can also return to the page by clicking on the tabcontrol of a page. But most users don't get on this idea. So this dublication is done on purpose for improving usability. Futhermore: RecentChanges, FindPage is not the problem. This patch doesn't aim at these to "functions". It is uploading files, viewing diffs and infos of a page and the problem how to return to the page itself again, i.e. how to get back from viewing metainfo of a page to the page content again. This patch tries to provide a solution for this without the need to do changes to info, diff itself. It is also easily extensible for other actions. -- OliverSiemoneit 2007-01-22 22:38:38