X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/af17a2c1c05c588407875590a1cd7f82ac360cba..9574b970bdd6e28fc6178b736e8e17dfca15fd4e:/src/catalogue/templates/catalogue/book_short.html diff --git a/src/catalogue/templates/catalogue/book_short.html b/src/catalogue/templates/catalogue/book_short.html index dea797bc9..1df91ca42 100644 --- a/src/catalogue/templates/catalogue/book_short.html +++ b/src/catalogue/templates/catalogue/book_short.html @@ -1,205 +1,183 @@ {% spaceless %} -{% load i18n %} -{% load catalogue_tags ssify %} -{% load likes_book book_shelf_tags from social_tags %} -
-
-
- - - - -
- + {% load i18n %} + {% load cache %} + {% load catalogue_tags %} + {% load book_shelf_tags from social_tags %} + {% load static %} + + {% with ga=book.get_audiobooks %} + {% with audiobooks=ga.0 %} +
+
+ + {% block book-box-pre %} + {% include "catalogue/snippets/like_button.html" %} + {% endblock %} - {% likes_book book.pk as likes %} -
-
- ★ + {% with book.tags_by_category as tags %} +
+
+ {% block book-box-body-pre %} + {% endblock %} + +
+ {% if book.cover_thumb %} + + Cover + + {% endif %} + {% block cover-area-extra %}{% endblock %}
-
-
- {% ssi_csrf_token %} - -
-
-
-
-
+ {% get_current_language as LANGUAGE_CODE %} + {% cache 86400 book_box_head_tags book.pk LANGUAGE_CODE %} +
+
{% for tag in tags.author %} - {{ tag.name }}{% if not forloop.last %}, - {% endif %}{% endfor %}{% for parent in parents %}, - {{ parent.title }}{% endfor %} -
-
- {% if main_link %}{% endif %}{{ book.title }}{% if main_link %}{% endif %} + {{ tag.name }}{% if not forloop.last %}, + {% endif %}{% endfor %}{% for parent in book.parents %}, + {{ parent.title }}{% endfor %} +
+ + {% if book.translator %} +
+ tłum. {{ book.translator }} +
+ {% endif %}
-
- -
- {% if book.cover_thumb %} - {% if main_link %}{% endif %} - Cover - {% if main_link %}{% endif %} - {% endif %} - {% block cover-area-extra %}{% endblock %} -
- {% spaceless %} - - - {% trans "Epoch" %}:  - {% for tag in tags.epoch %} - {{ tag.name }} - {% if not forloop.last %}, {% endif %} - {% endfor %} - - - - {% trans "Kind" %}:  - {% for tag in tags.kind %} - {{ tag.name }} - {% if not forloop.last %}, {% endif %} - {% endfor %} - - - - {% trans "Genre" %}:  - {% for tag in tags.genre %} - {{ tag.name }} - {% if not forloop.last %}, {% endif %} - {% endfor %} - + + {% trans "Epoch" %}:  + {% for tag in tags.epoch %} + {{ tag.name }} + {% if not forloop.last %}, {% endif %} + {% endfor %} + + + + {% trans "Kind" %}:  + {% for tag in tags.kind %} + {{ tag.name }} + {% if not forloop.last %}, {% endif %} + {% endfor %} + + + + {% trans "Genre" %}:  + {% for tag in tags.genre %} + {{ tag.name }} + {% if not forloop.last %}, {% endif %} + {% endfor %} + + + {% with extra_info=book.get_extra_info_json %} + {% if extra_info.location %} + + {% trans "Region" %}:  + {{ extra_info.location }} + + {% endif %} + {% endwith %} - {% if show_lang %} + {% if book.is_foreign %} - {% trans "Language" %}:  + {% trans "Language" %}:  {{ book.language_name }} - - {% endif %} - - {% if stage_note %} -
- {{ stage_note }} +
- {% endif %} + {% endif %} - {% endspaceless %} + {% with stage_note=book.stage_note %} + {% if stage_note.0 %} +
+ + {{ stage_note.0 }} + + {% endif %} + {% endwith %}
-
- {% book_shelf_tags book.pk %} - -
+ {% book_shelf_tags book.pk %} + + {% cache 86400 book_box_tools book.pk book|status:request.user LANGUAGE_CODE %} + {% if book|status:request.user != 'closed' %} + - {% block book-box-extra-info %}{% endblock %} - {% block box-append %} - {% endblock %} + + + {% else %} + {% block preview-info %} +

+ {% trans "For now this work is only available for our subscribers." %} + Dołącz do Towarzystwa Przyjaciół Wolnych Lektur +

+
{% content_warning book %}
+ {% endblock %} + {% endif %} + {% endcache %} + {% block book-box-extra-info %}{% endblock %} + {% block box-append %}{% endblock %}
- - - - - + {% endwith %} {% block right-column %} - {% endblock %} - - -{% if audiobooks %} - + {% endwith %} + {% endwith %} {% endspaceless %}