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