summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorBernhard Posselt <Raydiation@users.noreply.github.com>2014-12-15 12:34:46 +0100
committerBernhard Posselt <Raydiation@users.noreply.github.com>2014-12-15 12:34:46 +0100
commitbe45366013c50d9a9d18e258c66e18798719d8df (patch)
treef9e897521e0e93e1f96755ae60752a9ea7c0bcda /settings
parentb831914aa66ab9591dd4593233cc8f67ed6cf8eb (diff)
parente58b9d3eb70996a6ccccabf979125fc0797fbd85 (diff)
downloadnextcloud-server-be45366013c50d9a9d18e258c66e18798719d8df.tar.gz
nextcloud-server-be45366013c50d9a9d18e258c66e18798719d8df.zip
Merge pull request #12625 from owncloud/app-dependencies-libs-and-commands
adding dependencies for command line tools and php libraries
Diffstat (limited to 'settings')
-rw-r--r--settings/controller/appsettingscontroller.php6
-rw-r--r--settings/css/settings.css5
-rw-r--r--settings/templates/apps.php8
3 files changed, 12 insertions, 7 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php
index 3ad52bd2187..b9e60c376de 100644
--- a/settings/controller/appsettingscontroller.php
+++ b/settings/controller/appsettingscontroller.php
@@ -118,7 +118,8 @@ class AppSettingsController extends Controller {
}
// fix groups to be an array
- $apps = array_map(function($app){
+ $dependencyAnalyzer = new DependencyAnalyzer(new Platform($this->config), $this->l10n);
+ $apps = array_map(function($app) use ($dependencyAnalyzer) {
$groups = array();
if (is_string($app['groups'])) {
$groups = json_decode($app['groups']);
@@ -127,8 +128,7 @@ class AppSettingsController extends Controller {
$app['canUnInstall'] = !$app['active'] && $app['removable'];
// analyse dependencies
- $dependencyAnalyzer = new DependencyAnalyzer($app, new Platform($this->config), $this->l10n);
- $missing = $dependencyAnalyzer->analyze();
+ $missing = $dependencyAnalyzer->analyze($app);
$app['canInstall'] = empty($missing);
$app['missingDependencies'] = $missing;
diff --git a/settings/css/settings.css b/settings/css/settings.css
index fa699e50a4b..c951f98f9cf 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -203,6 +203,11 @@ span.version { margin-left:1em; margin-right:1em; color:#555; }
border-bottom: 1px solid #e8e8e8;
}
+.app-dependencies {
+ margin-top: 10px;
+ color: #c33;
+}
+
.missing-dependencies {
list-style: initial;
list-style-type: initial;
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 3bb0d45f582..48fe0f5a9c9 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -52,12 +52,14 @@
</p>
{{/if}}
{{#unless canInstall}}
- <div><?php p($l->t('This app cannot be installed because the following dependencies are not fulfilled:')); ?></div>
+ <div class="app-dependencies">
+ <p><?php p($l->t('This app cannot be installed because the following dependencies are not fulfilled:')); ?></p>
<ul class="missing-dependencies">
{{#each missingDependencies}}
<li>{{this}}</li>
{{/each}}
</ul>
+ </div>
{{/unless}}
{{#if update}}
@@ -70,9 +72,7 @@
<br />
<input type="hidden" id="group_select" title="<?php p($l->t('All')); ?>" style="width: 200px">
{{else}}
- {{#if canInstall}}
- <input class="enable" type="submit" data-appid="{{id}}" data-active="false" value="<?php p($l->t("Enable"));?>"/>
- {{/if}}
+ <input class="enable" type="submit" data-appid="{{id}}" data-active="false" {{#unless canInstall}}disabled="disabled"{{/unless}} value="<?php p($l->t("Enable"));?>"/>
{{/if}}
{{#if canUnInstall}}
<input class="uninstall" type="submit" value="<?php p($l->t('Uninstall App')); ?>" data-appid="{{id}}" />