From ba7cf9c3ce6c970a2ecb49d1f4ab276a071ada40 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 15 Nov 2009 15:22:55 +0000 Subject: Adds custom fields for versions (#4219). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3064 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/version.rb | 1 + app/models/version_custom_field.rb | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 app/models/version_custom_field.rb (limited to 'app/models') 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 -- cgit v1.2.3