-{% if editable %}
- <form method="post" enctype="multipart/form-data">
- {% csrf_token %}
-{% endif %}
-<table class='editable'><tbody>
- {{ form.as_table }}
- {% if editable %}
- <tr><td></td><td><button type="submit">{% trans "Change" %}</button></td></tr>
- {% endif %}
-</tbody></table>
-{% if editable %}</form>{% endif %}
-
-
-<h2>{% trans "Used in:" %}</h2>
-{% if object.book_set %}
-<ul>
- {% for book in object.book_set.all %}
- <li><a href="{{ book.get_absolute_url }}">{{ book }}</a></li>
- {% endfor %}
-</ul>
-{% else %}
- <p>{% trans "None" %}</p>
-{% endif %}
-
-
-<textarea style="width:100%" rows="5">
+
+ {% if editable %}
+ <form method="post" enctype="multipart/form-data">
+ {% csrf_token %}
+ {% endif %}
+ <table class='editable'><tbody>
+ {% bootstrap_form form %}
+ {% if editable %}
+ {% buttons %}
+ <button type="submit" class="btn btn-primary">{% trans "Change" %}</button>
+ {% endbuttons %}
+ {% endif %}
+ </tbody></table>
+ {% if editable %}</form>{% endif %}
+ </div>
+
+
+ <div class="col-md-7">
+ {% with perc=object.cut_percentages %}
+ <a href="{{ object.use_file.url }}" style="position: relative; display: block; width: {{ perc.width }}px; height: {{ perc.height }}px;">
+ {% thumbnail object.file perc.th as th %}
+ <img src="{{ th.url }}" />
+ {% endthumbnail %}
+ {% localize off %}
+ <div style="background: black; opacity: .5; display: block; position: absolute; top:0; left: 0; right: 0; height: {{ perc.top }}%"></div>
+ <div style="background: black; opacity: .5; display: block; position: absolute; bottom:0; left: 0; right: 0; height: {{ perc.bottom }}%"></div>
+ <div style="background: black; opacity: .5; display: block; position: absolute; top: {{ perc.top }}%; bottom: {{ perc.bottom }}%; left: 0; width: {{ perc.left }}%"></div>
+ <div style="background: black; opacity: .5; display: block; position: absolute; top: {{ perc.top }}%; bottom: {{ perc.bottom }}%; right: 0; width: {{ perc.right }}%"></div>
+ {% endlocalize %}
+ {% endwith %}
+ </a>
+ <br/><a href="{{ object.source_url }}">{{ object.title }}</a> by {{ object.author }},
+ {% if object.license_url %}<a href="{{ object.license_url }}">{% endif %}
+ {{ object.license_name }}
+ {% if object.license_url %}</a>{% endif %}
+
+ {% if object.example %}
+ <div class="mt-4">
+ <img src="{{ object.example.url }}?{{ object.etag }}">
+ </div>
+ {% endif %}
+ </div>
+ </div>
+
+
+ <textarea style="width:100%" rows="6" class="form-control mt-4" disabled>