diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index aef8fba1..95cf86ad 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -76,24 +76,7 @@ {% endif %} -
- {% if book.physical_format and not book.pages %} - {{ book.physical_format | title }} - {% elif book.physical_format and book.pages %} - {% blocktrans with format=book.physical_format|title pages=book.pages %}{{ format }}, {{ pages }} pages{% endblocktrans %} - {% elif book.pages %} - {% blocktrans with pages=book.pages %}{{ pages }} pages{% endblocktrans %} - {% endif %} -
-- {% if book.published_date and book.publishers %} - {% blocktrans with date=book.published_date|date:'M jS Y' publisher=book.publishers|join:', ' %}Published {{ date }} by {{ publisher }}.{% endblocktrans %} - {% elif book.published_date %} - {% blocktrans with date=book.published_date|date:'M jS Y' %}Published {{ date }}{% endblocktrans %} - {% elif book.publishers %} - {% blocktrans with publisher=book.publishers|join:', ' %}Published by {{ publisher }}.{% endblocktrans %} - {% endif %} -
+ {% include 'book/publisher_info.html' with book=book %} {% if book.openlibrary_key %}{% trans "View on OpenLibrary" %}
diff --git a/bookwyrm/templates/book/editions.html b/bookwyrm/templates/book/editions.html new file mode 100644 index 00000000..b77dc1a6 --- /dev/null +++ b/bookwyrm/templates/book/editions.html @@ -0,0 +1,33 @@ +{% extends 'layout.html' %} +{% load i18n %} +{% load bookwyrm_tags %} + +{% block title %}{% blocktrans with book_title=work.title %}Editions of {{ book_title }}{% endblocktrans %}{% endblock %} + +{% block content %} ++ {% if book.physical_format and not book.pages %} + {{ book.physical_format | title }} + {% elif book.physical_format and book.pages %} + {% blocktrans with format=book.physical_format|title pages=book.pages %}{{ format }}, {{ pages }} pages{% endblocktrans %} + {% elif book.pages %} + {% blocktrans with pages=book.pages %}{{ pages }} pages{% endblocktrans %} + {% endif %} +
+{% if book.languages %} ++ {% blocktrans with languages=book.languages|join:", " %}{{ languages }} language{% endblocktrans %} +
+{% endif %} ++ {% if book.published_date and book.publishers %} + {% blocktrans with date=book.published_date|date:'M jS Y' publisher=book.publishers|join:', ' %}Published {{ date }} by {{ publisher }}.{% endblocktrans %} + {% elif book.published_date %} + {% blocktrans with date=book.published_date|date:'M jS Y' %}Published {{ date }}{% endblocktrans %} + {% elif book.publishers %} + {% blocktrans with publisher=book.publishers|join:', ' %}Published by {{ publisher }}.{% endblocktrans %} + {% endif %} +
diff --git a/bookwyrm/templates/editions.html b/bookwyrm/templates/editions.html deleted file mode 100644 index f8319757..00000000 --- a/bookwyrm/templates/editions.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends 'layout.html' %} -{% load i18n %} -{% load bookwyrm_tags %} - -{% block title %}{% blocktrans with book_title=work.title %}Editions of {{ book_title }}{% endblocktrans %}{% endblock %} - -{% block content %} -