mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1053: Only show the list of settings tabs if more than one is available.
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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 -->
|
||||
|
Reference in New Issue
Block a user