missing tmpl
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 20 Dec 2021 11:56:44 +0000 (12:56 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 20 Dec 2021 11:56:44 +0000 (12:56 +0100)
src/documents/templates/documents/book_stats.html [new file with mode: 0644]

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 %}