|
|
|
@ -1,35 +1,33 @@ |
|
|
|
|
<template> |
|
|
|
|
<div |
|
|
|
|
class="" |
|
|
|
|
<div class="course-tool"> |
|
|
|
|
<a |
|
|
|
|
:href="goToCourseTool(course, tool)" |
|
|
|
|
class="course-tool__link" |
|
|
|
|
:aria-labelledby="`course-tool-${tool.ctool.iid}`" |
|
|
|
|
> |
|
|
|
|
<div class="flex flex-col flex-center"> |
|
|
|
|
<div class="p-9 rounded-xl shadow-lg"> |
|
|
|
|
<a :href="goToCourseTool(course, tool)" class=""> |
|
|
|
|
<v-icon |
|
|
|
|
:icon="tool.tool.icon" |
|
|
|
|
size="48px" |
|
|
|
|
class="font-extrabold text-transparent bg-clip-text bg-gradient-to-br from-ch-primary to-ch-primary-light" |
|
|
|
|
<span |
|
|
|
|
:class="tool.tool.icon" |
|
|
|
|
class="course-tool__icon mdi" |
|
|
|
|
aria-hidden="true" |
|
|
|
|
/> |
|
|
|
|
<!-- <img--> |
|
|
|
|
<!-- :alt="tool.tool.name"--> |
|
|
|
|
<!-- :src="'/img/tools/' + tool.tool.name + '.png'"--> |
|
|
|
|
<!-- class="w-24 h-24 object-contain"--> |
|
|
|
|
<!-- />--> |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="flex flex-row gap-2 font-bold text-gray-500 pt-3"> |
|
|
|
|
<a |
|
|
|
|
:id="`course-tool-${tool.ctool.iid}`" |
|
|
|
|
v-t="tool.tool.nameToShow" |
|
|
|
|
:href="goToCourseTool(course, tool)" |
|
|
|
|
> |
|
|
|
|
<!-- {{ tool.ctool.nameToTranslate }} --> |
|
|
|
|
{{ $t(tool.tool.nameToShow) }} |
|
|
|
|
</a> |
|
|
|
|
class="course-tool__title" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<button v-if="isCurrentTeacher && changeVisibility" @click="changeVisibility(course, tool)"> |
|
|
|
|
<div class="course-tool__options"> |
|
|
|
|
<button |
|
|
|
|
v-if="isCurrentTeacher && changeVisibility" |
|
|
|
|
@click="changeVisibility(course, tool)" |
|
|
|
|
> |
|
|
|
|
<v-icon |
|
|
|
|
v-if="tool.ctool.resourceNode.resourceLinks[0].visibility === 2" |
|
|
|
|
icon="mdi-eye" size="lg" |
|
|
|
|
icon="mdi-eye" |
|
|
|
|
size="lg" |
|
|
|
|
/> |
|
|
|
|
<v-icon |
|
|
|
|
v-else |
|
|
|
@ -41,41 +39,45 @@ |
|
|
|
|
<a |
|
|
|
|
v-if="isCurrentTeacher" |
|
|
|
|
:href="goToSettingCourseTool(course, tool)" |
|
|
|
|
> <v-icon |
|
|
|
|
icon="mdi-cog" size="lg" |
|
|
|
|
> |
|
|
|
|
<v-icon |
|
|
|
|
icon="mdi-cog" |
|
|
|
|
size="lg" |
|
|
|
|
/> |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
<script setup> |
|
|
|
|
import { useStore } from 'vuex' |
|
|
|
|
import { computed } from 'vue' |
|
|
|
|
|
|
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
const store = useStore(); |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: 'CourseToolList', |
|
|
|
|
props: { |
|
|
|
|
course: Object, |
|
|
|
|
tool: Object, |
|
|
|
|
// eslint-disable-next-line no-undef |
|
|
|
|
defineProps({ |
|
|
|
|
course: { |
|
|
|
|
type: Object, |
|
|
|
|
required: true, |
|
|
|
|
}, |
|
|
|
|
tool: { |
|
|
|
|
type: Object, |
|
|
|
|
required: true, |
|
|
|
|
}, |
|
|
|
|
goToCourseTool: { |
|
|
|
|
type: Function, |
|
|
|
|
required: true |
|
|
|
|
required: true, |
|
|
|
|
}, |
|
|
|
|
changeVisibility: { |
|
|
|
|
type: Function, |
|
|
|
|
required: false |
|
|
|
|
required: true, |
|
|
|
|
}, |
|
|
|
|
goToSettingCourseTool: { |
|
|
|
|
type: Function, |
|
|
|
|
required: false |
|
|
|
|
}, |
|
|
|
|
required: true, |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters({ |
|
|
|
|
'isCurrentTeacher': 'security/isCurrentTeacher', |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const isCurrentTeacher = computed(() => store.getters['security/isCurrentTeacher']); |
|
|
|
|
</script> |
|
|
|
|