diff --git a/bookwyrm/templates/snippets/stars.html b/bookwyrm/templates/snippets/stars.html index 2b40a9e3..ac049f25 100644 --- a/bookwyrm/templates/snippets/stars.html +++ b/bookwyrm/templates/snippets/stars.html @@ -1,7 +1,7 @@ {% spaceless %} {% load i18n %} -

+ {% if rating %} {% blocktranslate trimmed with rating=rating|floatformat count counter=rating|length %} @@ -23,5 +23,5 @@ aria-hidden="true" > {% endfor %} -

+ {% endspaceless %} diff --git a/bookwyrm/templates/snippets/status/content_status.html b/bookwyrm/templates/snippets/status/content_status.html index 05662098..44c52c83 100644 --- a/bookwyrm/templates/snippets/status/content_status.html +++ b/bookwyrm/templates/snippets/status/content_status.html @@ -6,120 +6,122 @@ {% with status_type=status.status_type %}
- {% if not hide_book %} - {% with book=status.book|default:status.mention_books.first %} -
-
+ {% if not hide_book %} + {% with book=status.book|default:status.mention_books.first %} +
{% include 'snippets/book_cover.html' with book=book %} {% include 'snippets/stars.html' with rating=book|rating:request.user %} {% include 'snippets/shelve_button/shelve_button.html' with book=book %}
-
- {% endwith %} - {% endif %} + {% endwith %} + {% endif %} -
- {% if status_type == 'Review' %} -
-

- {{ status.name|escape }} -

- -

-

-
- {% endif %} +

+

+ {% endif %} - {% if status.quote %} -
-
{{ status.quote | safe }}
+ {% if status.content_warning %} +
+

{{ status.content_warning }}

-

— {% include 'snippets/book_titleby.html' with book=status.book %}

+ {% trans "Show more" as button_text %} + + {% with text=button_text class="is-small" controls_text="show-status-cw" controls_uid=status.id %} + {% include 'snippets/toggle/open_button.html' %} + {% endwith %}
{% endif %} - {% if status.content and status_type != 'GeneratedNote' and status_type != 'Announce' %} - {% with full=status.content|safe no_trim=status.content_warning itemprop=body_prop %} - {% include 'snippets/trimmed_text.html' %} - {% endwith %} - {% endif %} +
+ {% endif %} + + {% if status.content and status_type != 'GeneratedNote' and status_type != 'Announce' %} + {% with full=status.content|safe no_trim=status.content_warning itemprop="reviewBody" %} + {% include 'snippets/trimmed_text.html' %} + {% endwith %} + {% endif %} + + {% if status.attachments.exists %} +
+
+ {% for attachment in status.attachments.all %} +
+
+ + {{ attachment.caption }} + +
+
+ {% endfor %} +
+
+ {% endif %} +
+ +
{% endwith %} diff --git a/bookwyrm/templates/snippets/status/generated_status.html b/bookwyrm/templates/snippets/status/generated_status.html index f4186cd1..f3bbae44 100644 --- a/bookwyrm/templates/snippets/status/generated_status.html +++ b/bookwyrm/templates/snippets/status/generated_status.html @@ -3,29 +3,9 @@ {% load bookwyrm_tags %} {% load i18n %} -{% if status_type == 'Rating' %} -
-
- - - - {# @todo Is it possible to not hard-code the value? #} - - - - {% include 'snippets/stars.html' with rating=status.rating %} -
-
-{% endif %} - {% if not hide_book %} {% with book=status.book|default:status.mention_books.first %} -
+
{% include 'snippets/book_cover.html' with book=book size="small" %} diff --git a/bookwyrm/templates/snippets/status/status_header.html b/bookwyrm/templates/snippets/status/status_header.html index 6493bd54..0fa74ddd 100644 --- a/bookwyrm/templates/snippets/status/status_header.html +++ b/bookwyrm/templates/snippets/status/status_header.html @@ -40,10 +40,29 @@ {% endwith %} {% endif %} + {% if status.book %} -{{ status.book.title }} + {% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %} + {{ status.book.title }}{% if status.status_type == 'Rating' %}: + + + + {% include 'snippets/stars.html' with rating=status.rating %} + {% endif %} + {% else %} + {% include 'snippets/book_titleby.html' with book=status.book %} + {% endif %} {% elif status.mention_books %} -{{ status.mention_books.first.title }} + {{ status.mention_books.first.title }} {% endif %} {% if status.progress %}