Cleanup
[wolnelektury.git] / src / reporting / templates / reporting / main.html
old mode 100755 (executable)
new mode 100644 (file)
index bae491e..5d121ce
@@ -1,7 +1,13 @@
-{% extends "base/base.html" %}
-{% load i18n %}
+{% extends "base_simple.html" %}
+{% load i18n l10n %}
 {% load reporting_stats catalogue_tags %}
 
+{% block settings %}
+  {% load title %}
+  {% trans "Reports" as title %}
+  {% title title %}
+{% endblock %}
+
 {% block titleextra %}{% trans "Reports" %}{% endblock %}
 
 {% block bodyid %}reports-stats{% endblock %}
         <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 %}