Merge pull request #217 from oliverguenther/feature/editable-budget

Register costObject as an editable field
pull/6827/head
ulferts 9 years ago
commit 3e92dcc6cb
  1. 8
      frontend/app/openproject-costs-app.js
  2. 2
      lib/open_project/costs/patches/query_patch.rb

@ -33,6 +33,14 @@ localeFiles.keys().forEach(function(localeFile) {
I18n.addTranslations(locale, localeFiles(localeFile)[locale]); I18n.addTranslations(locale, localeFiles(localeFile)[locale]);
}); });
// Register Budget as select inline edit
angular
.module('openproject')
.run(['wpEditField', function(wpEditField) {
wpEditField.extendFieldType('select', ['Budget']);
}]);
// main app // main app
var openprojectCostsApp = angular.module('openproject'); var openprojectCostsApp = angular.module('openproject');

@ -57,7 +57,7 @@ module OpenProject::Costs::Patches::QueryPatch
# Same as typing in the class # Same as typing in the class
base.class_eval do base.class_eval do
add_available_column(QueryColumn.new(:cost_object_subject)) add_available_column(QueryColumn.new(:cost_object))
add_available_column(CurrencyQueryColumn.new( add_available_column(CurrencyQueryColumn.new(
:material_costs, :material_costs,

Loading…
Cancel
Save