X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f906193db2ec44590f57beae2e8ee2df76117b7b..4f8142e9c019b68f81e16e839025302957905d0a:/wolnelektury/templates/catalogue/book_mini_box.html diff --git a/wolnelektury/templates/catalogue/book_mini_box.html b/wolnelektury/templates/catalogue/book_mini_box.html index 4ef82e125..830c08e27 100755 --- a/wolnelektury/templates/catalogue/book_mini_box.html +++ b/wolnelektury/templates/catalogue/book_mini_box.html @@ -1,12 +1,23 @@ -{% load i18n %} +{% load thumbnail %} <div class="book-mini-box"> <a href="{{ book.get_absolute_url }}"> - <img src="{{ STATIC_URL }}img/cover.png" - alt="{% trans "Book cover" %}" /> - {% for author in authors %} - <div class="mono author">{{ author }}</div> - {{ book.title }} - {% endfor %} + {% if book.cover %} + <img src=" + {% thumbnail book.cover "139x193" as thumb %} + {{ thumb.url }} + {% empty %} + {{ book.cover.url }} + {% endthumbnail %} + " alt="Cover" /> + {% endif %} + <div class="desc"> + <span class="mono author"> + {% for name, url in related.tags.author %} + {{ name }}{% if not forloop.last %}, {% endif %} + {% endfor %} + </span> + <span class="title">{{ book.title }}</span> + </div> </a> </div>