# HG changeset patch # User souliane # Date 1448466571 -3600 # Node ID 063385cbbfc26f7b2619ae9fde051435f890f011 # Parent dd70db1c48dcf3ac973bee55ed91b054256efa94 browser_side (blog): display author_jid in addition to author diff -r dd70db1c48dc -r 063385cbbfc2 src/browser/sat_browser/blog.py --- a/src/browser/sat_browser/blog.py Wed Nov 25 16:48:28 2015 +0100 +++ b/src/browser/sat_browser/blog.py Wed Nov 25 16:49:31 2015 +0100 @@ -106,11 +106,22 @@ def _setHeader(self): """Set the entry header.""" if not self.new: + author = html_tools.html_sanitize(unicode(self.item.author)) + author_jid = html_tools.html_sanitize(unicode(self.item.author_jid)) + if author_jid and not self.item.author_verified: + author_jid += u' ' + if author: + author += " <%s>" % author_jid + elif author_jid: + author = author_jid + else: + author = _("") + update_text = u" — ✍ " + "" % datetime.fromtimestamp(self.item.updated) self.header.add(HTML(""" on %(updated)s - """ % {'author': html_tools.html_sanitize(unicode(self.item.author)), + """ % {'author': author, 'published': datetime.fromtimestamp(self.item.published) if self.item.published is not None else '', 'updated': update_text if self.item.published != self.item.updated else '' }))