715ba8f1bbc79d26c90df92aedd3f33bb6bba587
[redakcja.git] / src / catalogue / templates / catalogue / catalogue.html
1 {% extends "documents/base.html" %}
2
3 {% load i18n %}
4 {% load pagination_tags %}
5
6
7 {% block titleextra %}{% trans "Catalogue" %}{% endblock %}
8
9
10 {% block content %}
11   <div class="card">
12     <div class="card-header">
13       <h1>{% trans "Catalogue" %}</h1>
14     </div>
15     <div class="card-body">
16       <table class="table">
17         {% autopaginate authors 20 as authors_page %}
18         {% for author in authors_page %}
19           <tr>
20             <th>
21               <a href="{{ author.get_absolute_url }}">
22                 {{ author }}
23               </a>
24             </th>
25             <td>
26               {{ author.pd_year|default_if_none:"-" }}
27             </td>
28             <td>
29               {{ author.wikidata_link }}
30             </td>
31             <td>
32               {{ author.get_priority_display }}
33             </td>
34           </tr>
35           {% for book in author.book_set.all %}
36             <tr>
37               <td>
38                 &nbsp;
39                 <a href="{{ book.get_absolute_url }}">
40                   {{ book.title }}
41                 </a>
42               </td>
43               <td>
44                 {{ book.pd_year|default_if_none:"-" }}
45               </td>
46               <td>
47                 {{ book.wikidata_link }}
48               </td>
49               <td>
50                 {{ book.get_priorty_display }}
51               </td>
52               <td>
53                 {% for b in book.document_books %}
54                   <a href="{{ b.get_absolute_url }}">
55                     {{ b }}
56                   </a>
57                 {% endfor %}
58               </td>
59             </tr>
60           {% endfor %}
61           {% for book in author.translated_book_set.all %}
62             <tr>
63               <td>
64                 &nbsp;
65                 <a href="{{ book.get_absolute_url }}">
66                   {{ book.title }}
67                 </a> ({% trans "trans." %})
68               </td>
69               <td>
70                 {{ book.pd_year|default_if_none:"-" }}
71               </td>
72               <td>
73                 {{ book.wikidata_link }}
74               </td>
75               <td>
76                 {{ book.get_priorty_display }}
77               </td>
78               <td>
79                 {% for b in book.document_books %}
80                   <a href="{{ b.get_absolute_url }}">
81                     {{ b }}
82                   </a>
83                 {% endfor %}
84               </td>
85             </tr>
86           {% endfor %}
87         {% endfor %}
88       </table>
89       {% paginate %}
90       {% blocktrans count c=authors|length %}{{c}} author{% plural %}{{c}} authors{% endblocktrans %}
91     </div>
92   </div>
93 {% endblock content %}