add pertimm tags in templates.
--- a/src/egonomy/templates/egonomy_annotate_picture.html Sat Feb 23 01:58:38 2013 +0100
+++ b/src/egonomy/templates/egonomy_annotate_picture.html Mon Feb 25 12:25:48 2013 +0100
@@ -55,6 +55,22 @@
<th>{% trans "RMN keywords" %} :</th>
<td>{{ img.metadata.mots_cles|default:"" }}</td>
</tr>
+ <tr>
+ <th> </th>
+ <td> </td>
+ </tr>
+ <tr>
+ <th>{% trans "Pertimm title" %} :</th>
+ <td>{{ img.metadata.titre_pertimm|default:"" }}</td>
+ </tr>
+ <tr>
+ <th>{% trans "Pertimm description" %} :</th>
+ <td>{{ img.metadata.description_pertimm|default:"" }}</td>
+ </tr>
+ <tr>
+ <th>{% trans "Pertimm thesaurus" %} :</th>
+ <td>{{ img.metadata.thesaurus_pertimm|default:"" }}</td>
+ </tr>
<!--tr>
<th> </th>
<td><input class="user-submit" type="submit" value="{% trans 'Save keywords' %}" /></td>
--- a/src/egonomy/templates/egonomy_create_fragment.html Sat Feb 23 01:58:38 2013 +0100
+++ b/src/egonomy/templates/egonomy_create_fragment.html Mon Feb 25 12:25:48 2013 +0100
@@ -24,6 +24,33 @@
$("#users_keywords").val(s + $("#rmn_tags").html());
});
}
+ if($("#add_pertimm_title")){
+ $("#add_pertimm_title").click(function() {
+ var s = $("#users_keywords").val();
+ if(s!="" && s.substring(s.length - 1)!=",") {
+ s = s + ",";
+ }
+ $("#users_keywords").val(s + $("#pertimm_title_tags").html());
+ });
+ }
+ if($("#add_pertimm_description")){
+ $("#add_pertimm_description").click(function() {
+ var s = $("#users_keywords").val();
+ if(s!="" && s.substring(s.length - 1)!=",") {
+ s = s + ",";
+ }
+ $("#users_keywords").val(s + $("#pertimm_description_tags").html());
+ });
+ }
+ if($("#add_pertimm_thesaurus")){
+ $("#add_pertimm_thesaurus").click(function() {
+ var s = $("#users_keywords").val();
+ if(s!="" && s.substring(s.length - 1)!=",") {
+ s = s + ",";
+ }
+ $("#users_keywords").val(s + $("#pertimm_thesaurus_tags").html());
+ });
+ }
};
</script>
{% endblock %}
@@ -80,9 +107,27 @@
{% if img.metadata.mots_cles %}
<tr>
<th>{% trans 'RMN keywords' %} :</th>
- <td><span id="rmn_tags">{{ img.metadata.mots_cles }}</span><br/><br/><span id="add_rmn_tags" class="right add_tag_btn">+ {% trans 'Add RMN keywords to yours' %}</span></td>
+ <td><span id="rmn_tags">{{ img.metadata.mots_cles }}</span><br/><span id="add_rmn_tags" class="right add_tag_btn">+ {% trans 'Add RMN keywords to yours' %}</span></td>
</tr>
{% endif %}
+ {% if img.metadata.titre_pertimm %}
+ <tr>
+ <th>{% trans "Pertimm title" %} :</th>
+ <td><span id="pertimm_title_tags">{{ img.metadata.titre_pertimm|default:"" }}</span><br/><span id="add_pertimm_title" class="right add_tag_btn">+ {% trans 'Add Pertimm title keywords to yours' %}</span></td>
+ </tr>
+ {% endif %}
+ {% if img.metadata.description_pertimm %}
+ <tr>
+ <th>{% trans "Pertimm description" %} :</th>
+ <td><span id="pertimm_description_tags">{{ img.metadata.description_pertimm|default:"" }}</span><br/><span id="add_pertimm_description" class="right add_tag_btn">+ {% trans 'Add Pertimm description keywords to yours' %}</span></td>
+ </tr>
+ {% endif %}
+ {% if img.metadata.thesaurus_pertimm %}
+ <tr>
+ <th>{% trans "Pertimm thesaurus" %} :</th>
+ <td><span id="pertimm_thesaurus_tags">{{ img.metadata.thesaurus_pertimm|default:"" }}</span><br/><span id="add_pertimm_thesaurus" class="right add_tag_btn">+ {% trans 'Add Pertimm thesaurus keywords to yours' %}</span></td>
+ </tr>
+ {% endif %}
</table>
<div class="fullwidth">
<input class="user-submit" type="submit" value="{% trans 'Save the fragment' %}" />