change "Download" to "Download all files" for shared folders
fixes #12378 Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
This commit is contained in:
parent
cc96b93f95
commit
1f237c7e25
1 changed files with 15 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue