[#3306] Added the Billable column to the Timesheet plugin's CSV export.

This commit is contained in:
Eric Davis
2009-11-19 11:45:40 -08:00
parent c8fe20924d
commit 44ef5cdb0b
2 changed files with 62 additions and 0 deletions
+14
View File
@@ -21,6 +21,20 @@ class OverheadTimesheetHook < Redmine::Hook::ViewListener
end
end
def plugin_timesheet_model_timesheet_csv_header(context={})
context[:csv_data] << l(:overhead_field_billable)
end
def plugin_timesheet_model_timesheet_time_entry_to_csv(context={})
if context[:time_entry]
if context[:time_entry].billable?
context[:csv_data] << l(:overhead_field_billable)
else
context[:csv_data] << l(:overhead_field_overhead)
end
end
end
# Added a new field for filtering based on "billable?"
def plugin_timesheet_views_timesheet_form(context={})
if context[:params] &&