plugin
upstream
Templates in the website are disabled now. Editing them will not have any effect on the live website.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
$def with (author=None, limit=1) $ _ = i18n.get_namespace('/mode/view') $ changes = get_recent_changes(author=author, limit=limit) <div id="databar"> <div class="widgetlabel"> $if changes: $ v = changes[0] $if v.author: $ who = '<a href="%s" rel="nofollow">%s</a>' % (v.author.key, v.author.displayname or v.author.key) $else: $ who = None $if v.thing.type.key == '/type/edition': $ what = v.thing.title $elif v.thing.type.key == '/type/author': $ what = v.thing.name $else: $ what = v.key $ what = '<a href="%s" rel="nofollow">%s</a>' % (v.key, what) $ when = datestr(v.created) $if v.comment: $ comment = ": " + v.comment[0:50] $else: $ comment = "" $if who: <b>$_.whats_new:</b> $:who updated $:what $when $comment $else: <b>$_.whats_new:</b> $:what was updated anonymously $when $comment </div> </div> |