Update to new librarian api for html, txt.
[wolnelektury.git] / src / reporting / templates / reporting / main.html
1 {% extends "base_simple.html" %}
2 {% load l10n %}
3 {% load reporting_stats catalogue_tags %}
4
5 {% block settings %}
6   {% load title %}
7   {% title "Raporty" %}
8 {% endblock %}
9
10 {% block titleextra %}Raporty{% endblock %}
11
12 {% block bodyid %}reports-stats{% endblock %}
13
14
15 {% block body %}
16   <h1>Statystyka</h1>
17
18   <div class="normal-text">
19     <h3>Nieużywane tagi</h3>
20
21     <p>
22       Te tagi nie mają żadnych książek.
23       Prawdopodobnie można je usunąć, jeśli nie zawierają cennych informacji
24       albo czekają właśnie na publikację książki.
25     </p>
26
27     <ul>
28     {% for tag in unused_tags %}
29       <li><a href="{{ tag.get_absolute_url }}">{{ tag }} ({{ tag.get_category_display }})</a></li>
30     {% endfor %}
31     </ul>
32
33     <h3>Audiobooki</h3>
34
35     <table class="stats">
36       <tr><th>Utwory</th></tr>
37       <tr><td>Utwory:</td><td>{% count_books %}</td></tr>
38       <tr><td>Niezależne książki:</td><td>{% count_books_root %}</td></tr>
39       <tr><td>Utwory nadrzędne:</td><td>{% count_books_parent %}</td></tr>
40       <tr><td>Wszystkie utwory:</td><td>{% count_books_all %}</td></tr>
41
42       <tr><th>Media</th><th>Liczba</th><th>Rozmiar</th><th>Do wymiany</th></tr>
43       {% for mt in media_types %}
44         <tr>
45           <td>{{ mt.type }}:</td>
46           <td>{{ mt.count }}</td>
47           <td>{{ mt.size|filesizeformat }}</td>
48           <td>
49             {{ mt.deprecated }}
50             {% for m in mt.deprecated_files %}
51               <br/><a href="{{ m.book.get_absolute_url }}">{% book_title m.book %}: {{ m }}</a>
52             {% endfor %}
53           </td>
54         </tr>
55       {% endfor %}
56     </table>
57
58     <h3>Licencje</h3>
59     <ul>
60       {% for license, license_description in licenses %}
61         <li>{{ license }} ({{ license_description }})</li>
62       {% endfor %}
63     </ul>
64
65     {% localize off %}
66     <h3>Aktualność plików</h3>
67     <table border="1">
68       <tr>
69         {% for e in etags %}
70           <td>
71             <div
72                 style="width: 80px; overflow: hidden; text-overflow: ellipsis; padding: 2px;"
73                 title="{{ e.field }}"
74             >
75               {{ e.field }}
76             </div>
77           </td>
78         {% endfor %}
79       </tr>
80       <tr>
81         {% for e in etags %}
82           <td>
83             <div style="width: 80px; overflow: hidden; text-overflow: ellipsis; padding: 2px;">
84               {{ e.etag }}
85             </div>
86           </td>
87         {% endfor %}
88       </tr>
89       <tr>
90         {% for e in etags %}
91           <td style="vertical-align: top">
92             {% for et in e.tags %}
93               <div
94                   style="position: relative; width:80px; overflow:hidden; text-overflow: ellipsis; padding: 2px;"
95                   title="{{ et.perc }}%"
96               >
97                 <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>
98                 <span style="position: relative; z-index: 1">
99                   {{ et.count }} {{ et.tag }}
100                 </span>
101               </div>
102             {% endfor %}
103           </td>
104         {% endfor %}
105       </tr>
106     </table>
107     {% endlocalize %}
108
109   </div>
110 {% endblock %}