summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-24 10:27:00 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-24 11:29:28 +0100
commitc3c251713151273562debee405763bb8f99947c8 (patch)
tree68b05ed5ffde4d9fd7c066a875c30c56bb57520b /settings
parent9cb07f126d027ddc0610fe0fcfd43016bc960ddb (diff)
downloadnextcloud-server-c3c251713151273562debee405763bb8f99947c8.tar.gz
nextcloud-server-c3c251713151273562debee405763bb8f99947c8.zip
Display a message when no apps can be found for this oc version
Diffstat (limited to 'settings')
-rw-r--r--settings/js/apps.js15
-rw-r--r--settings/templates/apps.php4
2 files changed, 15 insertions, 4 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index bb52aa3a155..8d8b2ca7398 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -63,7 +63,9 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
$('#apps-list')
.addClass('icon-loading')
+ .removeClass('hidden')
.html('');
+ $('#apps-list-empty').addClass('hidden');
$('#app-category-' + OC.Settings.Apps.State.currentCategory).removeClass('active');
$('#app-category-' + categoryId).addClass('active');
OC.Settings.Apps.State.currentCategory = categoryId;
@@ -73,14 +75,19 @@ OC.Settings.Apps = OC.Settings.Apps || {
}), {
data:{},
type:'GET',
- success:function (apps) {
+ success: function (apps) {
OC.Settings.Apps.State.apps = _.indexBy(apps.apps, 'id');
var source = $("#app-template").html();
var template = Handlebars.compile(source);
- _.each(apps.apps, function(app) {
- OC.Settings.Apps.renderApp(app, template, null);
- });
+ if (apps.apps.length) {
+ _.each(apps.apps, function(app) {
+ OC.Settings.Apps.renderApp(app, template, null);
+ });
+ } else {
+ $('#apps-list').addClass('hidden');
+ $('#apps-list-empty').removeClass('hidden');
+ }
},
complete: function() {
$('#apps-list').removeClass('icon-loading');
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 7465992b3b4..1d059d4f77f 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -96,4 +96,8 @@
</div>
<div id="app-content">
<div id="apps-list" class="icon-loading"></div>
+ <div id="apps-list-empty" class="hidden emptycontent">
+ <div class="icon-search"></div>
+ <h2><?php p($l->t('No apps found for your version')) ?></h2>
+ </div>
</div>