fixes
[redakcja.git] / src / documents / templates / documents / book_detail.html
index 3dbaf21..55da225 100644 (file)
@@ -13,7 +13,8 @@
       <h1>{{ book.title }}</h1>
     </div>
     <div class="card-body">
-    
+      <div class="row">
+       <div class="col-md-8">
 
 
 {% if editable %}<form method='POST'>{% csrf_token %}{% endif %}
 
     <p style="text-align:right"><a class="btn btn-sm btn-danger" href="{% url 'documents_book_append' book.slug %}">{% trans "Append to other book" %}</a></p>
 {% endif %}
+
+
+       </div>
+       <div class="col-md-4">
+          {% with cbook=book.catalogue_book %}
+            {% if cbook %}
+             W katalogu:
+             <a href="{% url 'catalogue_book' cbook.slug %}">{{ cbook }}</a>
+            {% endif %}
+          {% endwith %}
+       </div>
+      </div>
     </div>
-    </div>
+  </div>
 
   <div class="card mt-4">
     <div class="card-header">
@@ -73,7 +86,7 @@ Okładka w rozmiarze
 </form>
 </div>
 <div class="col-lg-9">
-<p>{% trans "Last published" %}: 
+<p>{% trans "Last published" %}:
     {% if book.last_published %}
         {{ book.last_published }}
     {% else %}
@@ -116,4 +129,34 @@ Okładka w rozmiarze
 
 </div>
   </div>
+</div>
+</div>
+
+{% if doc %}
+  <div class="card mt-4">
+    <div class="card-header">
+      <h2>{% trans "Statistics" %}</h2>
+    </div>
+    <div class="card-body">
+      <table class="table">
+        <thead>
+          <tr>
+            <th>
+              {% trans "book" %}
+            </th>
+            <th>{% trans "characters" %}</th>
+            <th>{% trans "characters (with footnotes)" %}</th>
+            <th>{% trans "words" %}</th>
+            <th>{% trans "words (with footnotes)" %}</th>
+          </tr>
+        </thead>
+        <tbody>
+          {% with stats=book.wldocument.get_statistics %}
+            {% include 'documents/book_stats.html' with book=book stats=stats depth=0 %}
+          {% endwith %}
+        </tbody>
+      </table>
+    </div>
+  </div>
+{% endif %}
 {% endblock content %}