[#2280] Added a Billable header to the Timesheet plugin's report tables.

This commit is contained in:
Eric Davis
2009-04-22 09:32:11 -07:00
parent adf17f8ed7
commit 7e67416b5b
4 changed files with 16 additions and 0 deletions

View File

@@ -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

View File

@@ -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'

View 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

View 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