diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-15 15:22:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-15 15:22:55 +0000 |
commit | ba7cf9c3ce6c970a2ecb49d1f4ab276a071ada40 (patch) | |
tree | 8ec30a96db6089c7e140e7cb2a4ea5c864fe1ac8 /app/models | |
parent | 7d57833740bb546753d6d908ee082e8268044fa3 (diff) | |
download | redmine-ba7cf9c3ce6c970a2ecb49d1f4ab276a071ada40.tar.gz redmine-ba7cf9c3ce6c970a2ecb49d1f4ab276a071ada40.zip |
Adds custom fields for versions (#4219).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3064 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/version.rb | 1 | ||||
-rw-r--r-- | app/models/version_custom_field.rb | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index dc72e8212..e63ed46cf 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -19,6 +19,7 @@ class Version < ActiveRecord::Base before_destroy :check_integrity belongs_to :project has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id' + acts_as_customizable acts_as_attachable :view_permission => :view_files, :delete_permission => :manage_files diff --git a/app/models/version_custom_field.rb b/app/models/version_custom_field.rb new file mode 100644 index 000000000..400caf0df --- /dev/null +++ b/app/models/version_custom_field.rb @@ -0,0 +1,22 @@ +# Redmine - project management software +# Copyright (C) 2006-2009 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 VersionCustomField < CustomField + def type_name + :label_version_plural + end +end |