[#2280] Added a Billable header to the Timesheet plugin's report tables.
This commit is contained in:
@@ -2,3 +2,4 @@ en:
|
||||
overhead_field_billing_status: Billing Status
|
||||
overhead_field_billable_value: Billable Value
|
||||
overhead_field_overhead_value: Overhead Value
|
||||
overhead_field_billable: Billable
|
||||
|
||||
2
init.rb
2
init.rb
@@ -9,6 +9,8 @@ Dispatcher.to_prepare do
|
||||
TimeEntryActivity.send(:include, OverheadTimeEntryActivityPatch)
|
||||
end
|
||||
|
||||
require 'overhead_timesheet_hook'
|
||||
|
||||
Redmine::Plugin.register :redmine_overhead do
|
||||
name 'Overhead plugin'
|
||||
author 'Eric Davis'
|
||||
|
||||
6
lib/overhead_timesheet_hook.rb
Normal file
6
lib/overhead_timesheet_hook.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class OverheadTimesheetHook < Redmine::Hook::ViewListener
|
||||
|
||||
def plugin_timesheet_views_timesheet_group_header(context={})
|
||||
return content_tag(:th, l(:overhead_field_billable))
|
||||
end
|
||||
end
|
||||
7
spec/lib/overhead_timesheet_hook_spec.rb
Normal file
7
spec/lib/overhead_timesheet_hook_spec.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
|
||||
describe OverheadTimesheetHook, "#plugin_timesheet_views_timesheet_group_header" do
|
||||
it 'should add a Billable column to the table' do
|
||||
OverheadTimesheetHook.instance.plugin_timesheet_views_timesheet_group_header.should eql('<th>Billable</th>')
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user