diff --git a/openlibrary/macros/SearchResultsWork.html b/openlibrary/macros/SearchResultsWork.html
index d0afb28f34e9..d6a8d6cab8fa 100644
--- a/openlibrary/macros/SearchResultsWork.html
+++ b/openlibrary/macros/SearchResultsWork.html
@@ -61,12 +61,10 @@
-
-
+
+
$ authors = None
$if doc_type == 'infogami_work':
$ authors = doc.get_authors()
@@ -90,21 +88,12 @@
]
$:macros.BookByline(author_data, limit=max_rendered_authors, overflow_url=work_edition_url, attrs='class="results"')
-
- $if doc.get('ratings_count') and doc.get('ratings_average') and doc.get('want_to_read_count'):
- $:macros.StarRatingsByline(doc)
- $if doc.get('first_publish_year'):
-
- $_('First published in %(year)s', year=doc.first_publish_year)
-
- $if doc.get('edition_count'):
- $ungettext('%(count)s edition', '%(count)s editions', doc.edition_count, count=doc.edition_count)
- $if doc.get('languages'):
-
- $:ungettext('in %(count)d language', 'in %(count)d languages', len(doc.languages), count=len(doc.languages), langs=commify_list([get_language_name('/languages/' + lang) for lang in doc.languages]))
-
+
+ $ ratings_count = doc.get('ratings_count', None)
+ $ ratings_avg = doc.get('ratings_average', None)
+ $ want_to_read_count = doc.get('want_to_read_count', None)
+ $:macros.StarRatingsByline(ratings_count, ratings_avg, want_to_read_count)
$if doc.get('ia'):
- — $_('%s previewable', len(doc.get('ia')))
$if len(doc.get('ia')) > 1:
$ blur_preview = "preview-covers--blur" if blur else ""
@@ -113,6 +102,20 @@
+
+ $if doc.get('first_publish_year'):
+
+ $_('First published in %(year)s', year=doc.first_publish_year)
+ —
+ $if doc.get('edition_count'):
+
+ $ungettext('%(count)s edition', '%(count)s editions', doc.edition_count, count=doc.edition_count)
+
+ $if doc.get('languages'):
+
+ $:ungettext('in %(count)d language', 'in %(count)d languages', len(doc.languages), count=len(doc.languages), langs=commify_list([get_language_name('/languages/' + lang) for lang in doc.languages]))
+
+
$if show_librarian_extras: