6ee12ce6f9a501968fb765335c44f3145dd77901
[wolnelektury.git] / src / references / templates / references / popup.html
1 {% load thumbnail %}
2 <h2 class="header">
3   {% if entity.wikipedia_link %}
4   <a href="{{ entity.wikipedia_link }}" target="_blank">
5   {% endif %}
6     {{ entity.label }}
7   {% if entity.wikipedia_link %}
8   </a>
9   {% endif %}
10
11   <a href="{% url 'references_onepager' entity.id %}" target="_blank">
12     🖨️
13   </a>
14 </h2>
15
16 <div class="l-popup-books">
17 {% for ref in entity.reference_set.all %}
18   <div class="c-search-result-fragment">
19     <div class="l-popup-book-header">
20       <div>
21         {% thumbnail ref.book.cover_clean '150x150' as th %}
22         <a href="{{ ref.book.get_absolute_url }}" target="_blank">
23           <img src="{{ th.url }}" alt="{{ ref.book.pretty_title }}" title="{{ ref.book.pretty_title }}">
24         {% endthumbnail %}
25       </div>
26       <div>
27         {% for author in ref.book.authors %}
28           <a class="c-search-result-fragment-author" href="{{ author.get_absolute_url }}" target="_blank">
29             {{ author.name }}
30           </a>
31         {% endfor %}
32         <a class="c-search-result-fragment-title" href="{{ ref.book.get_absolute_url }}" target="_blank">
33           {{ ref.book.title }}
34         </a>
35       </div>
36     </div>
37
38     {% for occ in ref.occurence_set.all %}
39       <a target="_blank" href="/katalog/lektura/{{ ref.book.slug }}.html#sec{{ occ.section }}" class="c-search-result-fragment-text">
40         {{ occ.html|safe }}
41       </a>
42     {% endfor %}
43   </div>
44 {% endfor %}