diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-02-22 18:14:19 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-02-27 12:14:23 +0100 |
commit | 018ff68f45a56fef62b9116f84a89013458dfcec (patch) | |
tree | 16935a7e455c2616ad8a80e60d4355a3335cde8d | |
parent | 282b79c4b1f8b1f5022f0fc842cd10477820fcec (diff) | |
download | nextcloud-server-018ff68f45a56fef62b9116f84a89013458dfcec.tar.gz nextcloud-server-018ff68f45a56fef62b9116f84a89013458dfcec.zip |
Show error if no external storage configured
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | apps/files_external/js/settings.js | 1 | ||||
-rw-r--r-- | apps/files_external/templates/settings.php | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index cb9b7ad6822..12ad285c52b 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -960,6 +960,7 @@ MountConfigListView.prototype = _.extend({ if (result.length === 0 && mainForm.attr('data-can-create') === 'false') { mainForm.hide(); $('a[href="#external-storage"]').parent().hide(); + $('#emptycontent').show(); } onCompletion.resolve(); } diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 237985bfd0f..f596ddf7792 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -87,6 +87,12 @@ } ?> +<div id="emptycontent" class="hidden"> + <div class="icon-external"></div> + <h2><?php p($l->t('No external storage configured')); ?></h2> + <p><a href="<?php p(link_to('', 'index.php/settings/personal#files_external' )); ?>"><?php p($l->t('You can add external storages in the personal settings')); ?></a></p> +</div> + <form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> <h2 data-anchor-name="external-storage"><?php p($l->t('External storages')); ?></h2> <?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> |