{% spaceless %}
{% load i18n %}
+ {% load cache %}
{% load catalogue_tags %}
{% load book_shelf_tags from social_tags %}
{% load static %}
{% block book-box-body-pre %}
{% endblock %}
+ <div class="cover-area">
+ {% if book.cover_thumb %}
+ <a href="{% block cover-link %}{{ book.get_absolute_url }}{% endblock %}">
+ <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
+ </a>
+ {% endif %}
+ {% block cover-area-extra %}{% endblock %}
+ </div>
+
+ {% get_current_language as LANGUAGE_CODE %}
+ {% cache 86400 book_box_head_tags book.pk LANGUAGE_CODE %}
<div class="book-box-head">
<div class="author">
{% for tag in tags.author %}
{% endif %}
</div>
- <div class="cover-area">
- {% if book.cover_thumb %}
- <a href="{{ book.get_absolute_url }}">
- <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
- </a>
- {% endif %}
- {% block cover-area-extra %}{% endblock %}
- </div>
-
<div class="tags">
<span class="category">
<span class="mono"> {% trans "Epoch" %}:</span> <span class="book-box-tag">
{% endfor %}
</span></span>
- {% if book.extra_info.location %}
- <span class="category">
- <span class="mono"> {% trans "Region" %}:</span> <span class="book-box-tag">
- {{ book.extra_info.location }}
- </span></span>
- {% endif %}
+ {% with extra_info=book.get_extra_info_json %}
+ {% if extra_info.location %}
+ <span class="category">
+ <span class="mono"> {% trans "Region" %}:</span> <span class="book-box-tag">
+ {{ extra_info.location }}
+ </span></span>
+ {% endif %}
+ {% endwith %}
{% if book.is_foreign %}
<span class="category">
{% endif %}
{% endwith %}
</div>
+ {% endcache %}
</div>
{% book_shelf_tags book.pk %}
- {% if book|status:user != 'closed' %}
+ {% cache 86400 book_box_tools book.pk book|status:request.user LANGUAGE_CODE %}
+ {% if book|status:request.user != 'closed' %}
<ul class="book-box-tools">
<li class="book-box-read">
{% if book.html_file %}
</li>
</ul>
{% else %}
- <p class="book-box-tools">{% trans "For now this work is only available for our subscribers." %}</p>
- {% endif %}
- <div class="clearboth"></div>
- {% if book.abstract %}
- <div class="abstract more">
- {{ book.abstract|safe }}
- </div>
+ <p class="book-box-tools book-box-tools-warn">{% trans "For now this work is only available for our subscribers." %}
+ <a href="/towarzystwo/">Dołącz do Towarzystwa Przyjaciół Wolnych Lektur</a>
+ </p>
{% endif %}
+ {% endcache %}
{% block book-box-extra-info %}{% endblock %}
- {% block box-append %}
- {% endblock %}
+ {% block box-append %}{% endblock %}
</div>
{% endwith %}
{% block right-column %}
- {% if audiobooks %}
+ {% if audiobooks %}{% if book|status:request.user != 'closed' %}
<div class="book-right-column">
{% include 'catalogue/snippets/jplayer.html' %}
</div>
- {% endif %}
+ {% endif %}{% endif %}
{% endblock %}
+ {% if book.abstract %}
+ <div class="abstract more-expand">
+ {{ book.abstract|safe }}
+ </div>
+ {% endif %}
<div class="clearboth"></div>
</div>