Preliminary source objects.
[redakcja.git] / src / sources / templates / sources / source_detail.html
diff --git a/src/sources/templates/sources/source_detail.html b/src/sources/templates/sources/source_detail.html
new file mode 100644 (file)
index 0000000..240a2b3
--- /dev/null
@@ -0,0 +1,26 @@
+{% extends 'documents/base.html' %}
+{% load sorl_thumbnail %}
+
+{% block content %}
+  <h1>{{ source }}</h1>
+
+  <p>
+  <a href="{% url 'source_upload' source.pk %}">
+    Skany
+  </a>
+  </p>
+
+  <h2>Przypisania do książek:</h2>
+  {% for bs in source.booksource_set.all %}
+    <div>
+      <a href="{% url 'source_book_prepare' bs.pk %}">
+        {{ bs.book }} {{ bs.page_start }}—{{ bs.page_end }}
+      </a>
+    </div>
+    {% for f in bs.get_files %}
+      {% thumbnail f '200x200' as c %}
+      <a href="{{ MEDIA_URL }}{{ f }}"><img src="{{ c.url }}"></a>
+      {% endthumbnail %}
+    {% endfor %}
+  {% endfor %}
+{% endblock %}