--- a/src/egonomy/templates/egonomy_view_fragment.html Mon Feb 04 15:25:30 2013 +0100
+++ b/src/egonomy/templates/egonomy_view_fragment.html Tue Feb 05 11:56:59 2013 +0100
@@ -10,13 +10,15 @@
<div class="column column-half">
<h2>{{ fragment.title }}</h2>
<div class="image-and-fragment">
- {% thumbnail fragment.image.image "476" format="PNG" crop="center" as im %}
+ {% with fragment.image.info.image_file as image %}
+ {% thumbnail image "476" format="PNG" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% empty %}
<img src="{% static 'egonomy/img/empty.gif' %}" width="476" height="476" class="placeholder" />
{% endthumbnail %}
+ {% endwith %}
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 1 1" preserveAspectRatio="none">
- <path d="{{ fragment.path }}" stroke="red" stroke-width=".002" fill="red" fill-opacity=".3" />
+ <path d="{{ fragment.coordinates }}" stroke="red" stroke-width=".002" fill="red" fill-opacity=".3" />
</svg>
</div>
</div>
@@ -25,7 +27,7 @@
<table class="image-metadata">
<tr>
<th>{% trans "Source picture" %} :</th>
- <td><a href="{% url 'annotate_picture' %}">{{ fragment.image.title }}</a></td>
+ <td><a href="{% url 'annotate_picture' image_id=fragment.image.id %}">{{ fragment.image.metadata.titre }}</a></td>
</tr>
<tr>
<th>{% trans "Fragment's description" %} :</th>
@@ -33,7 +35,7 @@
</tr>
<tr>
<th>{% trans "Users keywords" %}</th>
- <td><textarea class="user-keywords">{{ fragment.users_keywords }}</textarea></td>
+ <td><textarea class="user-keywords">{{ fragment.tags }}</textarea></td>
</tr>
<tr>
<th> </th>
@@ -53,7 +55,7 @@
<ul class="fullwidth">
{% for frg in fragment_list %}
<li class="subcol subcol-eighth">
- <a href="{% url 'view_fragment' %}">
+ <a href="{% url 'view_fragment' fragment_pk='1' %}">
<div class="center-image">
<div class="image-and-fragment">
{% if frg.image.image %}