diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php
index cc69d3130d..6c86cbf2cd 100644
--- a/settings/Controller/AppSettingsController.php
+++ b/settings/Controller/AppSettingsController.php
@@ -259,6 +259,12 @@ class AppSettingsController extends Controller {
$apps = array_filter($apps, function ($app) use ($installedApps) {
return !in_array($app['id'], $installedApps);
});
+
+ // show tooltip if app is downloaded from remote server
+ $inactiveApps = $this->getInactiveApps();
+ foreach ($apps as &$app) {
+ $app['needsDownload'] = !in_array($app['id'], $inactiveApps);
+ }
}
// sort by score
@@ -319,4 +325,23 @@ class AppSettingsController extends Controller {
});
return $apps;
}
+
+ /**
+ * @return array
+ */
+ private function getInactiveApps() {
+ $inactiveApps = \OC_App::listAllApps(true, false, $this->ocsClient);
+ $inactiveApps = array_filter($inactiveApps,
+ function ($app) {
+ return !$app['active'];
+ });
+ $inactiveApps = array_map(function($app) {
+ if (isset($app['ocsid'])) {
+ return $app['ocsid'];
+ }
+ return $app['id'];
+ }, $inactiveApps);
+ return $inactiveApps;
+ }
+
}
diff --git a/settings/js/apps.js b/settings/js/apps.js
index e052a9ee9d..1b68701281 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -119,6 +119,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
$('#apps-list-empty').removeClass('hidden').find('h2').text(t('settings', 'No apps found for your version'));
}
+ $('.enable.needs-download').tipsy({fallback: t('settings', 'The app will be downloaded from the app store')});
+
$('.app-level .official').tipsy({fallback: t('settings', 'Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use.')});
$('.app-level .approved').tipsy({fallback: t('settings', 'Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use.')});
$('.app-level .experimental').tipsy({fallback: t('settings', 'This app is not checked for security issues and is new or known to be unstable. Install at your own risk.')});
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 47d1eff463..ce6dcef842 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -134,7 +134,7 @@ script(
{{else}}
- "/>
+ "/>
{{/if}}
{{#if canUnInstall}}