Display item metadata below image.
authorAlexandre Segura <mex.zktk@gmail.com>
Wed, 01 Mar 2017 15:29:21 +0100
changeset 407 74e0a5ea614a
parent 406 733be8cac793
child 408 159042869b47
Display item metadata below image.
src/iconolab/templates/iconolab/detail_image.html
src/iconolab/views/objects.py
src_js/iconolab-bundle/src/components/editor/Canvas.vue
--- a/src/iconolab/templates/iconolab/detail_image.html	Wed Mar 01 15:04:31 2017 +0100
+++ b/src/iconolab/templates/iconolab/detail_image.html	Wed Mar 01 15:29:21 2017 +0100
@@ -44,6 +44,27 @@
       thumbnail="{% thumbnail image.media '100x100' crop=False as thumb %}{{ thumb.url }}{% endthumbnail %}"
       v-bind:is-authenticated="isAuthenticated"></image-annotator>
 
+    <div>
+      <dl class="dl-horizontal">
+        {% if item.metadatas.designation %}<dt>Désignation</dt><dd>{{item.metadatas.designation}}</dd>{% endif %}
+        {% if item.metadatas.authors %}<dt>Auteur(s)</dt><dd>{{item.metadatas.designation}}</dd>{% endif %}
+        {% if item.metadatas.field %}<dt>Domaine</dt><dd>{{item.metadatas.field}}</dd>{% endif %}
+        {% if item.metadatas.conservation_location %}<dt>Conservé à</dt><dd>{{item.metadatas.conservation_location}}</dd>{% endif %}
+        {% if item.metadatas.datation %}<dt>Datation</dt><dd>{{item.metadatas.datation}}</dd>{% endif %}
+        {% if item.metadatas.technics %}<dt>Techniques</dt><dd>{{item.metadatas.technics}}</dd>{% endif %}
+        {% if item.metadatas.measurements %}<dt>Mesures : {{item.metadatas.measurements}}</h5>{% endif %}
+        {% if item.metadatas.create_or_usage_location %}<dt>Lieu de création/utilisation</dt><dd>{{item.metadatas.create_or_usage_location}}</dd>{% endif %}
+        {% if item.metadatas.discovery_context %}<dt>Contexte de découverte</dt><dd>{{item.metadatas.discovery_context}}</dd>{% endif %}
+        {% if item.metadatas.photo_credits %}<dt>Crédits photographiques</dt><dd>{{item.metadatas.photo_credits}}</dd>{% endif %}
+        {% if item.metadatas.inventory_number %}<dt>Numéro d'inventaire</dt><dd>{{item.metadatas.inventory_number}}</dd>{% endif %}
+      </dl>
+      {% if item.metadatas.joconde_ref %}
+      <a href="{{item.metadatas.get_joconde_url}}" target="_blank">
+      Cet objet dans Joconde, catalogue collectif des collections des musées de France
+      </a>
+      {% endif %}
+    </div>
+
     <form id="form-annotation" action="{% url 'annotation_create' collection_name image.image_guid %}" method="POST">
       {% csrf_token %}
       <input type="hidden" name="{{ form.title.name }}">
@@ -71,8 +92,8 @@
       </div>
     </div>
   </div>
+</div>
 
-</div>
 {% endblock %}
 
 {% block footer_js %}
--- a/src/iconolab/views/objects.py	Wed Mar 01 15:04:31 2017 +0100
+++ b/src/iconolab/views/objects.py	Wed Mar 01 15:29:21 2017 +0100
@@ -389,6 +389,7 @@
         context['image_guid'] = self.kwargs.get('image_guid', '')
         context['collection'] = collection
         context['image'] = image
+        context['item'] = image.item
         context['form'] = AnnotationRevisionForm()
         return render(request, 'iconolab/detail_image.html', context)
 
--- a/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Wed Mar 01 15:04:31 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Wed Mar 01 15:29:21 2017 +0100
@@ -1,5 +1,5 @@
 <template>
-    <div class="zoom">
+    <div class="wrapper">
         <div>
             <svg ref="svg"
                 class="cut-canvas"
@@ -22,9 +22,6 @@
                     v-bind:readonly="readonly"></shape-free>
             </svg>
         </div>
-        <div class="zoomer">
-
-        </div>
         <div class="controls">
             <div class="controls-left">
                 <button @click="setMode('rect')" type="button" class="btn"
@@ -517,13 +514,9 @@
 </script>
 
 <style scoped>
-.zoom {
+.wrapper {
     position: relative;
-}
-.zoomer {
-    position: absolute;
-    bottom: 15px;
-    right: 15px;
+    margin-bottom: 30px;
 }
 .cut-canvas {
     width: 100%;