comparison browser_side/panels.py @ 120:054b7b3424a3

browser side: microblog's entry header with pseudo and timestamp
author Goffi <goffi@goffi.org>
date Thu, 07 Jul 2011 19:03:06 +0200
parents a8d11fdea090
children 5cb852d9757e
comparison
equal deleted inserted replaced
119:a8d11fdea090 120:054b7b3424a3
479 479
480 self.author = mblog_entry.author 480 self.author = mblog_entry.author
481 _datetime = datetime.fromtimestamp(mblog_entry.timestamp) 481 _datetime = datetime.fromtimestamp(mblog_entry.timestamp)
482 482
483 self.panel = HTMLPanel(""" 483 self.panel = HTMLPanel("""
484 <div class='mb_entry_header'><span class='mb_entry_author'>%(author)s</span> on <span class='mb_entry_timestamp'>%(timestamp)s</span></div>
484 <div class="mb_entry_avatar" id='id_avatar'></div> 485 <div class="mb_entry_avatar" id='id_avatar'></div>
485 <div class="mb_entry_dialog"> 486 <div class="mb_entry_dialog">
486 <p class="bubble">%(body)s</p> 487 <p class="bubble">%(body)s</p>
487 </div> 488 </div>
488 <div class='mb_entry_timestamp'>%(timestamp)s</div>
489 """ % {"author": html_sanitize(self.author), 489 """ % {"author": html_sanitize(self.author),
490 "timestamp": _datetime, 490 "timestamp": _datetime,
491 "body": html_sanitize(mblog_entry.content) 491 "body": html_sanitize(mblog_entry.content)
492 }) 492 })
493 self.avatar = Image(host.getAvatar(self.author)) 493 self.avatar = Image(host.getAvatar(self.author))