Skip to content

Commit c37ed98

Browse files
authored
Merge pull request #28643 from nextmcloud/NMC-552
2 parents c3ea18e + bc6b496 commit c37ed98

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

apps/files_sharing/css/public.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ thead {
7171
display: inline-block;
7272
margin-left: auto;
7373
margin-right: auto;
74+
margin-top: 16px;
7475
}
7576

7677
.download-size {

apps/files_sharing/templates/public.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,26 @@
7272
<?php else: ?>
7373
<!-- Preview frame is filled via JS to support SVG images for modern browsers -->
7474
<div id="imgframe"></div>
75+
<?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
76+
<div class="directDownload">
77+
<div>
78+
<?php p($l->t('%s', [$_['filename']]))?> (<?php p($_['fileSize']) ?>)
79+
</div>
80+
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
81+
<span class="icon icon-download"></span>
82+
<?php p($l->t('Download'))?>
83+
</a>
84+
</div>
85+
<?php } ?>
7586
<?php endif; ?>
7687
<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
7788
<div class="directDownload">
89+
<div>
90+
<?php p($l->t('%s', [$_['filename']]))?> (<?php p($_['fileSize']) ?>)
91+
</div>
7892
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
7993
<span class="icon icon-download"></span>
80-
<?php p($l->t('Download %s', [$_['filename']]))?> (<?php p($_['fileSize']) ?>)
94+
<?php p($l->t('Download'))?>
8195
</a>
8296
</div>
8397
<?php endif; ?>

0 commit comments

Comments
 (0)