From: Radek Czajka <rczajka@rczajka.pl>
Date: Mon, 20 Dec 2021 11:56:44 +0000 (+0100)
Subject: missing tmpl
X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/530238f609ba71ea112307ea66f0bc486ae11e33?hp=c30cd74f1f4dcf0bfbabb0e5a739bcdf236b4946

missing tmpl
---

diff --git a/src/documents/templates/documents/book_stats.html b/src/documents/templates/documents/book_stats.html
new file mode 100644
index 00000000..084627f0
--- /dev/null
+++ b/src/documents/templates/documents/book_stats.html
@@ -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 %}