$def with (work, edition, ocaid, work_title, star_ratings_stats)
$ book_title = edition.get('title', '') or (work.title if work else '')
$:render_template("type/edition/book_title", book_title, edition)
$ authors = (work or edition).get_authors()
$ author_names = (work or edition).author_names
$if authors:
$:macros.BookByline([(author.name, author.url()) for author in authors], attrs='itemprop="author"')
$elif author_names:
$:macros.BookByline([(name, None) for name in author_names], attrs='itemprop="author"')
$:star_ratings_stats