add favicon, reverse page titles
[redakcja.git] / apps / cover / templates / cover / image_detail.html
1 {% extends "catalogue/base.html" %}
2 {% load i18n %}
3 {% load thumbnail %}
4 {% load build_absolute_uri from fnp_common %}
5
6 {% block titleextra %}{% trans "Cover image" %}{% endblock %}
7
8 {% block content %}
9 <h1>{% trans "Cover image" %}</h1>
10
11 <div style="float: right; margin-bottom:1em;">
12
13 <a href="{{ object.file.url }}"><img
14         src="{% thumbnail object.file "565x833" as thumb %}
15                 {{ thumb.url }}
16              {% empty %}
17                 {{ object.file.url }}
18              {% endthumbnail %}" />
19     </a>
20 <br/><a href="{{ object.source_url }}">{{ object.title }}</a> by {{ object.author }},
21     {% if object.license_url %}<a href="{{ object.license_url }}">{% endif %}
22         {{ object.license_name }}
23     {% if object.license_url %}</a>{% endif %}
24
25 <br/>{% trans "source" %}: {{ object.download_url }}
26 </div>
27
28
29 {% if editable %}
30     <form method="post" enctype="multipart/form-data">
31     {% csrf_token %}
32 {% endif %}
33 <table class='editable'><tbody>
34     {{ form.as_table }}
35     {% if editable %}
36         <tr><td></td><td><button type="submit">{% trans "Change" %}</button></td></tr>
37     {% endif %}
38 </tbody></table>
39 {% if editable %}</form>{% endif %}
40
41
42 <h2>{% trans "Used in:" %}</h2>
43 {% if object.book_set %}
44 <ul>
45     {% for book in object.book_set.all %}
46         <li><a href="{{ book.get_absolute_url }}">{{ book }}</a></li>
47     {% endfor %}
48 </ul>
49 {% else %}
50     <p>{% trans "None" %}</p>
51 {% endif %}
52
53
54 <textarea style="width:100%" rows="5">
55 &lt;dc:relation.coverImage.url xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.file.url|build_absolute_uri:request }}&lt;/dc:relation.coverImage.url>
56 &lt;dc:relation.coverImage.attribution xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.author }}, {{ object.license_name }}&lt;/dc:relation.coverImage.attribution>
57 &lt;dc:relation.coverImage.source xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.get_full_url }}&lt;/dc:relation.coverImage.source>
58 </textarea>
59 {% endblock %}