changeset 114:c64b00f31461

browser side: microblog entries
author Adrien Vigneron <adrienvigneron@mailoo.org>
date Tue, 05 Jul 2011 02:34:57 +0200
parents a87cfe9e013e
children f8af6b21ed61
files browser_side/panels.py
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/panels.py	Tue Jul 05 02:34:33 2011 +0200
+++ b/browser_side/panels.py	Tue Jul 05 02:34:57 2011 +0200
@@ -479,12 +479,18 @@
 
         _datetime = datetime.fromtimestamp(mblog_entry.timestamp)
 
-        panel = HTMLPanel("<div class='mb_entry_header'><span class='mb_entry_author'>%(author)s</span> on <span class='mb_entry_timestamp'>%(timestamp)s</span></div><div class='mb_entry_body'>%(body)s</div>" %
-            {"author": html_sanitize(mblog_entry.author),
-            "timestamp": _datetime,
-            "body": html_sanitize(mblog_entry.content)}
-            )
-        panel.setStyleName('microblogEntry')
+        panel = HTMLPanel("""
+            <div class="mb_entry_avatar"><img src="%(avatar)s" alt="%(author)s" /></div>
+            <div class="mb_entry_dialog">
+                <p class="bubble">%(body)s</p>
+            </div>
+            <div class='mb_entry_timestamp'>%(timestamp)s</div>
+            """ % {"avatar": "/media/misc/empty_avatar", 
+                   "author": html_sanitize(mblog_entry.author),
+                   "timestamp": _datetime,
+                   "body": html_sanitize(mblog_entry.content)
+                    })
+        panel.setStyleName('mb_entry')
         self.add(panel)
 
 class MicroblogPanel(LiberviaWidget):