disable download button if zip download is disabled

This commit is contained in:
Thomas Müller 2014-05-02 15:51:41 +02:00
parent 899c7c0443
commit 6e75b37d04
2 changed files with 4 additions and 1 deletions

View File

@ -165,12 +165,13 @@ if (isset($path)) {
$folder->assign('disableSharing', true);
$folder->assign('trash', false);
$tmpl->assign('folder', $folder->fetchPage());
$maxInputFileSize = OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB'));
$allowZip = OCP\Config::getSystemValue('allowZipDownload', true);
$tmpl->assign('allowZipDownload', intval($allowZip));
$tmpl->assign('showDownloadButton', intval($allowZip));
$tmpl->assign('downloadURL',
OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath));
} else {
$tmpl->assign('showDownloadButton', true);
$tmpl->assign('dir', $dir);
// Show file preview if viewer is available

View File

@ -15,10 +15,12 @@
src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
<div class="header-right">
<?php if ($_['showDownloadButton']): ?>
<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
<?php p($l->t('Download'))?>
</a>
<?php endif ?>
</div>
</div></header>
<div id="content">