Merge pull request #2532 from bookwyrm-social/generated-note-display

Display generated notes correctly depending on format
This commit is contained in:
Mouse Reeve 2022-12-21 11:05:48 -08:00 committed by GitHub
commit a4c3b79f41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,17 +4,17 @@
{% with user_path=status.user.local_path username=status.user.display_name book_path=book.local_path book_title=book|book_title %}
{% if status.status_type == 'GeneratedNote' %}
{% if status.content == 'wants to read' %}
{% if status.content == 'wants to read' or status.content == '<p>wants to read</p>' %}
{% blocktrans trimmed %}
<a href="{{ user_path}}">{{ username }}</a> wants to read <a href="{{ book_path }}">{{ book_title }}</a>
{% endblocktrans %}
{% endif %}
{% if status.content == 'finished reading' %}
{% if finished reading or status.content == '<p>finished reading</p>' %}
{% blocktrans trimmed %}
<a href="{{ user_path}}">{{ username }}</a> finished reading <a href="{{ book_path }}">{{ book_title }}</a>
{% endblocktrans %}
{% endif %}
{% if status.content == 'started reading' %}
{% if started reading or status.content == '<p>started reading</p>' %}
{% blocktrans trimmed %}
<a href="{{ user_path}}">{{ username }}</a> started reading <a href="{{ book_path }}">{{ book_title }}</a>
{% endblocktrans %}
@ -38,3 +38,4 @@
{% endif %}
{% endwith %}