/** * The application header bar. */ angular.module('quay').directive('headerBar', function () { var number = 0; var directiveDefinitionObject = { priority: 0, templateUrl: '/static/directives/header-bar.html', replace: false, transclude: false, restrict: 'C', scope: { }, controller: function($scope, $element, $location, UserService, PlanService, ApiService, NotificationService, Config) { $scope.notificationService = NotificationService; // Monitor any user changes and place the current user into the scope. UserService.updateUserIn($scope); $scope.signout = function() { ApiService.logout().then(function() { UserService.load(); $location.path('/'); }); }; $scope.appLinkTarget = function() { if ($("div[ng-view]").length === 0) { return "_self"; } return ""; }; $scope.getEnterpriseLogo = function() { if (!Config.ENTERPRISE_LOGO_URL) { return '/static/img/quay-logo.png'; } return Config.ENTERPRISE_LOGO_URL; }; } }; return directiveDefinitionObject; });