소스 검색

add image figure for creation nodeviews

axolotle 3 년 전
부모
커밋
41d1869aff
2개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  1. 9 2
      src/components/nodes/NodeViewBody.vue
  2. 2 1
      src/messages/fr.json

+ 9 - 2
src/components/nodes/NodeViewBody.vue

@@ -4,6 +4,12 @@
     :class="['node-view-body-' + mode, 'node-view-body-' + type]"
   >
     <slot name="default">
+      <node-view-figure
+        v-if="mode === 'view' && node.title"
+        @expand-image="image = $event"
+        :node="node"
+      />
+
       <div class="node-view-body-wrapper" v-html="node.content" />
 
       <fullscreen-modal v-if="image" :image="image" :id="'modal-image-' + node.id" />
@@ -40,14 +46,15 @@
 
 <script>
 import { getRelation } from '@/store/utils'
-import { NodeViewTitle } from '@/components/nodes'
+import { NodeViewTitle, NodeViewFigure } from '@/components/nodes'
 
 
 export default {
   name: 'NodeViewBody',
 
   components: {
-    NodeViewTitle
+    NodeViewTitle,
+    NodeViewFigure
   },
 
   props: {

+ 2 - 1
src/messages/fr.json

@@ -45,7 +45,8 @@
   "siblings": "Textes rebonds",
   "text": {
     "read": "Voir le texte",
-    "read-origin": "Voir le texte de départ"
+    "read-origin": "Voir le texte de départ",
+    "read-artwork": "Voir l'œuvre"
   },
   "history": "Historique de consultation",
   "from": "à partir de :"