diff --git a/resources/vue/components/courseware/CoursewareDocumentBlock.vue b/resources/vue/components/courseware/CoursewareDocumentBlock.vue index 20542b87054786e97b73005db00e023fa6f217e3..00a5136b0602bc2d6ca3e51f99e46fa83d0dbcbe 100644 --- a/resources/vue/components/courseware/CoursewareDocumentBlock.vue +++ b/resources/vue/components/courseware/CoursewareDocumentBlock.vue @@ -13,7 +13,7 @@ <div v-if="hasFile" class="cw-pdf-header cw-block-title"> <button class="cw-pdf-button-prev" :class="{ inactive: pageNum - 1 === 0 }" @click="prevPage" /> <span class="cw-pdf-title">{{ currentTitle }}</span> - <a v-if="downloadable" :href="currentUrl" class="cw-pdf-download" download></a> + <a v-if="fileDownloadable" :href="currentUrl" class="cw-pdf-download" download></a> <span> <translate :translate-params="{pageNum, pageCount}"> (Seite %{ pageNum } von %{ pageCount }) @@ -114,8 +114,11 @@ export default { title() { return this.block?.attributes?.payload?.title; }, + fileDownloadable() { + return this.currentDownloadable === 'true'; + }, downloadable() { - return this.block?.attributes?.payload?.downloadable === 'true'; + return this.block?.attributes?.payload?.downloadable ?? 'true'; }, fileId() { return this.block?.attributes?.payload?.file_id;