comparison MoinMoin/theme/__init__.py @ 3541:8ff53b14fc44

UP icon is back in the iconbar for themes not using clickable title navigation
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 27 Apr 2008 14:36:07 +0200
parents 7bf83cd8da79
children 2b577967030b
comparison
equal deleted inserted replaced
3540:7bf83cd8da79 3541:8ff53b14fc44
543 @param d: parameter dictionary 543 @param d: parameter dictionary
544 @rtype: string 544 @rtype: string
545 @return: html link tag 545 @return: html link tag
546 """ 546 """
547 qs = {} 547 qs = {}
548 querystr, title, icon = self.cfg.page_icons_table[which] 548 pagekey, querystr, title, icon = self.cfg.page_icons_table[which]
549 qs.update(querystr) # do not modify the querystr dict in the cfg! 549 qs.update(querystr) # do not modify the querystr dict in the cfg!
550 d['icon-alt-text'] = d['title'] = title % d 550 d['icon-alt-text'] = d['title'] = title % d
551 d['i18ntitle'] = self.request.getText(d['title']) 551 d['i18ntitle'] = self.request.getText(d['title'])
552 img_src = self.make_icon(icon, d) 552 img_src = self.make_icon(icon, d)
553 rev = d['rev'] 553 rev = d['rev']
554 if rev and which in ['raw', 'print', ]: 554 if rev and which in ['raw', 'print', ]:
555 qs['rev'] = str(rev) 555 qs['rev'] = str(rev)
556 attrs = {'rel': 'nofollow', 'title': d['i18ntitle'], } 556 attrs = {'rel': 'nofollow', 'title': d['i18ntitle'], }
557 page = d['page'] 557 page = d[pagekey]
558 if isinstance(page, unicode):
559 # e.g. d['page_parent_page'] is just the unicode pagename
560 # while d['page'] will give a page object
561 page = Page(self.request, page)
558 return page.link_to_raw(self.request, text=img_src, querystr=qs, **attrs) 562 return page.link_to_raw(self.request, text=img_src, querystr=qs, **attrs)
559 563
560 def msg(self, d): 564 def msg(self, d):
561 """ Assemble the msg display 565 """ Assemble the msg display
562 566