source documents editable-file ok

This commit is contained in:
2024-04-03 16:21:09 +02:00
parent 34a0ec18e0
commit 24b41ed00d
6 changed files with 265 additions and 18 deletions

View File

@@ -11,6 +11,7 @@ import ImageEditable from '@components/editable/ImageEditable.vue';
import VideoEditable from '@components/editable/VideoEditable.vue';
import AudioEditable from '@components/editable/AudioEditable.vue';
import LinkEditable from '@components/editable/LinkEditable.vue';
import FileEditable from '@components/editable/FileEditable.vue';
export default {
props: ['concernement', 'entite', "eid", 'source'],
@@ -45,7 +46,8 @@ export default {
ImageEditable,
VideoEditable,
AudioEditable,
LinkEditable
LinkEditable,
FileEditable
}
}
</script>
@@ -141,20 +143,34 @@ export default {
field_name: 'field_liens'
}
}"
label="Liens"
v-on:updated="reloadEntite "/>
</section>
<section
v-if="source.documents.length"
class="documents multiple">
<a
<!-- v-if="source.documents.length" -->
<section class="documents multiple">
<!-- <a
v-for="(doc,d) in source.documents"
:key="d"
:href="doc.file.url">
<template v-if="doc.description">{{ doc.description }}</template>
<template v-else>{{ doc.file.url }}</template>
</a>
</a> -->
<FileEditable
:can_update="entite.can_update"
:files="source.documents"
:data="{
entitytype: 'paragraph',
bundle: 'source',
id: this.source.id,
uuid: this.source.uuid,
field: {
field_name: 'field_documents'
}
}"
label="Documents"
v-on:updated="reloadEntite "/>
</section>
</section>