Include author in content status headers

This commit is contained in:
Mouse Reeve
2022-01-12 10:35:02 -08:00
parent e452ec87d3
commit 5da2ce6427
6 changed files with 104 additions and 9 deletions

View File

@ -4,5 +4,19 @@
{% load status_display %}
{% load_book status as book %}
{% blocktrans with book_path=book.remote_id book=book|book_title %}finished reading <a href="{{ book_path }}">{{ book }}</a>{% endblocktrans %}
{% if book.authors.exists %}
{% with author=book.authors.first %}
{% blocktrans trimmed with book_path=book.local_path book=book|book_title author_name=author.name author_path=author.local_path %}
finished reading <a href="{{ book_path }}">{{ book }}</a> by <a href="{{ author_path }}">{{ author_name }}</a>
{% endblocktrans %}
{% endwith %}
{% else %}
{% blocktrans trimmed with book_path=book.local_path book=book|book_title %}
finished reading <a href="{{ book_path }}">{{ book }}</a>
{% endblocktrans %}
{% endif %}
{% endspaceless %}