move cost_entry settings from the engine to this plugin

pull/6827/head
Philipp Tessenow 13 years ago
parent d64413a9ce
commit f900e2ea30
  1. 1
      init.rb
  2. 19
      lib/redmine_widgets/settings.rb

@ -6,6 +6,7 @@ $LOAD_PATH << File.expand_path("../lib/redmine_widgets", __FILE__)
require 'simple_table'
require 'entry_table'
require 'cost_types'
require 'settings'
Redmine::Plugin.register :redmine_reporting do
name 'Reporting Plugin'

@ -0,0 +1,19 @@
class Widget::Settings < Widget::Base
@@settings_to_render.insert -2, :cost_types
def render_cost_types_settings
render_widget Widget::Settings::Fieldset, @subject, { :type => "units" } do
render_widget Widget::CostTypes,
@cost_types,
:selected_type_id => @selected_type_id
end
end
def render_with_options(options, &block)
@cost_types = options.delete(:cost_types)
@selected_type_id = options.delete(:selected_type_id)
super(options, &block)
end
end
Loading…
Cancel
Save