Merge pull request #8561 from nextcloud/ext-strg-warning-fix

[stable13] Ext storage error warning
This commit is contained in:
Roeland Jago Douma 2018-03-01 19:36:55 +01:00 committed by GitHub
commit a2672a2ad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -960,6 +960,7 @@ MountConfigListView.prototype = _.extend({
if (result.length === 0 && mainForm.attr('data-can-create') === 'false') { if (result.length === 0 && mainForm.attr('data-can-create') === 'false') {
mainForm.hide(); mainForm.hide();
$('a[href="#external-storage"]').parent().hide(); $('a[href="#external-storage"]').parent().hide();
$('#emptycontent').show();
} }
onCompletion.resolve(); onCompletion.resolve();
} }

View File

@ -6,8 +6,7 @@
<div id="emptycontent" class="hidden"> <div id="emptycontent" class="hidden">
<div class="icon-external"></div> <div class="icon-external"></div>
<h2><?php p($l->t('No external storage configured')); ?></h2> <h2><?php p($l->t('No external storage configured or you don\'t have the permission to configure them')); ?></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> </div>
<input type="hidden" name="dir" value="" id="dir"> <input type="hidden" name="dir" value="" id="dir">

View File

@ -87,6 +87,11 @@
} }
?> ?>
<div id="emptycontent" class="hidden">
<div class="icon-external"></div>
<h2><?php p($l->t('No external storage configured or you don\'t have the permission to configure them')); ?></h2>
</div>
<form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> <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> <h2 data-anchor-name="external-storage"><?php p($l->t('External storages')); ?></h2>
<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> <?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?>