Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/components/documents/ResourceFileLink.vue

35 lines
680 B

<template>
<a
data-fancybox="gallery"
:href="resource.contentUrl"
:data-type="getDataType"
>
<ResourceFileIcon :file="resource.resourceNode.resourceFile" />
{{ resource.title }}
</a>
</template>
<script>
import ResourceFileIcon from './ResourceFileIcon.vue';
export default {
name: 'ResourceFileLink',
components: {
ResourceFileIcon
},
computed: {
getDataType() {
if (this.resource.resourceNode.resourceFile.image) {
return 'image';
}
if (this.resource.resourceNode.resourceFile.video) {
return 'video';
}
return 'iframe';
}
},
props: {
resource: Object
},
};
</script>