2016-06-08 06:23:11 +00:00
|
|
|
angular
|
2016-09-04 02:50:37 +00:00
|
|
|
.module('portainer')
|
2016-12-15 03:33:47 +00:00
|
|
|
.directive('rdHeaderTitle', ['$rootScope', function rdHeaderTitle($rootScope) {
|
2016-06-08 06:23:11 +00:00
|
|
|
var directive = {
|
|
|
|
requires: '^rdHeader',
|
|
|
|
scope: {
|
2016-06-08 07:15:47 +00:00
|
|
|
title: '@'
|
2016-06-08 06:23:11 +00:00
|
|
|
},
|
2016-12-15 03:33:47 +00:00
|
|
|
link: function (scope, iElement, iAttrs) {
|
|
|
|
scope.username = $rootScope.username;
|
|
|
|
},
|
2016-06-08 06:23:11 +00:00
|
|
|
transclude: true,
|
2016-12-15 03:33:47 +00:00
|
|
|
template: '<div class="page white-space-normal">{{title}}<span class="header_title_content" ng-transclude></span><span class="pull-right user-box"><i class="fa fa-user-circle-o" aria-hidden="true"></i> {{username}}</span></div>',
|
2016-06-08 06:23:11 +00:00
|
|
|
restrict: 'E'
|
|
|
|
};
|
|
|
|
return directive;
|
2016-12-15 03:33:47 +00:00
|
|
|
}]);
|