GUAC-586: Only show available accounts if there are more than one.

This commit is contained in:
Michael Jumper
2015-08-28 17:14:51 -07:00
parent 70485286d6
commit 6f0079d778
2 changed files with 12 additions and 1 deletions

View File

@@ -144,6 +144,17 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
})(authenticationService.getAvailableDataSources());
/**
* Returns whether the list of all available account tabs should be shown.
*
* @returns {Boolean}
* true if the list of available account tabs should be shown, false
* otherwise.
*/
$scope.showAccountTabs = function showAccountTabs() {
return !!$scope.accountPages && $scope.accountPages.length > 1;
};
/**
* Returns whether critical data has completed being loaded.
*

View File

@@ -28,7 +28,7 @@ THE SOFTWARE.
<guac-user-menu></guac-user-menu>
</div>
<div class="settings-tabs">
<guac-page-list pages="accountPages"></guac-page-list>
<guac-page-list pages="accountPages" ng-show="showAccountTabs()"></guac-page-list>
</div>
<div class="section">