fixes
[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 </div>
21
22
23 {% if editable %}
24     <form method="post" enctype="multipart/form-data">
25     {% csrf_token %}
26 {% endif %}
27 <table class='editable'><tbody>
28     {{ form.as_table }}
29     {% if editable %}
30         <tr><td></td><td><button type="submit">{% trans "Change" %}</button></td></tr>
31     {% endif %}
32 </tbody></table>
33 {% if editable %}</form>{% endif %}
34
35
36 <h2>{% trans "Used in:" %}</h2>
37 {% if object.book_set %}
38 <ul>
39     {% for book in object.book_set.all %}
40         <li><a href="{{ book.get_absolute_url }}">{{ book }}</a></li>
41     {% endfor %}
42 </ul>
43 {% else %}
44     <p>{% trans "None" %}</p>
45 {% endif %}
46
47
48 <textarea style="width:100%" rows="5">
49 &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>
50 &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>
51 &lt;dc:relation.coverImage.source xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.get_full_url }}&lt;/dc:relation.coverImage.source>
52 </textarea>
53 {% endblock %}