diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-22 18:52:00 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-22 18:52:00 +0000 |
commit | 898fac293b3d8042de3c1747776fac90d3ed40fa (patch) | |
tree | 1060a3fe53e880892ebb78df12d5311bf14b54c7 /app/models | |
parent | 590a829a06d4106f7827ddf242a0de5c0ca3e197 (diff) | |
download | redmine-898fac293b3d8042de3c1747776fac90d3ed40fa.tar.gz redmine-898fac293b3d8042de3c1747776fac90d3ed40fa.zip |
Adds custom fields on time entries (#772).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1689 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/time_entry.rb | 1 | ||||
-rw-r--r-- | app/models/time_entry_custom_field.rb | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 759f9bed0..57a75604d 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -25,6 +25,7 @@ class TimeEntry < ActiveRecord::Base attr_protected :project_id, :user_id, :tyear, :tmonth, :tweek + acts_as_customizable acts_as_event :title => Proc.new {|o| "#{o.user}: #{lwr(:label_f_hour, o.hours)} (#{(o.issue || o.project).event_title})"}, :url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project}}, :author => :user, diff --git a/app/models/time_entry_custom_field.rb b/app/models/time_entry_custom_field.rb new file mode 100644 index 000000000..2ec3d27be --- /dev/null +++ b/app/models/time_entry_custom_field.rb @@ -0,0 +1,23 @@ +# redMine - project management software +# Copyright (C) 2008 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class TimeEntryCustomField < CustomField + def type_name + :label_spent_time + end +end + |