diff MoinMoin/theme/__init__.py @ 471:9b6ba709da88

added header element ids: userhome, userprefs, login, logout imported from: moin--main--1.5--patch-475
author Thomas Waldmann <tw@waldmann-edv.de>
date Mon, 13 Mar 2006 20:05:27 +0000
parents 493972205fac
children a594780d5e64
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Mon Mar 13 19:31:36 2006 +0000
+++ b/MoinMoin/theme/__init__.py	Mon Mar 13 20:05:27 2006 +0000
@@ -215,24 +215,24 @@
             if not aliasname:
                 aliasname = name
             title = "%s @ %s" % (aliasname, interwiki[0])
-            homelink = (request.formatter.interwikilink(1, title=title, *interwiki) +
+            homelink = (request.formatter.interwikilink(1, title=title, id="userhome", *interwiki) +
                         request.formatter.text(name) +
                         request.formatter.interwikilink(0))
             userlinks.append(homelink)        
             # Set pref page to localized Preferences page
             title = preferencesPage.split_title(request)
-            userlinks.append(preferencesPage.link_to(request, text=title))
+            userlinks.append(preferencesPage.link_to(request, text=title, id="userprefs"))
             
         if request.cfg.show_login:
             if request.user.valid:
                 userlinks.append("""\
-<form action="" method="POST">
+<form id="logout" action="" method="POST">
 <input type="hidden" name="action" value="userform">
 <input type="submit" name="logout" value="%(logout)s">
 </form>
 """ % { 'logout': _('Logout') })
             else:
-                userlinks.append(preferencesPage.link_to(request, text=_("Login")))
+                userlinks.append(preferencesPage.link_to(request, text=_("Login"), id="login"))
 
         userlinks = [u'<li>%s</li>' % link for link in userlinks]
         html = u'<ul id="username">%s</ul>' % ''.join(userlinks)