book page fix
[wolnelektury.git] / src / catalogue / templates / catalogue / book_mini_box.html
old mode 100755 (executable)
new mode 100644 (file)
index 88ec16d..c9e324b
@@ -1,22 +1,25 @@
 {% spaceless %}
-<div class="book-mini-box">
-    <div class="book-mini-box-inner">
-    {% if with_link %}
-    <a href="{{ book.get_absolute_url }}">
-    {% endif %}
-        {% if book.cover_thumb %}
-            <img src="{{ book.cover_thumb.url }}" alt="{{ author_str }} – {{ book.title }}" class="cover" />
+  {% load thumbnail %}
+  {% with book.author_unicode as author %}
+    <div class="book-mini-box">
+      <div class="book-mini-box-inner">
+        {% if not no_link %}
+          <a href="{{ book.get_absolute_url }}">
         {% endif %}
-        {% if show_lang %}
+          {% if book.cover_clean %}
+            <img src="{% thumbnail book.cover_clean '139x193' as th %}{{ th.url }}{% endthumbnail %}" alt="{{ author }} – {{ book.title }}" class="cover" />
+          {% endif %}
+          {% if book.is_foreign %}
             <span class="language" title="{{ book.language_name }}">{{ book.language_code }}</span>
-        {% endif %}
-        <div class="desc">
-            <span class="mono author">{{ author_str }}</span>
+          {% endif %}
+          <div class="desc">
+            <span class="mono author">{{ author }}</span>
             <span class="title">{{ book.title }}</span>
-        </div>
-    {% if with_link %}
-    </a>
-    {% endif %}
+          </div>
+        {% if not no_link %}
+          </a>
+        {% endif %}
+      </div>
     </div>
-</div>
-{% endspaceless %}
\ No newline at end of file
+  {% endwith %}
+{% endspaceless %}