src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue
changeset 402 376158f6d760
parent 400 c85505149eea
child 403 0ed5207089ee
--- a/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue	Tue Feb 28 16:49:14 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue	Tue Feb 28 17:00:47 2017 +0100
@@ -17,14 +17,14 @@
             </slot>
             <input type="hidden" name="fragment" v-model="fragment">
             <div v-if="annotation" class="form-group form-group-sm">
-                <label class="small text-muted">Titre</label>
+                <label v-if="!readonly || title" class="small text-muted">Titre</label>
                 <input type="text" class="form-control" name="title" v-model="title" v-if="!readonly">
-                <p v-if="readonly" v-bind:class="{ 'text-muted': !title }">{{ title || 'Pas de titre' }}</p>
+                <p v-if="readonly && title" v-bind:class="{ 'text-muted': !title }">{{ title || 'Pas de titre' }}</p>
             </div>
             <div v-if="annotation" class="form-group form-group-sm">
-                <label class="small text-muted">Description</label>
+                <label v-if="!readonly || description" class="small text-muted">Description</label>
                 <textarea class="form-control" name="description" v-model="description" v-if="!readonly" placeholder="Décrivez ce que vous voyez"></textarea>
-                <p v-if="readonly" v-bind:class="{ 'text-muted': !description }">{{ description || 'Pas de description' }}</p>
+                <p v-if="readonly && description" v-bind:class="{ 'text-muted': !description }">{{ description || 'Pas de description' }}</p>
             </div>
             <div v-if="annotation" class="form-group form-group-sm">
                 <label class="small text-muted">Mots-clés</label>