rearrangements: new core app, templates in apps, split settings;
[wolnelektury.git] / apps / catalogue / templates / catalogue / book_mini_box.html
diff --git a/apps/catalogue/templates/catalogue/book_mini_box.html b/apps/catalogue/templates/catalogue/book_mini_box.html
new file mode 100755 (executable)
index 0000000..830c08e
--- /dev/null
@@ -0,0 +1,24 @@
+{% load thumbnail %}
+<div class="book-mini-box">
+    <a href="{{ book.get_absolute_url }}">
+        {% 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>
+
+