$def with (doc, lists) $def render_author(): $#
$:ungettext("This author is on 1 list.", "This author is on %(count)s lists.", len(lists), count=commify(len(lists)))
$def render_edition(): $#
$:ungettext("This is edition is on 1 list.", "This edition is on %(count)s lists.", len(lists), count=commify(len(lists)))
$def render_work():$:ungettext("This work is on 1 list.", "This work is on %(count)s lists.", len(lists), count=commify(len(lists)))
$def render_user():$ungettext("%(name)s has 1 list.", "%(name)s has %(count)s lists.", len(lists), name=doc.displayname, count=commify(len(lists)))
$def render_subject():$:ungettext("This subject is on 1 list.", "This subject is on %(count)s lists.", len(lists), count=commify(len(lists)))
$ type = doc.get("type") and doc.type.key $if doc.key.startswith("/subjects/"): $var title: $doc.name $:render_subject() $elif type == "/type/author": $var title: $doc.name $:render_author() $elif type == "/type/edition": $var title: $doc.title $:render_edition() $elif type == "/type/work": $var title: $doc.title $:render_work() $elif type == "/type/user": $var title: $doc.displayname $if days_since(doc.created) < 30: $ putctx('robots', 'noindex') $:render_user() $else: $var title: $_("Hm. Can't find it.")