From 6f0079d7788ba9df2ae200272c47cac996928bc3 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 28 Aug 2015 17:14:51 -0700 Subject: [PATCH] GUAC-586: Only show available accounts if there are more than one. --- .../app/manage/controllers/manageUserController.js | 11 +++++++++++ .../main/webapp/app/manage/templates/manageUser.html | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js index e493164ab..a31a5c707 100644 --- a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js +++ b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js @@ -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. * diff --git a/guacamole/src/main/webapp/app/manage/templates/manageUser.html b/guacamole/src/main/webapp/app/manage/templates/manageUser.html index 909ea4f3c..b0b84f496 100644 --- a/guacamole/src/main/webapp/app/manage/templates/manageUser.html +++ b/guacamole/src/main/webapp/app/manage/templates/manageUser.html @@ -28,7 +28,7 @@ THE SOFTWARE.
- +