Only show the headers if we have more than one domain with apps
This commit is contained in:
@@ -521,7 +521,7 @@
|
||||
|
||||
<div class="animateMeOpacity ng-hide" ng-show="installedApps.length > 0">
|
||||
<div ng-repeat="domain in domains" ng-show="domainHasApps(domain)">
|
||||
<h2 style="padding-left: 15px;">{{ domain.domain }}</h2>
|
||||
<h2 style="padding-left: 15px;" ng-show="moreThanOneDomainHasApps()">{{ domain.domain }}</h2>
|
||||
<div class="app-grid">
|
||||
<div class="grid-item" ng-repeat="app in installedApps | filter:{domain:domain.domain} | orderBy:'location'">
|
||||
<a ng-href="{{ app | applicationLink }}" ng-click="((app | installError) === true && showError(app)) || ((app | appIsInstalledAndHealthy) && app.pendingPostInstallConfirmation && appPostInstallConfirm.show(app))" target="_blank" ng-class="{ 'hand': (app | appIsInstalledAndHealthy) }">
|
||||
|
||||
@@ -21,6 +21,12 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
return !!$scope.installedApps.find(function (a) { return a.domain === domain.domain; });
|
||||
};
|
||||
|
||||
$scope.moreThanOneDomainHasApps = function () {
|
||||
return $scope.installedApps.map(function (a) { return a.domain; }).filter(function (item, pos, self) {
|
||||
return self.indexOf(item) === pos;
|
||||
}).length > 1;
|
||||
};
|
||||
|
||||
$scope.appConfigure = {
|
||||
busy: false,
|
||||
error: {},
|
||||
|
||||
Reference in New Issue
Block a user