adapt TextCard to display Textprod objects

This commit is contained in:
axolotle
2021-03-09 17:30:28 +01:00
parent b195ea4b58
commit 1efcfda37d
4 changed files with 38 additions and 22 deletions
+17 -5
View File
@@ -4,9 +4,14 @@
<div v-if="text" class="container-fill">
<b-card-header header-tag="header">
<h4>
<span>{{ text.authors | list }},</span>
<span>{{ text.title }},</span>
<span>{{ text.edition }}</span>
<template v-if="text.type === 'Textref'">
<span>{{ text.authors | list }},</span>
<span>{{ text.title }},</span>
<span>{{ text.edition }}</span>
</template>
<template v-else>
{{ text.title }}
</template>
</h4>
<b-nav class="ml-auto flex-nowrap">
@@ -20,7 +25,7 @@
</b-nav>
</b-card-header>
<b-card-body v-html="text.content" />
<b-card-body v-html="text.content" class="overflow-auto" />
<b-card-footer>
<b-badge
@@ -36,7 +41,10 @@
>
Textes rebonds
</b-button>
<b-popover :target="'bounces-' + text.id" triggers="click" placement="top">
<b-popover
v-if="text.bounces"
:target="'bounces-' + text.id" triggers="click" placement="top"
>
<div v-for="bounce in text.bounces" :key="bounce.id">
<h6>
<span>{{ bounce.authors | list }},</span>
@@ -82,6 +90,10 @@ export default {
</script>
<style lang="scss" scoped>
article {
height: 100%;
// max-height: 100%;
}
header {
display: flex;