equal
deleted
inserted
replaced
8 |
8 |
9 {% block js_import %} |
9 {% block js_import %} |
10 {{block.super}} |
10 {{block.super}} |
11 <script type="text/javascript" src="{% static 'egonomy/lib/raphael-min.js' %}"></script> |
11 <script type="text/javascript" src="{% static 'egonomy/lib/raphael-min.js' %}"></script> |
12 <script type="text/javascript" src="{% static 'egonomy/js/cutout.js' %}"></script> |
12 <script type="text/javascript" src="{% static 'egonomy/js/cutout.js' %}"></script> |
|
13 {% endblock %} |
|
14 {% block js_inline %} |
|
15 {{block.super}} |
|
16 <script type="text/javascript"> |
|
17 window.onload = function() { |
|
18 if($("#add_rmn_tags")){ |
|
19 $("#add_rmn_tags").click(function() { |
|
20 var s = $("#users_keywords").val(); |
|
21 if(s!="" && s.substring(s.length - 1)!=",") { |
|
22 s = s + ","; |
|
23 } |
|
24 $("#users_keywords").val(s + $("#rmn_tags").html()); |
|
25 }); |
|
26 } |
|
27 }; |
|
28 </script> |
13 {% endblock %} |
29 {% endblock %} |
14 |
30 |
15 {% block content %} |
31 {% block content %} |
16 <div class="fullwidth"> |
32 <div class="fullwidth"> |
17 <form action="{% url 'save_fragment' %}" method="POST"> |
33 <form action="{% url 'save_fragment' %}" method="POST"> |
37 {% endif %} |
53 {% endif %} |
38 {% endwith %} |
54 {% endwith %} |
39 <div class="cutout-canvas"></div> |
55 <div class="cutout-canvas"></div> |
40 </div> |
56 </div> |
41 </div> |
57 </div> |
42 <input name="fragment_path" id="fragment_path" type="text" class="fragment-path column-half" value="M0.1 0.5L0.5 0.1L0.9 0.5L0.5 0.9Z" /> |
58 <input name="fragment_path" id="fragment_path" type="hidden" class="fragment-path column-half" value="" /> |
43 <input name="image_id" id="image_id" type="hidden" value="{{ img.id }}" /> |
59 <input name="image_id" id="image_id" type="hidden" value="{{ img.id }}" /> |
44 {% csrf_token %} |
60 {% csrf_token %} |
45 </div> |
61 </div> |
46 <div class="column column-half"> |
62 <div class="column column-half"> |
47 <table class="image-metadata"> |
63 <table class="image-metadata"> |
59 </tr> |
75 </tr> |
60 <tr> |
76 <tr> |
61 <th>{% trans 'Users keywords' %} :</th> |
77 <th>{% trans 'Users keywords' %} :</th> |
62 <td><textarea class="user-keywords" name="users_keywords" id="users_keywords"></textarea></td> |
78 <td><textarea class="user-keywords" name="users_keywords" id="users_keywords"></textarea></td> |
63 </tr> |
79 </tr> |
64 <!--tr> |
80 {% if img.metadata.mots_cles %} |
65 <th>{% trans 'Last modification' %} :</th> |
81 <tr> |
66 <td>le 23 janvier 2013 par Utilisateur17</td> |
82 <th>{% trans 'RMN keywords' %} :</th> |
67 </tr--> |
83 <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> |
|
84 </tr> |
|
85 {% endif %} |
68 </table> |
86 </table> |
69 <div class="fullwidth"> |
87 <div class="fullwidth"> |
70 <input class="user-submit" type="submit" value="{% trans 'Save the fragment' %}" /> |
88 <input class="user-submit" type="submit" value="{% trans 'Save the fragment' %}" /> |
71 </div> |
89 </div> |
72 </div> |
90 </div> |