GUAC-1053: Only show the list of settings tabs if more than one is available.

This commit is contained in:
Michael Jumper
2015-04-18 01:28:08 -07:00
parent c0eda1273f
commit 620c59efcb
2 changed files with 12 additions and 1 deletions

View File

@@ -46,6 +46,17 @@ angular.module('manage').controller('settingsController', ['$scope', '$injector'
*/
$scope.activeTab = $routeParams.tab;
/**
* Returns whether the list of all available settings tabs should be shown.
*
* @returns {Boolean}
* true if the list of available settings tabs should be shown, false
* otherwise.
*/
$scope.showAvailableTabs = function showAvailableTabs() {
return !!$scope.settingsPages && $scope.settingsPages.length > 1;
};
// Retrieve settings pages
userPageService.getSettingsPages()
.then(function settingsPagesRetrieved(pages) {

View File

@@ -29,7 +29,7 @@ THE SOFTWARE.
<!-- Available tabs -->
<div class="settings-tabs">
<guac-page-list pages="settingsPages"></guac-page-list>
<guac-page-list pages="settingsPages" ng-show="showAvailableTabs()"></guac-page-list>
</div>
<!-- Selected tab -->