Merge pull request #28643 from nextmcloud/NMC-552

This commit is contained in:
John Molakvoæ 2021-09-02 08:15:48 +02:00 committed by GitHub
commit c37ed98fda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -71,6 +71,7 @@ thead {
display: inline-block;
margin-left: auto;
margin-right: auto;
margin-top: 16px;
}
.download-size {

View file

@ -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; ?>