$def with (author=None, type=None, limit=25) $# _ = i18n.get_namespace('/macros/RecentChanges') $ page = safeint(query_param('page', '0')) $ ip = query_param('ip', None) $ changes = get_recent_changes(author=author, type=type, ip=ip, limit=limit, offset=page * limit) $ show_users = (query_param('show_users', 'false').lower() == 'true') $if len(changes) > 1:

Recent Activity

$for v in changes: $if show_users or not v.key.startswith('/user/'): $if v.thing.type.key == '/type/edition': $ name = v.thing.title or v.thing.key $elif v.thing.type.key == '/type/work': $ name = v.thing.title or v.thing.key $elif v.thing.type.key == '/type/author': $ name = v.thing.name or v.thing.key $else: $ name = v.key $else:
$_("When") $_("What") $_("Comment")
$datestr(v.created)
$name $if v.revision != 1: - diff
$v.comment
No edit history available.
$if len(changes) == limit: ← $_("Older") $if page != 0:  |  $_("Newer") →
$else:

$_("No edits. Yet.")