Add a warning on the apps list when the version is missing

This commit is contained in:
Joas Schilling 2016-01-07 14:55:23 +01:00
parent 336fe868b2
commit 83855c073b
2 changed files with 15 additions and 0 deletions

View File

@ -296,6 +296,9 @@ class AppSettingsController extends Controller {
$app['canInstall'] = empty($missing); $app['canInstall'] = empty($missing);
$app['missingDependencies'] = $missing; $app['missingDependencies'] = $missing;
$app['missingMinOwnCloudVersion'] = !isset($app['dependencies']['owncloud']['@attributes']['min-version']);
$app['missingMaxOwnCloudVersion'] = !isset($app['dependencies']['owncloud']['@attributes']['max-version']);
return $app; return $app;
}, $apps); }, $apps);

View File

@ -97,6 +97,18 @@ script(
<div class="app-description-toggle-show"><?php p($l->t("Show description …"));?></div> <div class="app-description-toggle-show"><?php p($l->t("Show description …"));?></div>
<div class="app-description-toggle-hide hidden"><?php p($l->t("Hide description …"));?></div> <div class="app-description-toggle-hide hidden"><?php p($l->t("Hide description …"));?></div>
{{#if missingMinOwnCloudVersion}}
<div class="app-dependencies">
<p><?php p($l->t('This app has no minimum ownCloud version assigned. This will be an error in ownCloud 11 and later.')); ?></p>
</div>
{{else}}
{{#if missingMaxOwnCloudVersion}}
<div class="app-dependencies">
<p><?php p($l->t('This app has no maximum ownCloud version assigned. This will be an error in ownCloud 11 and later.')); ?></p>
</div>
{{/if}}
{{/if}}
{{#unless canInstall}} {{#unless canInstall}}
<div class="app-dependencies"> <div class="app-dependencies">
<p><?php p($l->t('This app cannot be installed because the following dependencies are not fulfilled:')); ?></p> <p><?php p($l->t('This app cannot be installed because the following dependencies are not fulfilled:')); ?></p>