use textref header for textprod with title

This commit is contained in:
Axolotle
2021-11-22 10:35:32 +01:00
parent 56c6c8f2e7
commit cf441ecfab
4 changed files with 14 additions and 4 deletions
+10
View File
@@ -12,6 +12,16 @@ fragment NodeInitial on MapItemInterface {
} }
... on Textprod { ... on Textprod {
preTitle: field_titre_regular
italTitle: field_titre_italique
authors: auteurs {
id
name
first_name
last_name
}
parents: text_de_depart { parents: text_de_depart {
id id
variant: familles { variant: familles {
+2 -2
View File
@@ -7,7 +7,7 @@
<div v-if="!loading" class="node-view-wrapper" :id="`node-${mode}-${node.id}`"> <div v-if="!loading" class="node-view-wrapper" :id="`node-${mode}-${node.id}`">
<component <component
ref="header" ref="header"
:is="'node-view-header-' + nodeType" :is="'node-view-header-' + (nodeType === 'prod' && (node.preTitle || node.italTitle) ? 'ref' : nodeType)"
v-bind="{ node, mode, showOrigin }" v-bind="{ node, mode, showOrigin }"
class="node-view-header" class="node-view-header"
:class="{ scrolling: scrollValue }" :class="{ scrolling: scrollValue }"
@@ -108,7 +108,7 @@ export default {
} }
}, 50) }, 50)
} }
}, }
}, },
mounted () { mounted () {
+1 -1
View File
@@ -47,7 +47,7 @@ export default {
}, },
computed: { computed: {
...mapGetters(['visited']), ...mapGetters(['visited'])
}, },
methods: { methods: {
+1 -1
View File
@@ -41,7 +41,7 @@
active hovered active hovered
@click="onNodeClick(activeNode.data)" @click="onNodeClick(activeNode.data)"
> >
<template v-if="activeNode.data.type === 'prod'"> <template v-if="activeNode.data.type === 'prod' && !(activeNode.data.preTitle || activeNode.data.italTitle)">
{{ $t('variants.' + activeNode.data.variant) }}<br> {{ $t('variants.' + activeNode.data.variant) }}<br>
</template> </template>