diff --git a/resources/vue/components/courseware/CoursewareViewWidget.vue b/resources/vue/components/courseware/CoursewareViewWidget.vue index 580fbb9822fe20b7017ae3806a674d91e60ce9cd..cfd97c7fc901c8a83996aba7b7ae3eab261e626e 100755 --- a/resources/vue/components/courseware/CoursewareViewWidget.vue +++ b/resources/vue/components/courseware/CoursewareViewWidget.vue @@ -5,7 +5,10 @@ <translate>Lesen</translate> </a> </li> - <li :class="{ active: editView }"> + <li + v-if="canEdit" + :class="{ active: editView }" + > <a href="#" @click="setEditView"> <translate>Bearbeiten</translate> </a> @@ -40,7 +43,13 @@ export default { }, discussView() { return this.viewMode === 'discuss'; - } + }, + canEdit() { + if (!this.structuralElement) { + return false; + } + return this.structuralElement.attributes['can-edit']; + }, }, methods: { ...mapActions({