summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-11-13 17:21:09 +0100
committerGitHub <noreply@github.com>2018-11-13 17:21:09 +0100
commit79681ef3d9910915c09d3424d2f23eb200a32b6a (patch)
tree5eec0d1c023302f92b430c9f6c24755d36a8ce13 /apps
parent3c5e43898e2b8d4626b94b6e17f321cadfc08400 (diff)
parent1f237c7e25714a784be8c3b232fe17504eea6abb (diff)
downloadnextcloud-server-79681ef3d9910915c09d3424d2f23eb200a32b6a.tar.gz
nextcloud-server-79681ef3d9910915c09d3424d2f23eb200a32b6a.zip
Merge pull request #12398 from nextcloud/fix/12378
change "Download" to "Download all files" for shared folders
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index 29ed242a975..00c6a7a4985 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -455,12 +455,21 @@ class ShareController extends AuthPublicShareController {
if ($isNoneFileDropFolder && !$share->getHideDownload()) {
\OCP\Util::addScript('files_sharing', 'public_note');
- $response->setHeaderActions([
- new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download-white', $shareTmpl['downloadURL'], 0),
- new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']),
- new LinkMenuAction($this->l10n->t('Direct link'), 'icon-public', $shareTmpl['previewURL']),
- new ExternalShareMenuAction($this->l10n->t('Add to your Nextcloud'), 'icon-external', $shareTmpl['owner'], $shareTmpl['displayName'], $shareTmpl['filename']),
- ]);
+ if ($shareIsFolder) {
+ $response->setHeaderActions([
+ new SimpleMenuAction('download', $this->l10n->t('Download all files'), 'icon-download-white', $shareTmpl['downloadURL'], 0),
+ new SimpleMenuAction('download', $this->l10n->t('Download all files'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']),
+ new LinkMenuAction($this->l10n->t('Direct link'), 'icon-public', $shareTmpl['previewURL']),
+ new ExternalShareMenuAction($this->l10n->t('Add to your Nextcloud'), 'icon-external', $shareTmpl['owner'], $shareTmpl['displayName'], $shareTmpl['filename']),
+ ]);
+ } else {
+ $response->setHeaderActions([
+ new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download-white', $shareTmpl['downloadURL'], 0),
+ new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']),
+ new LinkMenuAction($this->l10n->t('Direct link'), 'icon-public', $shareTmpl['previewURL']),
+ new ExternalShareMenuAction($this->l10n->t('Add to your Nextcloud'), 'icon-external', $shareTmpl['owner'], $shareTmpl['displayName'], $shareTmpl['filename']),
+ ]);
+ }
}
$response->setContentSecurityPolicy($csp);