X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..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 b069cb585..25c130908 100644 --- a/src/catalogue/templates/catalogue/book_short.html +++ b/src/catalogue/templates/catalogue/book_short.html @@ -1,135 +1,182 @@ {% spaceless %} -{% load i18n %} -{% load catalogue_tags ssify %} -{% load likes_book book_shelf_tags from social_tags %} -
-
-
- - - - -
- - -{% likes_book book.pk as likes %} -
-
- ★ -
-
-
- {% ssi_csrf_token %} - -
-
-
+ {% 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 %} + {% with book.tags_by_category as tags %} +
+
+ {% block book-box-body-pre %} + {% endblock %} + +
+ {% if book.cover_thumb %} + + Cover + + {% 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 parents %}, - {{ parent.title }}{% endfor %} -
-
- {% if main_link %}{% endif %}{{ book.title }}{% if main_link %}{% endif %} -
+
+ {% 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 %}
-
- {% 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 %} + {% 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 %}{% if book|status:request.user != 'closed' %} +
+ {% include 'catalogue/snippets/jplayer.html' %} +
+ {% endif %}{% endif %} {% endblock %} + {% if book.abstract %} +
+ {{ book.abstract|safe }} +
+ {% endif %} +
-
-
-{% endspaceless %} \ No newline at end of file +
+
+ {% endwith %} + {% endwith %} +{% endspaceless %}