--- a/src/egonomy/templates/egonomy_create_fragment.html Fri Mar 01 12:05:58 2013 +0100
+++ b/src/egonomy/templates/egonomy_create_fragment.html Mon Mar 04 15:29:30 2013 +0100
@@ -68,7 +68,7 @@
<div class="column column-half">
<a href="#" class="head-button clear-fragment" title="{% trans 'Erase the drawing' %}">×</a>
<a href="#" class="head-button reset-fragment" title="{% trans 'Back to the original drawing' %}">↺</a>
- <h2>{% if frg_to_modify %}{{ frg_to_modify.title }}{% else %}{% trans 'New fragment' %}{% endif %} :</h2>
+ <h2>{% if frg_to_modify %}{{ frg_data.title }}{% else %}{% trans 'New fragment' %}{% endif %} :</h2>
<div class="center-image">
<div class="image-and-fragment">
{% with img.info.image_file as image %}
@@ -89,9 +89,9 @@
<div class="cutout-canvas"></div>
</div>
</div>
- <input name="fragment_path" id="fragment_path" type="hidden" class="fragment-path column-half" value="{% if frg_to_modify %}{{ frg_to_modify.coordinates }}{% endif %}" />
+ <input name="fragment_path" id="fragment_path" type="hidden" class="fragment-path column-half" value="{% if frg_data %}{{ frg_data.coordinates }}{% endif %}" />
<input name="image_id" id="image_id" type="hidden" value="{{ img.id }}" />
- {% if frg_to_modify %}<input name="fragment_pk" id="fragment_pk" type="hidden" value="{{ frg_to_modify.pk }}" />{% endif %}
+ {% if frg_to_modify %}<input name="fragment_pk" id="fragment_pk" type="hidden" value="{{ frg_data.pk }}" />{% endif %}
{% csrf_token %}
</div>
<div class="column column-half">
@@ -102,15 +102,15 @@
</tr>
<tr>
<th>{% trans "Fragment's title" %} :</th>
- <td><input type="text" class="fragment-title" placeholder="{% trans "Fragment's title" %}" name="fragment_title" id="fragment_title" {% if frg_to_modify %}value="{{ frg_to_modify.title }}"{% endif %}/></td>
+ <td><input type="text" class="fragment-title" placeholder="{% trans "Fragment's title" %}" name="fragment_title" id="fragment_title" {% if frg_data %}value="{{ frg_data.title }}"{% endif %}/></td>
</tr>
<tr>
<th>{% trans "Fragment's description" %} :</th>
- <td><textarea class="fragment-description" name="fragment_description" id="fragment_description" {% if frg_to_modify %}value="{{ frg_to_modify.description }}"{% endif %}></textarea></td>
+ <td><textarea class="fragment-description" name="fragment_description" id="fragment_description" {% if frg_data %}value="{{ frg_data.description }}"{% endif %}></textarea></td>
</tr>
<tr>
<th>{% trans 'Users keywords' %} :</th>
- <td><input id="user_keywords" name="user_keywords" class="user-keywords" {% if frg_to_modify %}value="{{ frg_to_modify.tags }}"{% endif %}></ul>
+ <td><input id="user_keywords" name="user_keywords" class="user-keywords" {% if frg_data %}value="{{ frg_data.tags }}"{% endif %}></ul>
</tr>
{% if img.metadata.mots_cles %}
<tr>