Cover cropping.
[redakcja.git] / src / cover / templates / cover / image_detail.html
1 {% extends "documents/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.use_file.url }}"><img style="max-width: 565px; max-height: 833px"
14         src="{{ object.use_file.url }}?{{ object.cut_top }}.{{ object.cut_bottom }}.{{ object.cut_left }}.{{ object.cut_right }}" />
15     </a>
16 <br/><a href="{{ object.source_url }}">{{ object.title }}</a> by {{ object.author }},
17     {% if object.license_url %}<a href="{{ object.license_url }}">{% endif %}
18         {{ object.license_name }}
19     {% if object.license_url %}</a>{% endif %}
20
21 <br/>{% trans "source" %}: {{ object.download_url }}
22 </div>
23
24
25 {% if editable %}
26     <form method="post" enctype="multipart/form-data">
27     {% csrf_token %}
28 {% endif %}
29 <table class='editable'><tbody>
30     {{ form.as_table }}
31     {% if editable %}
32         <tr><td></td><td><button type="submit">{% trans "Change" %}</button></td></tr>
33     {% endif %}
34 </tbody></table>
35 {% if editable %}</form>{% endif %}
36
37
38 <h2>{% trans "Used in:" %}</h2>
39 {% if object.book_set %}
40 <ul>
41     {% for book in object.book_set.all %}
42         <li><a href="{{ book.get_absolute_url }}">{{ book }}</a></li>
43     {% endfor %}
44 </ul>
45 {% else %}
46     <p>{% trans "None" %}</p>
47 {% endif %}
48
49
50 <textarea style="width:100%" rows="5">
51 &lt;dc:relation.coverImage.url xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.use_file.url|build_absolute_uri:request }}&lt;/dc:relation.coverImage.url>
52 &lt;dc:relation.coverImage.attribution xmlns:dc="http://purl.org/dc/elements/1.1/">{% if object.title %}{{ object.title }}, {% endif %}{% if object.author %}{{ object.author }}, {% endif %}{{ object.license_name }}&lt;/dc:relation.coverImage.attribution>
53 &lt;dc:relation.coverImage.source xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.get_full_url }}&lt;/dc:relation.coverImage.source>
54 </textarea>
55 {% endblock %}