summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJonas Sulzer <jonas@violoncello.ch>2018-11-10 19:10:31 +0100
committerJonas Sulzer <jonas@violoncello.ch>2018-11-10 19:10:31 +0100
commit1f237c7e25714a784be8c3b232fe17504eea6abb (patch)
tree4ad6e87bbebedfdf12ec39f1231207ad03d8115d /apps
parentcc96b93f95b844393b845b36be52c8399caed917 (diff)
downloadnextcloud-server-1f237c7e25714a784be8c3b232fe17504eea6abb.tar.gz
nextcloud-server-1f237c7e25714a784be8c3b232fe17504eea6abb.zip
change "Download" to "Download all files" for shared folders
fixes #12378 Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
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);