Beispiel #1
0
 def createHTML(self, text=True, link=True, icon=True, tooltip=False):
     identifier = self.formatID()
     if icon:
         image = self.getSmallIcon()
     else:
         image = None
     if image:
         html = htmlImage(image, align="middle")
         if text:
             html += NBSP + identifier
     else:
         html = Html(identifier)
     if link:
         url = self.library.highlight_format % self['id']
         html = htmlLink(url, html)
     if tooltip:
         tooltip_text = self.getToolTip()
         if tooltip_text:
             html = htmlSpan(html, title=tooltip_text)
     return html
Beispiel #2
0
 def createHTML(self, text=True, link=True, icon=True, tooltip=True):
     identifier = unicode(self)
     identifier = Html(identifier)
     if icon:
         image = self.getSmallIcon()
     else:
         image = None
     if image:
         html = htmlImage(image)
         if text:
             html += NBSP + identifier
     else:
         html = identifier
     if tooltip:
         tooltip_text = self.getToolTip()
         if tooltip_text:
             html = htmlSpan(html, title=tooltip_text)
     if link:
         url = self.controler.highlight_format % self['id']
         html = htmlLink(url, html)
     return html