From 644770c950c73bf23b818a9e7ba71d3a739aad0b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 9 Aug 2016 14:19:15 +0200 Subject: [PATCH] hide files external in personal settings if it's empty --- apps/files_external/js/settings.js | 5 +++++ apps/files_external/templates/settings.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index fc6edefc64..da3e2397b7 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -945,6 +945,11 @@ MountConfigListView.prototype = _.extend({ $tr.find('.configuration').text(t('files_external', 'Admin defined')); } }); + var mainForm = $('#files_external'); + if (result.length === 0 && mainForm.attr('data-can-create') === 'false') { + mainForm.hide(); + $('a[href="#external-storage"]').parent().hide(); + } onCompletion.resolve(); } }); diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 47230f98bd..2581259c4c 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -87,7 +87,7 @@ } ?> -
+

t('External Storage')); ?>

'') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> '>