bookwyrm/bookwyrm/templates/snippets/status/headers/generatednote.html
Christof Dorner 46bfc184f5 Improve feed header for federated generated notes
This works for wants/started/finished reading generated notes, but not yet for "set a goal".
2023-01-27 17:49:48 +01:00

17 lines
782 B
HTML

{% load cache %}
{% load i18n %}
{# Three day cache #}
{% get_current_language as LANGUAGE_CODE %}
{% cache 259200 generated_note_header LANGUAGE_CODE status.id %}
{% if status.content == 'wants to read' or status.content == '<p>wants to read</p>' %}
{% include 'snippets/status/headers/to_read.html' with book=status.mention_books.first %}
{% elif status.content == 'finished reading' or status.content == '<p>finished reading</p>' %}
{% include 'snippets/status/headers/read.html' with book=status.mention_books.first %}
{% elif status.content == 'started reading' or status.content == '<p>started reading</p>' %}
{% include 'snippets/status/headers/reading.html' with book=status.mention_books.first %}
{% else %}
{{ status.content }}
{% endif %}
{% endcache %}