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