mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-06-08 08:19:30 +00:00
46bfc184f5
This works for wants/started/finished reading generated notes, but not yet for "set a goal".
17 lines
782 B
HTML
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 %}
|