2016-06-08 06:23:11 +00:00
|
|
|
angular
|
2016-09-04 02:50:37 +00:00
|
|
|
.module('portainer')
|
2017-02-01 09:13:48 +00:00
|
|
|
.directive('rdHeaderContent', ['Authentication', function rdHeaderContent(Authentication) {
|
2016-06-08 06:23:11 +00:00
|
|
|
var directive = {
|
|
|
|
requires: '^rdHeader',
|
|
|
|
transclude: true,
|
2017-02-01 09:13:48 +00:00
|
|
|
link: function (scope, iElement, iAttrs) {
|
2017-03-12 16:24:15 +00:00
|
|
|
scope.username = Authentication.getUserDetails().username;
|
2017-02-01 09:13:48 +00:00
|
|
|
},
|
2017-06-01 08:14:55 +00:00
|
|
|
template: '<div class="breadcrumb-links"><div class="pull-left" ng-transclude></div><div class="pull-right" ng-if="username"><a ui-sref="userSettings" style="margin-right: 5px;"><u><i class="fa fa-wrench" aria-hidden="true"></i> my account </u></a><a ui-sref="auth({logout: true})" class="text-danger" style="margin-right: 25px;"><u><i class="fa fa-sign-out" aria-hidden="true"></i> log out</u></a></div></div>',
|
2016-06-08 06:23:11 +00:00
|
|
|
restrict: 'E'
|
|
|
|
};
|
|
|
|
return directive;
|
2017-02-01 09:13:48 +00:00
|
|
|
}]);
|