Isbns, and minor fixes.
[redakcja.git] / src / isbn / templates / isbn / list.html
1 {% extends "documents/base.html" %}
2 {% load pagination_tags %}
3 {% load l10n %}
4
5
6 {% block content %}
7   {% localize off %}
8   <table class="table">
9     {% for pool in pools %}
10       <tr>
11         <th>
12           {{ pool.get_purpose_display }}
13         </th>
14         <th>
15           ({{ pool }})
16         </th>
17         <th>
18           <div class="progress" style="height: 20px;">
19             {% with p=pool.fill_percentage %}
20               <div class="progress-bar" role="progressbar" style="width: {{ p }}%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">{% if p > 30 %}{{ pool.entries }} / {{ pool.size }}{% endif %}</div>
21               {% if p <= 30 %}{{ pool.entries }} / {{ pool.size }}{% endif %}
22             {% endwith %}
23           </div>
24         </th>
25       </tr>
26     {% endfor %}
27   </table>
28   {% endlocalize %}
29
30   {% autopaginate list 100 %}
31   <table class="table">
32     <thead>
33       <tr>
34         <th>ISBN</th>
35         <th>Książka</th>
36         <th>Forma</th>
37         <th>Czas</th>
38       </tr>
39     </thead>
40     <tbody>
41       {% for isbn in list %}
42         <tr>
43           <td>
44             {{ isbn.get_code }}
45           </td>
46           <td>
47             {{ isbn.book|default_if_none:'—' }}
48           </td>
49           <td>
50             {{ isbn.form|default_if_none:'—' }}
51           </td>
52           <td>
53             {{ isbn.datestamp|default_if_none:'—' }}
54           </td>
55           <td>
56             {% if isbn.wl_data %}
57               <span class="badge badge-info" title="{{ isbn.wl_data }}">WL</span>
58             {% endif %}
59           </td>
60           <td>
61             {% if isbn.bn_data %}
62               <span class="badge badge-info" title="{{ isbn.bn_data }}">BN</span>
63             {% endif %}
64           </td>
65           <td>
66             {% if isbn.notes %}
67               <span class="badge badge-info" title="{{ isbn.notes }}">not.</span>
68             {% endif %}
69           </td>
70         </tr>
71       {% endfor %}
72     </tbody>
73   </table>
74   {% paginate %}
75 {% endblock %}