comparison MoinMoin/theme/__init__.py @ 2862:8c1d40768df7

gedit formatter/converter: fix links/transclusion (suppressing default alt texts needs more work)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 23 Sep 2007 23:11:18 +0200
parents bda6fe7c015b
children 49b9e807a51d
comparison
equal deleted inserted replaced
2861:e1ce3040fcd6 2862:8c1d40768df7
504 else: 504 else:
505 alt, icon, w, h = '', icon, '', '' 505 alt, icon, w, h = '', icon, '', ''
506 506
507 return alt, self.img_url(icon), w, h 507 return alt, self.img_url(icon), w, h
508 508
509 def make_icon(self, icon, vars=None): 509 def make_icon(self, icon, vars=None, **kw):
510 """ 510 """
511 This is the central routine for making <img> tags for icons! 511 This is the central routine for making <img> tags for icons!
512 All icons stuff except the top left logo and search field icons are 512 All icons stuff except the top left logo and search field icons are
513 handled here. 513 handled here.
514 514
523 try: 523 try:
524 alt = alt % vars 524 alt = alt % vars
525 except KeyError, err: 525 except KeyError, err:
526 alt = 'KeyError: %s' % str(err) 526 alt = 'KeyError: %s' % str(err)
527 alt = self.request.getText(alt, formatted=False) 527 alt = self.request.getText(alt, formatted=False)
528 tag = self.request.formatter.image(src=img, alt=alt, width=w, height=h) 528 tag = self.request.formatter.image(src=img, alt=alt, width=w, height=h, **kw)
529 return tag 529 return tag
530 530
531 def make_iconlink(self, which, d): 531 def make_iconlink(self, which, d):
532 """ 532 """
533 Make a link with an icon 533 Make a link with an icon