$def with (author=None, type=None, limit=25) $ page = safeint(query_param('page', '1')) $ ip = query_param('ip', None) $def render_changes(bot, hash=""): $ changes = get_recent_changes(author=author, type=type, ip=ip, bot=bot, limit=limit, offset=(page-1) * limit) $for v in changes: $if v.key.startswith("/admin/"): $continue $# show book title/author name instead of key $if v.thing.type.key == '/type/edition': $ name = v.thing.title or 'Title unknown' $elif v.thing.type.key == '/type/work': $ name = v.thing.title or 'Title unknown' $elif v.thing.type.key == '/type/author': $ name = v.thing.name or 'Author name unknown' $else: $ name = v.key $if v.author: $elif v.ip and v.ip != '127.0.0.1': $else:
$_("When") $_("What") $_("Who") $_("Comment")
$datestr(v.created)
$name $if v.revision != 1: - diff
$v.author.displayname$v.ip$v.ip $v.comment $ marc = v.get('machine_comment') $if marc: ($_("View MARC"))
$if len(changes) == limit: ← $_("Older") $if page > 1:  |  $_("Newer") →
$if ip or author: $:render_changes(bot=None) $else:
$:render_changes(bot=False, hash="#humans")
$:render_changes(bot=True, hash="#bots")
$:render_changes(bot=None, hash="#all")