From c62722041dab448e232352ef8a3013b549afc271 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 22 Apr 2009 10:17:07 -0700 Subject: [PATCH] [#2280] Added a td for the group by issue format. --- lib/overhead_timesheet_hook.rb | 5 +++++ spec/lib/overhead_timesheet_hook_spec.rb | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/lib/overhead_timesheet_hook.rb b/lib/overhead_timesheet_hook.rb index 12481af..957451c 100644 --- a/lib/overhead_timesheet_hook.rb +++ b/lib/overhead_timesheet_hook.rb @@ -4,6 +4,11 @@ class OverheadTimesheetHook < Redmine::Hook::ViewListener return content_tag(:th, l(:overhead_field_billable)) end + def plugin_timesheet_views_timesheet_time_entry_sum(context={}) + return content_tag(:td, '') + end + + def plugin_timesheet_views_timesheet_time_entry(context={}) time_entry = context[:time_entry] if time_entry && time_entry.billable? diff --git a/spec/lib/overhead_timesheet_hook_spec.rb b/spec/lib/overhead_timesheet_hook_spec.rb index d23aa67..11db940 100644 --- a/spec/lib/overhead_timesheet_hook_spec.rb +++ b/spec/lib/overhead_timesheet_hook_spec.rb @@ -6,6 +6,12 @@ describe OverheadTimesheetHook, "#plugin_timesheet_views_timesheet_group_header" end end +describe OverheadTimesheetHook, "#plugin_timesheet_views_timesheet_time_entry_sum" do + it 'should add an empty column to the table' do + OverheadTimesheetHook.instance.plugin_timesheet_views_timesheet_time_entry_sum.should eql('') + end +end + describe OverheadTimesheetHook, "#plugin_timesheet_views_timesheet_time_entry" do before(:each) do end