OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/assets/javascripts/angular/helpers/components/path-helper.js

33 lines
960 B

// TODO forward rails routes
angular.module('openproject.helpers')
.service('PathHelper', [function() {
PathHelper = {
projectPath: function(projectIdentifier) {
return '/projects/' + projectIdentifier;
},
workPackagesPath: function() {
return '/work_packages';
},
workPackagePath: function(id) {
return '/work_packages/' + id;
},
projectWorkPackagesPath: function(projectIdentifier) {
return PathHelper.projectPath(projectIdentifier) + PathHelper.workPackagesPath();
},
userPath: function(id) {
return '/users/' + id;
},
workPackagesColumnDataPath: function() {
return PathHelper.workPackagesPath() + '/column_data';
},
workPackagesSumsPath: function(projectIdentifier) {
return PathHelper.projectPath(projectIdentifier) + '/column_sums';
},
versionPath: function(versionId) {
return '/versions/' + versionId;
}
};
return PathHelper;
}]);