Fix popup map panning
[wolnelektury.git] / src / reporting / templates / reporting / main.html
old mode 100755 (executable)
new mode 100644 (file)
index bae491e..903db3e
@@ -1,8 +1,13 @@
-{% extends "base/base.html" %}
-{% load i18n %}
+{% extends "base_simple.html" %}
+{% load l10n %}
 {% load reporting_stats catalogue_tags %}
 
-{% block titleextra %}{% trans "Reports" %}{% endblock %}
+{% block settings %}
+  {% load title %}
+  {% title "Raporty" %}
+{% endblock %}
+
+{% block titleextra %}Raporty{% endblock %}
 
 {% block bodyid %}reports-stats{% endblock %}
 
   <h1>Statystyka</h1>
 
   <div class="normal-text">
+    <h3>Nieużywane tagi</h3>
+
+    <p>
+      Te tagi nie mają żadnych książek.
+      Prawdopodobnie można je usunąć, jeśli nie zawierają cennych informacji
+      albo czekają właśnie na publikację książki.
+    </p>
+
+    <ul>
+    {% for tag in unused_tags %}
+      <li><a href="{{ tag.get_absolute_url }}">{{ tag }} ({{ tag.get_category_display }})</a></li>
+    {% endfor %}
+    </ul>
+
     <h3>Audiobooki</h3>
 
     <table class="stats">
         <li>{{ license }} ({{ license_description }})</li>
       {% endfor %}
     </ul>
+
+    {% localize off %}
+    <h3>Aktualność plików</h3>
+    <table border="1">
+      <tr>
+        {% for e in etags %}
+          <td>
+            <div
+                style="width: 80px; overflow: hidden; text-overflow: ellipsis; padding: 2px;"
+                title="{{ e.field }}"
+            >
+              {{ e.field }}
+            </div>
+          </td>
+        {% endfor %}
+      </tr>
+      <tr>
+        {% for e in etags %}
+          <td>
+            <div style="width: 80px; overflow: hidden; text-overflow: ellipsis; padding: 2px;">
+              {{ e.etag }}
+            </div>
+          </td>
+        {% endfor %}
+      </tr>
+      <tr>
+        {% for e in etags %}
+          <td style="vertical-align: top">
+            {% for et in e.tags %}
+              <div
+                  style="position: relative; width:80px; overflow:hidden; text-overflow: ellipsis; padding: 2px;"
+                  title="{{ et.perc }}%"
+              >
+                <span style="z-index: 0; background: {% if et.tag == e.etag %}#92BD39{% elif et.tag == '' %}#FF4C54{% else %}#FFA500{% endif %}; position: absolute;left:0; top:0; bottom: 0; width: {{ et.perc }}%;"></span>
+                <span style="position: relative; z-index: 1">
+                  {{ et.count }} {{ et.tag }}
+                </span>
+              </div>
+            {% endfor %}
+          </td>
+        {% endfor %}
+      </tr>
+    </table>
+    {% endlocalize %}
+
   </div>
 {% endblock %}