$def with (authors, name_path, dict_path, readonly=False) $# :param list[dict] authors: e.g. {name: str, key: str} $# :param str name_path: form path for the user-visible author name $# :param str dict_path: form path for the author dict $# Import for side-effect of defining jsdef functions $:render_template('jsdef/LazyAuthorPreview', None) $jsdef render_author_autocomplete_item(item): $if item.key == "__new__":
$_("Create a new record for") $item.name
$else: $:render_lazy_author_preview(item) $jsdef render_author(name_path, dict_path, readonly, i, author):
[×] 
$ config = {'name_path': name_path, 'dict_path': dict_path}
$for author in (authors or [storage(name="", key="")]): $:render_author(name_path, dict_path, readonly, loop.index0, author) $_("Add another author?")