@@ -0,0 +1,22 | |||||
|
1 | # Redmine - project management software | |||
|
2 | # Copyright (C) 2006-2009 Jean-Philippe Lang | |||
|
3 | # | |||
|
4 | # This program is free software; you can redistribute it and/or | |||
|
5 | # modify it under the terms of the GNU General Public License | |||
|
6 | # as published by the Free Software Foundation; either version 2 | |||
|
7 | # of the License, or (at your option) any later version. | |||
|
8 | # | |||
|
9 | # This program is distributed in the hope that it will be useful, | |||
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
12 | # GNU General Public License for more details. | |||
|
13 | # | |||
|
14 | # You should have received a copy of the GNU General Public License | |||
|
15 | # along with this program; if not, write to the Free Software | |||
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
|
17 | ||||
|
18 | class VersionCustomField < CustomField | |||
|
19 | def type_name | |||
|
20 | :label_version_plural | |||
|
21 | end | |||
|
22 | end |
@@ -21,6 +21,8 class VersionsController < ApplicationController | |||||
21 | before_filter :find_project, :only => :close_completed |
|
21 | before_filter :find_project, :only => :close_completed | |
22 | before_filter :authorize |
|
22 | before_filter :authorize | |
23 |
|
23 | |||
|
24 | helper :custom_fields | |||
|
25 | ||||
24 | def show |
|
26 | def show | |
25 | end |
|
27 | end | |
26 |
|
28 |
@@ -21,6 +21,7 module CustomFieldsHelper | |||||
21 | tabs = [{:name => 'IssueCustomField', :partial => 'custom_fields/index', :label => :label_issue_plural}, |
|
21 | tabs = [{:name => 'IssueCustomField', :partial => 'custom_fields/index', :label => :label_issue_plural}, | |
22 | {:name => 'TimeEntryCustomField', :partial => 'custom_fields/index', :label => :label_spent_time}, |
|
22 | {:name => 'TimeEntryCustomField', :partial => 'custom_fields/index', :label => :label_spent_time}, | |
23 | {:name => 'ProjectCustomField', :partial => 'custom_fields/index', :label => :label_project_plural}, |
|
23 | {:name => 'ProjectCustomField', :partial => 'custom_fields/index', :label => :label_project_plural}, | |
|
24 | {:name => 'VersionCustomField', :partial => 'custom_fields/index', :label => :label_version_plural}, | |||
24 | {:name => 'UserCustomField', :partial => 'custom_fields/index', :label => :label_user_plural}, |
|
25 | {:name => 'UserCustomField', :partial => 'custom_fields/index', :label => :label_user_plural}, | |
25 | {:name => 'GroupCustomField', :partial => 'custom_fields/index', :label => :label_group_plural}, |
|
26 | {:name => 'GroupCustomField', :partial => 'custom_fields/index', :label => :label_group_plural}, | |
26 | {:name => 'TimeEntryActivityCustomField', :partial => 'custom_fields/index', :label => TimeEntryActivity::OptionName}, |
|
27 | {:name => 'TimeEntryActivityCustomField', :partial => 'custom_fields/index', :label => TimeEntryActivity::OptionName}, |
@@ -19,6 +19,7 class Version < ActiveRecord::Base | |||||
19 | before_destroy :check_integrity |
|
19 | before_destroy :check_integrity | |
20 | belongs_to :project |
|
20 | belongs_to :project | |
21 | has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id' |
|
21 | has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id' | |
|
22 | acts_as_customizable | |||
22 | acts_as_attachable :view_permission => :view_files, |
|
23 | acts_as_attachable :view_permission => :view_files, | |
23 | :delete_permission => :manage_files |
|
24 | :delete_permission => :manage_files | |
24 |
|
25 |
@@ -6,4 +6,8 | |||||
6 | <p><%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %></p> |
|
6 | <p><%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %></p> | |
7 | <p><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></p> |
|
7 | <p><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></p> | |
8 | <p><%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></p> |
|
8 | <p><%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></p> | |
|
9 | ||||
|
10 | <% @version.custom_field_values.each do |value| %> | |||
|
11 | <p><%= custom_field_tag_with_label :version, value %></p> | |||
|
12 | <% end %> | |||
9 | </div> |
|
13 | </div> |
@@ -5,6 +5,13 | |||||
5 | <% end %> |
|
5 | <% end %> | |
6 |
|
6 | |||
7 | <p><%=h version.description %></p> |
|
7 | <p><%=h version.description %></p> | |
|
8 | <ul> | |||
|
9 | <% version.custom_values.each do |custom_value| %> | |||
|
10 | <% if !custom_value.value.blank? %> | |||
|
11 | <li><%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %></li> | |||
|
12 | <% end %> | |||
|
13 | <% end %> | |||
|
14 | </ul> | |||
8 |
|
15 | |||
9 | <% if version.fixed_issues.count > 0 %> |
|
16 | <% if version.fixed_issues.count > 0 %> | |
10 | <%= progress_bar([version.closed_pourcent, version.completed_pourcent], :width => '40em', :legend => ('%0.0f%' % version.completed_pourcent)) %> |
|
17 | <%= progress_bar([version.closed_pourcent, version.completed_pourcent], :width => '40em', :legend => ('%0.0f%' % version.completed_pourcent)) %> |
General Comments 0
You need to be logged in to leave comments.
Login now