changeset 3328:86b4a7ac35e6

userprefs action: clean up title code
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 19 Mar 2008 12:21:28 +0100
parents 44df9d446c13
children 6ed28a1edfe0
files MoinMoin/action/userprefs.py
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/userprefs.py	Wed Mar 19 12:14:44 2008 +0100
+++ b/MoinMoin/action/userprefs.py	Wed Mar 19 12:21:28 2008 +0100
@@ -85,12 +85,14 @@
 def execute(pagename, request):
     _ = request.getText
     text, title, msg = _create_page(request)
-    if not title:
-        title = _("Settings")
+    if title:
+        # XXX: we would like to make "Settings" here a link back
+        #      to the generic userprefs page but that is impossible
+        #      due to the way the title is emitted and the theme is
+        #      responsible for doing the linking....
+        title = _("Settings") + "/" + title
     else:
-        lnk = html.A(href='xx').append(html.Text(_("Settings")))
-        lnk = unicode(lnk)
-        title = _("Settings") + "/" + title
+        title = _("Settings")
     request.emit_http_headers()
     request.theme.add_msg(msg, "dialog")
     request.theme.send_title(title, page=request.page, pagename=pagename)