disable download button if zip download is disabled
This commit is contained in:
parent
899c7c0443
commit
6e75b37d04
|
@ -165,12 +165,13 @@ if (isset($path)) {
|
||||||
$folder->assign('disableSharing', true);
|
$folder->assign('disableSharing', true);
|
||||||
$folder->assign('trash', false);
|
$folder->assign('trash', false);
|
||||||
$tmpl->assign('folder', $folder->fetchPage());
|
$tmpl->assign('folder', $folder->fetchPage());
|
||||||
$maxInputFileSize = OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB'));
|
|
||||||
$allowZip = OCP\Config::getSystemValue('allowZipDownload', true);
|
$allowZip = OCP\Config::getSystemValue('allowZipDownload', true);
|
||||||
$tmpl->assign('allowZipDownload', intval($allowZip));
|
$tmpl->assign('allowZipDownload', intval($allowZip));
|
||||||
|
$tmpl->assign('showDownloadButton', intval($allowZip));
|
||||||
$tmpl->assign('downloadURL',
|
$tmpl->assign('downloadURL',
|
||||||
OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath));
|
OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath));
|
||||||
} else {
|
} else {
|
||||||
|
$tmpl->assign('showDownloadButton', true);
|
||||||
$tmpl->assign('dir', $dir);
|
$tmpl->assign('dir', $dir);
|
||||||
|
|
||||||
// Show file preview if viewer is available
|
// Show file preview if viewer is available
|
||||||
|
|
|
@ -15,10 +15,12 @@
|
||||||
src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
|
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 id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
|
<?php if ($_['showDownloadButton']): ?>
|
||||||
<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
|
<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
|
||||||
<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
|
<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
|
||||||
<?php p($l->t('Download'))?>
|
<?php p($l->t('Download'))?>
|
||||||
</a>
|
</a>
|
||||||
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
</div></header>
|
</div></header>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
Loading…
Reference in New Issue