summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-09-02 08:15:48 +0200
committerGitHub <noreply@github.com>2021-09-02 08:15:48 +0200
commitc37ed98fda7bbca86645344548f30f7f0aac9bdd (patch)
treec6410e968f8b75624797161e87e43a9cb01940f4 /apps
parentc3ea18e11a2432cc1156de47b493187fd1b6511f (diff)
parentbc6b496f4cfee10b00b073cfac03ffc0244fc6d1 (diff)
downloadnextcloud-server-c37ed98fda7bbca86645344548f30f7f0aac9bdd.tar.gz
nextcloud-server-c37ed98fda7bbca86645344548f30f7f0aac9bdd.zip
Merge pull request #28643 from nextmcloud/NMC-552
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/css/public.scss1
-rw-r--r--apps/files_sharing/templates/public.php16
2 files changed, 16 insertions, 1 deletions
diff --git a/apps/files_sharing/css/public.scss b/apps/files_sharing/css/public.scss
index 3b53b1ce2a7..aadf7d41037 100644
--- a/apps/files_sharing/css/public.scss
+++ b/apps/files_sharing/css/public.scss
@@ -71,6 +71,7 @@ thead {
display: inline-block;
margin-left: auto;
margin-right: auto;
+ margin-top: 16px;
}
.download-size {
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index b2d72a3c337..e301b41c319 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -72,12 +72,26 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
<?php else: ?>
<!-- Preview frame is filled via JS to support SVG images for modern browsers -->
<div id="imgframe"></div>
+ <?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
+ <div class="directDownload">
+ <div>
+ <?php p($l->t('%s', [$_['filename']]))?> (<?php p($_['fileSize']) ?>)
+ </div>
+ <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
+ <span class="icon icon-download"></span>
+ <?php p($l->t('Download'))?>
+ </a>
+ </div>
+ <?php } ?>
<?php endif; ?>
<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
<div class="directDownload">
+ <div>
+ <?php p($l->t('%s', [$_['filename']]))?> (<?php p($_['fileSize']) ?>)
+ </div>
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
<span class="icon icon-download"></span>
- <?php p($l->t('Download %s', [$_['filename']]))?> (<?php p($_['fileSize']) ?>)
+ <?php p($l->t('Download'))?>
</a>
</div>
<?php endif; ?>