Show error if no external storage configured

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-02-22 18:14:19 +01:00
parent 3c30f29179
commit 887241b355
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
2 changed files with 7 additions and 0 deletions

View File

@ -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();
}

View File

@ -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'].''); ?>