Locatizations.
[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>Audiobooki</h3>
20
21     <table class="stats">
22       <tr><th>Utwory</th></tr>
23       <tr><td>Utwory:</td><td>{% count_books %}</td></tr>
24       <tr><td>Niezależne książki:</td><td>{% count_books_root %}</td></tr>
25       <tr><td>Utwory nadrzędne:</td><td>{% count_books_parent %}</td></tr>
26       <tr><td>Wszystkie utwory:</td><td>{% count_books_all %}</td></tr>
27
28       <tr><th>Media</th><th>Liczba</th><th>Rozmiar</th><th>Do wymiany</th></tr>
29       {% for mt in media_types %}
30         <tr>
31           <td>{{ mt.type }}:</td>
32           <td>{{ mt.count }}</td>
33           <td>{{ mt.size|filesizeformat }}</td>
34           <td>
35             {{ mt.deprecated }}
36             {% for m in mt.deprecated_files %}
37               <br/><a href="{{ m.book.get_absolute_url }}">{% book_title m.book %}: {{ m }}</a>
38             {% endfor %}
39           </td>
40         </tr>
41       {% endfor %}
42     </table>
43
44     <h3>Licencje</h3>
45     <ul>
46       {% for license, license_description in licenses %}
47         <li>{{ license }} ({{ license_description }})</li>
48       {% endfor %}
49     </ul>
50
51     {% localize off %}
52     <h3>Aktualność plików</h3>
53     <table border="1">
54       <tr>
55         {% for e in etags %}
56           <td>
57             <div
58                 style="width: 80px; overflow: hidden; text-overflow: ellipsis; padding: 2px;"
59                 title="{{ e.field }}"
60             >
61               {{ e.field }}
62             </div>
63           </td>
64         {% endfor %}
65       </tr>
66       <tr>
67         {% for e in etags %}
68           <td>
69             <div style="width: 80px; overflow: hidden; text-overflow: ellipsis; padding: 2px;">
70               {{ e.etag }}
71             </div>
72           </td>
73         {% endfor %}
74       </tr>
75       <tr>
76         {% for e in etags %}
77           <td style="vertical-align: top">
78             {% for et in e.tags %}
79               <div
80                   style="position: relative; width:80px; overflow:hidden; text-overflow: ellipsis; padding: 2px;"
81                   title="{{ et.perc }}%"
82               >
83                 <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>
84                 <span style="position: relative; z-index: 1">
85                   {{ et.count }} {{ et.tag }}
86                 </span>
87               </div>
88             {% endfor %}
89           </td>
90         {% endfor %}
91       </tr>
92     </table>
93     {% endlocalize %}
94
95   </div>
96 {% endblock %}