$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)

$_("When") | $_("What") | $_("Who") | $_("Comment")
--- | --- | --- | ---
$for v in changes: $if v.key.startswith("/admin/"): $continue
$datestr(v.created) $# 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 | $name $if v.revision != 1: - $_("diff") $if v.author: | $v.author.displayname $elif v.ip and v.ip != '127.0.0.1': | $v.ip $else: | $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:

- $_("By Humans")
- $_("By Bots")
- $_("Everything")

$:render_changes(bot=False, hash="#humans")
$:render_changes(bot=True, hash="#bots")
$:render_changes(bot=None, hash="#all")