$def with (page, edition=None) $if page.type.key in ["/type/work", "/type/edition", "/type/author"]: $if edition and page.type.key in ["/type/work"]: $ edit_url = edition.url(suffix="/edit") $else: $ edit_url = page.url(suffix="/edit") $else: $ edit_url = page.key + "?m=edit"
$if not page.is_fake_record():
$_("Edit")
$if "superfast" in ctx.features: $ author = page.get_most_recent_change().author $else: $ author = get_recent_author(page) $if author:
$:_('Last edited by %(author_link)s', author_link=author.render_link())
$else:
$_("Last edited anonymously")
$if page.url:
$(page.last_modified and datestr(page.last_modified)) | $_('History')
$else:
$(page.last_modified and datestr(page.last_modified)) | $_('History')