$def with (page, edition=None, edit=True) $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") $ edit_url += '?work_key=%s' % page.key $else: $ edit_url = page.url(suffix="/edit") $else: $ edit_url = page.key + "?m=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')
$if edit and not page.is_fake_record():
$_("Edit")