|
|
|
@ -50,6 +50,7 @@ angular.module('openproject.workPackages.controllers') |
|
|
|
|
|
|
|
|
|
.controller('WorkPackageDetailsController', [ |
|
|
|
|
'$scope', |
|
|
|
|
'$location', |
|
|
|
|
'latestTab', |
|
|
|
|
'workPackage', |
|
|
|
|
'I18n', |
|
|
|
@ -63,7 +64,7 @@ angular.module('openproject.workPackages.controllers') |
|
|
|
|
'CommonRelationsHandler', |
|
|
|
|
'ChildrenRelationsHandler', |
|
|
|
|
'ParentRelationsHandler', |
|
|
|
|
function($scope, latestTab, workPackage, I18n, RELATION_TYPES, RELATION_IDENTIFIERS, $q, WorkPackagesHelper, PathHelper, UsersHelper, ConfigurationService, CommonRelationsHandler, ChildrenRelationsHandler, ParentRelationsHandler) { |
|
|
|
|
function($scope, $location, latestTab, workPackage, I18n, RELATION_TYPES, RELATION_IDENTIFIERS, $q, WorkPackagesHelper, PathHelper, UsersHelper, ConfigurationService, CommonRelationsHandler, ChildrenRelationsHandler, ParentRelationsHandler) { |
|
|
|
|
$scope.$on('$stateChangeSuccess', function(event, toState){ |
|
|
|
|
latestTab.registerState(toState.name); |
|
|
|
|
}); |
|
|
|
@ -178,5 +179,16 @@ angular.module('openproject.workPackages.controllers') |
|
|
|
|
hideFullDescription: true, |
|
|
|
|
hideAllAttributes: true |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
function getFocusAnchorLabel(path, workPackage) { |
|
|
|
|
var splitPath = path.split('/'); |
|
|
|
|
var tab = splitPath[splitPath.length - 1]; |
|
|
|
|
var tabLabel = I18n.t('js.work_packages.tabs.' + tab); |
|
|
|
|
var params = { tab: tabLabel, type: workPackage.props.type, subject: workPackage.props.subject }; |
|
|
|
|
|
|
|
|
|
return I18n.t('js.label_work_package_details_you_are_here', params); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$scope.focusAnchorLabel = getFocusAnchorLabel($location.path(), $scope.workPackage); |
|
|
|
|
} |
|
|
|
|
]); |
|
|
|
|