X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0d41de5708c34485a9e93a104ebff3a6e741f109..4db71d02697f83eac393bdf34fbe1aff54757df4:/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 6f5b19f47..25c130908 100644 --- a/src/catalogue/templates/catalogue/book_short.html +++ b/src/catalogue/templates/catalogue/book_short.html @@ -1,129 +1,182 @@ {% spaceless %} -{% load i18n %} -{% load catalogue_tags %} -{% load book_shelf_tags from social_tags %} -
-
+ {% load i18n %} + {% load cache %} + {% load catalogue_tags %} + {% load book_shelf_tags from social_tags %} + {% load static %} -{% block book-box-pre %} - {% include "catalogue/snippets/like_button.html" %} -{% endblock %} + {% with ga=book.get_audiobooks %} + {% with audiobooks=ga.0 %} +
+
-
+ {% block book-box-pre %} + {% include "catalogue/snippets/like_button.html" %} + {% endblock %} -
+ {% with book.tags_by_category as tags %} +
+
{% block book-box-body-pre %} {% endblock %} -
-
- {% 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 %} -
+
+ {% if book.cover_thumb %} + + Cover + + {% endif %} + {% block cover-area-extra %}{% endblock %}
-
- {% if book.cover_thumb %} - {% if main_link %}{% endif %} - Cover - {% if main_link %}{% endif %} - {% endif %} - {% block cover-area-extra %}{% endblock %} + {% 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 book.parents %}, + {{ parent.title }}{% endfor %} +
+ + {% if book.translator %} +
+ tłum. {{ book.translator }} +
+ {% endif %}
- {% spaceless %} + + {% trans "Epoch" %}:  + {% for tag in tags.epoch %} + {{ 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 "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 "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 %} + {% endcache %} +
+ {% book_shelf_tags book.pk %} -
+ {% if book.has_mp3_file %} +
+ {% trans "Download audiobook" %}:
+ {% download_audio book %} +
+ {% endif %} +
+ {% custom_pdf_link_li book %} +
+ + + {% 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 %} - {% if audiobooks %} -
- {% include 'catalogue/snippets/jplayer.html' %} + {% block right-column %} + {% if audiobooks %}{% if book|status:request.user != 'closed' %} +
+ {% include 'catalogue/snippets/jplayer.html' %}
+ {% endif %}{% endif %} + {% endblock %} + {% if book.abstract %} +
+ {{ book.abstract|safe }} +
{% endif %} -{% endblock %} -
-
-
+
+
+
+ {% endwith %} + {% endwith %} {% endspaceless %}