mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 11:01:12 +00:00
Factor out book series info into separate template
This commit is contained in:
parent
0282e20b89
commit
2d2ccd51df
9 changed files with 12 additions and 27 deletions
3
bookwyrm/templates/snippets/book_series.html
Normal file
3
bookwyrm/templates/snippets/book_series.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
|
@ -9,8 +9,7 @@
|
|||
|
||||
{% if book.authors.exists %}
|
||||
{% blocktrans trimmed with path=book.local_path title=book|book_title %}
|
||||
<a href="{{ path }}">{{ title }}
|
||||
</a>
|
||||
<a href="{{ path }}">{{ title }}</a>
|
||||
by
|
||||
{% endblocktrans %} {% include 'snippets/authors.html' with book=book limit=3 %}
|
||||
|
||||
|
@ -18,10 +17,7 @@ by
|
|||
<a href="{{ book.local_path }}">{{ book|book_title }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
||||
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endcache %}
|
||||
{% endspaceless %}
|
||||
|
|
|
@ -18,8 +18,6 @@ commented on <a href="{{ book_path }}">{{ book }}</a>
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endwith %}
|
||||
|
|
|
@ -18,8 +18,6 @@ quoted <a href="{{ book_path }}">{{ book }}</a>
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endwith %}
|
||||
|
|
|
@ -20,8 +20,6 @@ finished reading <a href="{{ book_path }}">{{ book }}</a>
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endspaceless %}
|
||||
|
|
|
@ -20,8 +20,6 @@ started reading <a href="{{ book_path }}">{{ book }}</a>
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}} {%if book.series_number %}#{{book.series_number}}) {% endif %}
|
||||
{% endif %}
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endspaceless %}
|
||||
|
|
|
@ -18,8 +18,6 @@ reviewed <a href="{{ book_path }}">{{ book }}</a>
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endwith %}
|
||||
|
|
|
@ -20,9 +20,7 @@ stopped reading <a href="{{ book_path }}">{{ book }}</a>
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endspaceless %}
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ wants to read <a href="{{ book_path }}">{{ book }}</a>
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if book.series %}
|
||||
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
|
||||
{% endif %}
|
||||
{% include 'snippets/book_series.html' with book=book %}
|
||||
|
||||
{% endspaceless %}
|
||||
|
|
Loading…
Reference in a new issue