nicer full url for cover
[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 <h2>{% trans "Used in:" %}</h2>
38 {% if object.book_set %}
39 <ul>
40     {% for book in object.book_set.all %}
41         <li><a href="{{ book.get_absolute_url }}">{{ book }}</a></li>
42     {% endfor %}
43 </ul>
44 {% else %}
45     <p>{% trans "None" %}</p>
46 {% endif %}
47
48
49 <textarea style="width:100%" rows="5">
50 &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>
51 &lt;dc:relation.coverImage.attribution xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.author }}, {{ object.license_name }}&lt;/dc:relation.coverImage.attribution>
52 &lt;dc:relation.coverImage.source xmlns:dc="http://purl.org/dc/elements/1.1/">{{ object.get_full_url }}&lt;/dc:relation.coverImage.source>
53 </textarea>
54 {% endblock %}