Merge pull request #310 from finnlabs/fix/27764/costs-icon

Fix costs icon registry

[ci skip]
pull/6827/head
Oliver Günther 7 years ago committed by GitHub
commit a0b5641a9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      frontend/app/openproject-costs-app.js

@ -57,24 +57,29 @@ openprojectCostsApp.run(['HookService', function(HookService) {
return null;
});
HookService.register('workPackageDetailsMoreMenu', function(params) {
return [{
HookService.register('workPackageSingleContextMenu', function(params) {
return {
key: 'log_costs',
icon: 'icon-projects',
indexBy: function(actions) {
var index = _.findIndex(actions, { key: 'log_time' });
return index !== -1 ? index + 1 : actions.length;
},
resource: 'workPackage',
link: 'logCosts',
css: ["icon-projects"]
}];
link: 'logCosts'
};
});
HookService.register('workPackageTableContextMenu', function(params) {
return {
key: 'log_costs',
icon: 'icon-projects',
link: 'logCosts',
indexBy: function(actions) {
var index = _.findIndex(actions, { link: 'logTime' });
return index !== -1 ? index + 1 : actions.length;
},
text: I18n.t('js.button_log_costs'),
icon: 'projects'
};
});
}]);

Loading…
Cancel
Save