- </div>
- {% book_shelf_tags book.pk %}
-
- <ul class="book-box-tools">
- <li class="book-box-read">
- {% if book.html_file %}
- <a href="{% url 'book_text' book.slug %}" class="downarrow">{% trans "Read online" %}</a>
- {% endif %}
- </li>
- <li class="book-box-download hoverget">
- <a class="downarrow hoverclick">{% trans "Download" %}</a>
+ {% endcache %}
+ </div>
+ {% book_shelf_tags book.pk %}
+
+ {% 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 %}
+ <div>{% content_warning book %}</div>
+ <a href="{% url 'book_text' book.slug %}" class="downarrow">{% trans "Czytaj online" %}</a>
+ {% endif %}
+ {% if book.print_on_demand %}
+ <a href="{{ book.ridero_link }}" class="downarrow print tlite-tooltip" title="{% trans "Cena książki w druku cyfrowym jest zależna od liczby stron.<br>Przed zakupem upewnij się, że cena druku na żądanie jest dla Ciebie odpowiednia.<br>Wszystkie nasze zasoby w wersji elektronicznej są zawsze dostępne bezpłatnie." %}">{% trans "Druk na żądanie z" %}
+ <img src="{% static 'img/ridero.png' %}" style="height: 0.8em;"/></a>
+ {% endif %}
+ </li>
+ <li class="book-box-download">
+ <div class="book-box-formats">
+ {% trans "Pobierz ebook" %}:<br>
+ {% if book.pdf_file %}
+ <a href="{{ book.pdf_url}}">PDF</a>
+ {% endif %}
+ {% if book.epub_file %}
+ <a href="{{ book.epub_url}}">EPUB</a>
+ {% endif %}
+ {% if book.mobi_file %}
+ <a href="{{ book.mobi_url}}">MOBI</a>
+ {% endif %}
+ {% if book.fb2_file %}
+ <a href="{{ book.fb2_url}}">FB2</a>
+ {% endif %}
+ {% if book.txt_file %}
+ <a href="{{ book.txt_url}}">TXT</a>
+ {% endif %}
+ </div>
+ {% if book.has_mp3_file %}
+ <div class="book-box-formats">
+ {% trans "Pobierz audiobook" %}:<br>
+ {% download_audio book %}
+ </div>
+ {% endif %}