diff --git a/app/views/settings/_overhead_settings.html.erb b/app/views/settings/_overhead_settings.html.erb new file mode 100644 index 0000000..81e7a99 --- /dev/null +++ b/app/views/settings/_overhead_settings.html.erb @@ -0,0 +1,22 @@ +<% activity_fields = TimeEntryActivityCustomField.find :all %> + +
+ +

+ + <%= select_tag('setting[custom_field]', + '' + + options_from_collection_for_select(activity_fields, :id, :name, @settings['custom_field'].to_i)) %> +

+ +

+ + TODO +

+ +

+ + TODO +

+ +
diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..d6ad08b --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,4 @@ +en: + overhead_field_billing_status: Billing Status + overhead_field_billable_value: Billable Value + overhead_field_overhead_value: Overhead Value diff --git a/init.rb b/init.rb index 9908902..6120958 100644 --- a/init.rb +++ b/init.rb @@ -10,4 +10,11 @@ Redmine::Plugin.register :redmine_overhead do requires_redmine :version_or_higher => '0.8.0' + + settings :default => { + 'custom_field' => nil, + 'billable_value' => nil, + 'overhead_value' => nil + }, :partial => 'settings/overhead_settings' + end