[#2280] Added a Billable cell with the green checkbox depending on if a
Time Entry is billable or not.
This commit is contained in:
@@ -39,6 +39,7 @@ module OverheadTimeEntryActivityPatch
|
||||
return false unless field
|
||||
|
||||
custom_value = self.custom_value_for(field)
|
||||
return false unless custom_value
|
||||
|
||||
if field.field_format == 'bool'
|
||||
# Map string values to proper booleans
|
||||
|
||||
@@ -3,4 +3,13 @@ class OverheadTimesheetHook < Redmine::Hook::ViewListener
|
||||
def plugin_timesheet_views_timesheet_group_header(context={})
|
||||
return content_tag(:th, l(:overhead_field_billable))
|
||||
end
|
||||
|
||||
def plugin_timesheet_views_timesheet_time_entry(context={})
|
||||
time_entry = context[:time_entry]
|
||||
if time_entry && time_entry.billable?
|
||||
content_tag(:td, image_tag('true.png'))
|
||||
else
|
||||
content_tag(:td,'')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user