* Remove duplicate Review object under `rating` property
This was preventing validation, since `rating` is not a valid property
(`review` is, which is created from book.html already).
* Drop `bestRating` property in ratings, since it defaults to 5
See <https://schema.org/bestRating> ("If bestRating is omitted,
5 is assumed").
* Create Rating object (and its enclosing Review) in book/rating.html
* Use `position` property for Book objects in a series
`volumeNumber`, previously used, is only valid for objects of type
PublicationVolume (which series members are not).
* Give URL of book series when setting of `isPartOf`
* series.html: Add empty BookSeries object
---------
Co-authored-by: Adeodato Simó <dato@users.noreply.github.com>
The stars.html template now outputs a span containing “no rating” when
the stars represent a non-existent or zero rating. This text is already
translated because it was previously added as a invisible text only for
screen readers. The span is given a special CSS class so that it can be
styled as italic in the stylesheet.
There is now also an extra span in book.html to group the stars with the
“(2 reviews)” text. This is needed because the outer div is using a flex
layout and it eats the spacing between the two parts otherwise.
Fixes#2856
The button to remove a book from a shelf when looking at the book’s page
wasn’t using the translated shelf name. It was also concatenating
strings instead of using a placeholder, which is difficult to translate
in some languages. This fixes it to use the translate_shelf_name
function and use the same placeholder string as in other places.
This was suggested on Matrix a while ago but I only found the time now to move forward with it.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
On the feed view along with other statuses, the body will be trimmed,
but on the single view, there's no need to trim it. This preserves the
logic for spoiler alerts.
This should be enough caching when renderering pages like the feed, but
not so much that editing a book or author will not show the updated data.
At least without having to do some clever cache busting.
PR #2283 surfaced an existing formerly-hidden issue with star rating defaults in the sidebar of book pages.
This commit ensures the default rating is zero, not half a star.
Fixes#2291
Previously the star rating appeared to be five stars when editing a review, regardless of what value was actually stored.
Now it will show the actual rating, including half stars.
Fixes#2213