@@ -5,12 +5,12 | |||
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 |
# |
|
|
8 | # | |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 |
# |
|
|
13 | # | |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
@@ -24,7 +24,7 class VersionsController < ApplicationController | |||
|
24 | 24 | before_filter :authorize |
|
25 | 25 | |
|
26 | 26 | accept_api_auth :index, :create, :update, :destroy |
|
27 | ||
|
27 | ||
|
28 | 28 | helper :custom_fields |
|
29 | 29 | helper :projects |
|
30 | 30 | |
@@ -35,12 +35,12 class VersionsController < ApplicationController | |||
|
35 | 35 | retrieve_selected_tracker_ids(@trackers, @trackers.select {|t| t.is_in_roadmap?}) |
|
36 | 36 | @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1') |
|
37 | 37 | project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id] |
|
38 | ||
|
38 | ||
|
39 | 39 | @versions = @project.shared_versions || [] |
|
40 | 40 | @versions += @project.rolled_up_versions.visible if @with_subprojects |
|
41 | 41 | @versions = @versions.uniq.sort |
|
42 | 42 | @versions.reject! {|version| version.closed? || version.completed? } unless params[:completed] |
|
43 | ||
|
43 | ||
|
44 | 44 | @issues_by_version = {} |
|
45 | 45 | unless @selected_tracker_ids.empty? |
|
46 | 46 | @versions.each do |version| |
@@ -58,7 +58,7 class VersionsController < ApplicationController | |||
|
58 | 58 | } |
|
59 | 59 | end |
|
60 | 60 | end |
|
61 | ||
|
61 | ||
|
62 | 62 | def show |
|
63 | 63 | respond_to do |format| |
|
64 | 64 | format.html { |
@@ -69,7 +69,7 class VersionsController < ApplicationController | |||
|
69 | 69 | format.api |
|
70 | 70 | end |
|
71 | 71 | end |
|
72 | ||
|
72 | ||
|
73 | 73 | def new |
|
74 | 74 | @version = @project.versions.build |
|
75 | 75 | if params[:version] |
@@ -119,7 +119,7 class VersionsController < ApplicationController | |||
|
119 | 119 | |
|
120 | 120 | def edit |
|
121 | 121 | end |
|
122 | ||
|
122 | ||
|
123 | 123 | def update |
|
124 | 124 | if request.put? && params[:version] |
|
125 | 125 | attributes = params[:version].dup |
@@ -140,7 +140,7 class VersionsController < ApplicationController | |||
|
140 | 140 | end |
|
141 | 141 | end |
|
142 | 142 | end |
|
143 | ||
|
143 | ||
|
144 | 144 | def close_completed |
|
145 | 145 | if request.put? |
|
146 | 146 | @project.close_completed_versions |
@@ -166,7 +166,7 class VersionsController < ApplicationController | |||
|
166 | 166 | end |
|
167 | 167 | end |
|
168 | 168 | end |
|
169 | ||
|
169 | ||
|
170 | 170 | def status_by |
|
171 | 171 | respond_to do |format| |
|
172 | 172 | format.html { render :action => 'show' } |
General Comments 0
You need to be logged in to leave comments.
Login now