Meta errors in alerts.
[redakcja.git] / src / documents / templates / documents / book_detail.html
index be17ec1..1c06f97 100644 (file)
 <div class="col-lg-3">
 <img class="cover-preview" src="{% url 'cover_preview' book.slug %}" />
 {% if book.dc_cover_image %}
-    <a href="{{ book.dc_cover_image.get_absolute_url }}">{{ book.dc_cover_image }}</a>
+  <a href="{{ book.dc_cover_image.get_absolute_url }}">{{ book.dc_cover_image }}</a>
 {% endif %}
+<br><br>
+
+<form action="{% url 'cover_quick_import' book.pk %}" method="post">
+  {% csrf_token %}
+  <input type="url" name="url">
+  <button type="submit" class="btn btn-sm btn-info">></button>
+</form>
+
+
 <br><br>
 <form action="{% url 'cover_preview' book.slug %}">
 <input type="hidden" name="download" value="1">
@@ -129,4 +138,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 %}