Skip to content
Snippets Groups Projects
Commit f7a14699 authored by Ron Lucke's avatar Ron Lucke Committed by Jan-Hendrik Willms
Browse files

fix #1978

Closes #1978

Merge request studip/studip!1285
parent 26563b88
No related branches found
No related tags found
No related merge requests found
Pipeline #8732 passed
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div v-if="hasFile" class="cw-pdf-header cw-block-title"> <div v-if="hasFile" class="cw-pdf-header cw-block-title">
<button class="cw-pdf-button-prev" :class="{ inactive: pageNum - 1 === 0 }" @click="prevPage" /> <button class="cw-pdf-button-prev" :class="{ inactive: pageNum - 1 === 0 }" @click="prevPage" />
<span class="cw-pdf-title">{{ currentTitle }}</span> <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> <span>
<translate :translate-params="{pageNum, pageCount}"> <translate :translate-params="{pageNum, pageCount}">
(Seite %{ pageNum } von %{ pageCount }) (Seite %{ pageNum } von %{ pageCount })
...@@ -114,8 +114,11 @@ export default { ...@@ -114,8 +114,11 @@ export default {
title() { title() {
return this.block?.attributes?.payload?.title; return this.block?.attributes?.payload?.title;
}, },
fileDownloadable() {
return this.currentDownloadable === 'true';
},
downloadable() { downloadable() {
return this.block?.attributes?.payload?.downloadable === 'true'; return this.block?.attributes?.payload?.downloadable ?? 'true';
}, },
fileId() { fileId() {
return this.block?.attributes?.payload?.file_id; return this.block?.attributes?.payload?.file_id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment