Only use first publish date if publisher is unknown

This commit is contained in:
Adeodato Simó 2023-09-23 18:23:15 -03:00
parent 2c968e94cb
commit ec2c5cb546
No known key found for this signature in database
GPG key ID: CDF447845F1A986F

View file

@ -58,12 +58,12 @@
{% endif %}
{% with date=book.published_date|default:book.first_published_date|naturalday publisher=book.publishers|join:', ' %}
{% if date and publisher %}
{% if book.published_date and publisher %}
{% blocktrans %}Published {{ date }} by {{ publisher }}.{% endblocktrans %}
{% elif date %}
{% blocktrans %}Published {{ date }}{% endblocktrans %}
{% elif publisher %}
{% blocktrans %}Published by {{ publisher }}.{% endblocktrans %}
{% elif date %}
{% blocktrans %}Published {{ date }}{% endblocktrans %}
{% endif %}
{% endwith %}
</p>