Cover images niceties.
[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 style="width:400px"
12         src="{% thumbnail object.file "400x" 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 }}</a>
21     {% if object.license_url %}</a>{% endif %}
22
23 <br/>{% trans "source" %}: {{ object.download_url }}
24 </div>
25
26
27 {% if editable %}<form method="post">{% csrf_token %}{% endif %}
28 <table class='editable'><tbody>
29     {{ form.as_table }}
30     {% if editable %}
31         <tr><td></td><td><button type="submit">{% trans "Change" %}</button></td></tr>
32     {% endif %}
33 </tbody></table>
34 {% if editable %}</form>{% endif %}
35
36
37 <textarea style="width:100%" rows="5">
38 &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>
39 &lt;dc:relation.coverImage.attribution xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.author }}, {{ object.license_name }}&lt;/dc:relation.coverImage.attribution>
40 &lt;dc:relation.coverImage.source xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.get_absolute_url|build_absolute_uri:request }}&lt;/dc:relation.coverImage.source>
41 </textarea>
42 {% endblock %}