# HG changeset patch # User Paul Boddie # Date 1367963074 -7200 # Node ID f18627d8a5dee09a19d9701a67856f4af336c9e5 # Parent 958a436338dee1eabb4d03e993add16cd6cdaaae Added datetime information for each update in the macro output. diff -r 958a436338de -r f18627d8a5de css/moinshare.css --- a/css/moinshare.css Tue May 07 22:31:11 2013 +0200 +++ b/css/moinshare.css Tue May 07 23:44:34 2013 +0200 @@ -15,3 +15,8 @@ border: 1px solid black; padding: 0.5em; } + +div.moinshare-date { + margin: 0.5em; + text-align: right; +} diff -r 958a436338de -r f18627d8a5de macros/SharedContent.py --- a/macros/SharedContent.py Tue May 07 22:31:11 2013 +0200 +++ b/macros/SharedContent.py Tue May 07 23:44:34 2013 +0200 @@ -6,7 +6,7 @@ @license: GNU GPL (v2 or later), see COPYING.txt for details. """ -from DateSupport import getDateTime, DateTime +from DateSupport import getDateTimeFromISO8601, DateTime from MoinMoin.Page import Page from MoinRemoteSupport import * from MoinSupport import parseMacroArguments @@ -158,7 +158,7 @@ if update: if feed_type == "atom": - value = getDateTime(text(value)) + value = getDateTimeFromISO8601(text(value)) else: value = DateTime(parsedate(text(value))) update.updated = value @@ -248,9 +248,14 @@ if show_content: append(fmt.div(on=1, css_class="moinshare-update")) + append(fmt.div(on=1, css_class="moinshare-content")) if update.content and update.content_type == "html": append(fmt.rawHTML(unescape(update.content))) append(fmt.div(on=0)) + append(fmt.div(on=1, css_class="moinshare-date")) + append(fmt.text(str(update.updated))) + append(fmt.div(on=0)) + append(fmt.div(on=0)) # Or emit title and link information for items.