diff --git a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js index 524b897f2..bf7cf6f51 100644 --- a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js +++ b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js @@ -146,17 +146,6 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto */ $scope.accountPages = []; - /** - * 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 04cd593a6..71a6d93cf 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.
- +
diff --git a/guacamole/src/main/webapp/app/navigation/directives/guacPageList.js b/guacamole/src/main/webapp/app/navigation/directives/guacPageList.js index 04ecf7a77..ef2b05e61 100644 --- a/guacamole/src/main/webapp/app/navigation/directives/guacPageList.js +++ b/guacamole/src/main/webapp/app/navigation/directives/guacPageList.js @@ -223,6 +223,24 @@ angular.module('navigation').directive('guacPageList', [function guacPageList() // Add all page definitions angular.forEach(pages, addPage); + // Filter to only relevant levels + $scope.levels = $scope.levels.filter(function isRelevant(level) { + + // Determine relevancy by counting the number of pages + var pageCount = 0; + for (var name in level) { + + // Level is relevant if it has two or more pages + if (++pageCount === 2) + return true; + + } + + // Otherwise, the level is not relevant + return false; + + }); + }); }] // end controller diff --git a/guacamole/src/main/webapp/app/navigation/templates/guacPageList.html b/guacamole/src/main/webapp/app/navigation/templates/guacPageList.html index c5d131e9e..2f3b8aab8 100644 --- a/guacamole/src/main/webapp/app/navigation/templates/guacPageList.html +++ b/guacamole/src/main/webapp/app/navigation/templates/guacPageList.html @@ -1,4 +1,4 @@ -
+
- +