[Pkg-owncloud-commits] [owncloud] 21/70: disable download button if zip download is disabled
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 17:40:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v6.0.5RC1
in repository owncloud.
commit fca5af206f49789a22e5c6ec68942a9e3574070d
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Fri May 2 15:51:41 2014 +0200
disable download button if zip download is disabled
Backport of 6e75b37
---
apps/files_sharing/public.php | 2 ++
apps/files_sharing/templates/public.php | 2 ++
2 files changed, 4 insertions(+)
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 23e147e..e98c950 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -244,9 +244,11 @@ if (isset($path)) {
$allowZip = OCP\Config::getSystemValue('allowZipDownload', true)
&& ( $maxInputFileSize === 0 || $totalSize <= $maxInputFileSize);
$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
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index e6c5f40..0eb4301 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -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">
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list