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
-4
View File
@@ -29,10 +29,6 @@
<main id="main"> <main id="main">
<router-view /> <router-view />
</main> </main>
<footer>
<p>footer</p>
</footer>
</div> </div>
</template> </template>
+15 -1
View File
@@ -25,7 +25,21 @@ query TextRef ($id: Int!) {
# degres_detrangement: Int # degres_detrangement: Int
notes { notes {
note note
numero number: numero
}
}
... on Textprod {
tags: tagsprod {
id
name
}
notes {
note
number: numero
links: liens {
id
}
} }
} }
} }
+17 -5
View File
@@ -4,9 +4,14 @@
<div v-if="text" class="container-fill"> <div v-if="text" class="container-fill">
<b-card-header header-tag="header"> <b-card-header header-tag="header">
<h4> <h4>
<span>{{ text.authors | list }},</span> <template v-if="text.type === 'Textref'">
<span>{{ text.title }},</span> <span>{{ text.authors | list }},</span>
<span>{{ text.edition }}</span> <span>{{ text.title }},</span>
<span>{{ text.edition }}</span>
</template>
<template v-else>
{{ text.title }}
</template>
</h4> </h4>
<b-nav class="ml-auto flex-nowrap"> <b-nav class="ml-auto flex-nowrap">
@@ -20,7 +25,7 @@
</b-nav> </b-nav>
</b-card-header> </b-card-header>
<b-card-body v-html="text.content" /> <b-card-body v-html="text.content" class="overflow-auto" />
<b-card-footer> <b-card-footer>
<b-badge <b-badge
@@ -36,7 +41,10 @@
> >
Textes rebonds Textes rebonds
</b-button> </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"> <div v-for="bounce in text.bounces" :key="bounce.id">
<h6> <h6>
<span>{{ bounce.authors | list }},</span> <span>{{ bounce.authors | list }},</span>
@@ -82,6 +90,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
article {
height: 100%;
// max-height: 100%;
}
header { header {
display: flex; display: flex;
+6 -12
View File
@@ -1,13 +1,7 @@
<template> <template>
<component-debug :component="this" class="view"> <div class="h-100">
<div class="py-3">
<b-button @click="openText">
add text 50
</b-button>
</div>
<!-- BACKGROUND (mode) --> <!-- BACKGROUND (mode) -->
<component :is="mode" /> <!-- <component :is="mode" /> -->
<!-- FOREGROUND (texts) --> <!-- FOREGROUND (texts) -->
<section v-for="group in groups" :key="group.id" class="split-screen"> <section v-for="group in groups" :key="group.id" class="split-screen">
@@ -16,7 +10,7 @@
<text-card v-for="id in group.prod" :key="id" :id="id" /> <text-card v-for="id in group.prod" :key="id" :id="id" />
</div> </div>
</section> </section>
</component-debug> </div>
</template> </template>
<script> <script>
@@ -28,9 +22,9 @@ export default {
name: 'Library', name: 'Library',
components: { components: {
CardList, // CardList,
CardMap, // CardMap,
TreeMap, // TreeMap,
TextCard TextCard
}, },