Attachment 'moin-theme-monobook-0.5-moin-1.7.2-compat.patch'

Download

   1 --- moin-theme-monobook-0.5/monobook/monobook.py	2007-07-04 13:49:19.000000000 +0100
   2 +++ moin-theme-monobook-0.5/monobook/monobook.py	2008-09-10 12:10:14.000000000 +0100
   3 @@ -256,7 +256,7 @@
   4              links.append(titles['__separator__'])
   5              # Add more actions (all enabled)
   6              for action in more:
   7 -                title = Page(request, action).split_title(request, force=1)
   8 +                title = Page(request, action).split_title(request)
   9                  # Use translated version if available
  10                  title = _(title, formatted=False)
  11                  link = '<li>%s</li>' % wikiutil.link_tag(self.request, \
  12 @@ -290,35 +290,36 @@
  13          userlinks = []
  14          # Add username/homepage link for registered users. We don't care
  15          # if it exists, the user can create it.
  16 -        if request.user.valid:
  17 -            homepage = Page(request, request.user.name)
  18 -            title = homepage.split_title(request)
  19 -            attrs = self.extendedAttrs(_('User Page'), '.')
  20 -            homelink = homepage.link_to(request, text=title, attrs=attrs)
  21 +        if request.user.valid and request.user.name:
  22 +            interwiki = wikiutil.getInterwikiHomePage(request)
  23 +            name = request.user.name
  24 +            aliasname = request.user.aliasname
  25 +            if not aliasname:
  26 +                aliasname = name
  27 +            title = "%s @ %s" % (aliasname, interwiki[0])
  28 +            # link to (interwiki) user homepage
  29 +            homelink = (request.formatter.interwikilink(1, title=title, id="userhome", generated=True, *interwiki) +
  30 +                        request.formatter.text(name) +
  31 +                        request.formatter.interwikilink(0, title=title, id="userhome", *interwiki))
  32              userlinks.append(homelink)
  33 -        
  34 -            # Set pref page to localized Preferences page
  35 -            attrs = self.extendedAttrs(_('My Preferences'), 'u') 
  36 -            prefpage = wikiutil.getSysPage(request, 'UserPreferences')
  37 -            userlinks.append(prefpage.link_to(request, text=_('Preferences'), attrs=attrs))
  38 -
  39 -            # Add a logout link (not sure this is really necessary
  40 -            attrs = self.extendedAttrs(_('Logout'), 'o')
  41 -            page = d['page']
  42 -            url = wikiutil.quoteWikinameURL(page.page_name) + \
  43 -                   '?action=userform&logout=1'
  44 -            link = wikiutil.link_tag(self.request, url, _('Logout'), attrs=attrs)
  45 -            userlinks.append(link)
  46 +            # link to userprefs action
  47 +            if 'userprefs' not in self.request.cfg.actions_excluded:
  48 +                userlinks.append(d['page'].link_to(request, text=_('Settings'),
  49 +                                               querystr={'action': 'userprefs'}, id='userprefs', rel='nofollow'))
  50  
  51 +        if request.user.valid:
  52 +            if request.user.auth_method in request.cfg.auth_can_logout:
  53 +                userlinks.append(d['page'].link_to(request, text=_('Logout'),
  54 +                                                   querystr={'action': 'logout', 'logout': 'logout'}, id='logout', rel='nofollow'))
  55          else:
  56 -            # Add a login link (not sure this is really necessary
  57 -            attrs = self.extendedAttrs(_('Login'), 'o')
  58 -            page = d['page']
  59 -            url = wikiutil.quoteWikinameURL(page.page_name) + \
  60 -                   '?action=login'
  61 -            link = wikiutil.link_tag(self.request, url, _('Login'), attrs=attrs)
  62 -            userlinks.append(link)
  63 -            
  64 +            query = {'action': 'login'}
  65 +            # special direct-login link if the auth methods want no input
  66 +            if request.cfg.auth_login_inputs == ['special_no_input']:
  67 +                query['login'] = '1'
  68 +            if request.cfg.auth_have_login:
  69 +                userlinks.append(d['page'].link_to(request, text=_("Login"),
  70 +                                                   querystr=query, id='login', rel='nofollow'))
  71 +
  72          html = [
  73              u'<div class="portlet" id="p-personal">',
  74              u'<ul id="username">',

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.
  • [get | view] (2008-09-10 12:48:40, 4.0 KB) [[attachment:moin-theme-monobook-0.5-moin-1.7.2-compat.patch]]
  • [get | view] (2010-01-13 10:56:28, 0.7 KB) [[attachment:moin-theme-monobook-0.5-moin-1.9.0-compat.patch]]
  • [get | view] (2010-04-27 11:04:16, 42.9 KB) [[attachment:moin-theme-monobook-0.5-moin-1.9.0-complete]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.