aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Fuhse <fuhse@data-quest.de>2022-04-07 08:18:43 +0000
committerRasmus Fuhse <fuhse@data-quest.de>2022-04-07 08:18:43 +0000
commit847a2783837c20533fcb8c35023408a9bc877276 (patch)
tree381e127ffbed3dc62c0d335e85696dbadb18b7e5
parentaf9ea7f07dba0cae3602de18a5c6f8c2694451c8 (diff)
Resolve "OER Campus: Nicht-herunterladbare Inhalte können nicht gelöscht werden"
-rwxr-xr-xapp/views/oer/market/details.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/views/oer/market/details.php b/app/views/oer/market/details.php
index b47ed0d..2c84011 100755
--- a/app/views/oer/market/details.php
+++ b/app/views/oer/market/details.php
@@ -40,13 +40,15 @@
</ol>
<? endif ?>
-<? if ($url && $material['filename']) : ?>
+<? if (($url && $material['filename'] || (!$material['host_id'] && ($material->isMine() || $GLOBALS['perm']->have_perm("root"))))) : ?>
<div class="center bordered" style="margin-top: 20px; margin-bottom: 20px;">
- <a class="button"
- href="<?= htmlReady($url) ?>" title="<?= _('Herunterladen') ?>"
- download="<?= htmlReady($material['filename']) ?>">
- <div class="filename"><?= _('Herunterladen') ?></div>
- </a>
+ <? if ($url && $material['filename']) : ?>
+ <a class="button"
+ href="<?= htmlReady($url) ?>" title="<?= _('Herunterladen') ?>"
+ download="<?= htmlReady($material['filename']) ?>">
+ <div class="filename"><?= _('Herunterladen') ?></div>
+ </a>
+ <? endif ?>
<? if ($GLOBALS['perm']->have_perm("autor")) : ?>
<a class="button"