missing tmpl
[redakcja.git] / src / documents / templates / documents / book_stats.html
diff --git a/src/documents/templates/documents/book_stats.html b/src/documents/templates/documents/book_stats.html
new file mode 100644 (file)
index 0000000..084627f
--- /dev/null
@@ -0,0 +1,19 @@
+<tr>
+  <td style="padding-left: {{ depth}}.75em;">{{ book.book_info.title|default:"???" }}</td>
+  <td>{{ stats.self.chars|default_if_none:"?" }}</td>
+  <td>{{ stats.self.words|default_if_none:"?" }}</td>
+  <td>{{ stats.self.chars_with_fn|default_if_none:"?" }}</td>
+  <td>{{ stats.self.words_with_fn|default_if_none:"?" }}</td>
+</tr>
+{% if stats.parts %}
+  {% for part, partstats in stats.parts %}
+    {% include 'documents/book_stats.html' with book=part stats=partstats depth=depth|add:1 %}
+  {% endfor %}
+  <tr>
+    <td>&Sigma;</td>
+    <td>{{ stats.total.chars }}</td>
+    <td>{{ stats.total.words }}</td>
+    <td>{{ stats.total.chars_with_fn }}</td>
+    <td>{{ stats.total.words_with_fn }}</td>
+  </tr>
+{% endif %}