$def with (page) $ h = None $if "superfast" in ctx.features and "history_v2" not in ctx.features: $ h = page.get_history_preview() $if not h: $ h = get_history(page) $ versions = h.recent + h.initial $ cur_v = query_param("v", None) $ show_wikipedia_citation_link = page.wp_citation_fields
$_("Copy and paste this code into your Wikipedia page.") $_('Need help?')
| $datestr(v.created) | $if v.author: $ author_link = v.author.render_link(cls="truncate") $elif v.ip and v.ip != "127.0.0.1": $ author_link = '%s' % (v.ip, _('an anonymous user'), v.ip) $else: $ author_link = '%s' % (_('an anonymous user')) $if v.revision == 1: $:_("Created by %(user)s", user=author_link) $else: $:_("Edited by %(user)s", user=author_link) | $:render_template("history/comment", v) | $for v in h.recent: