##// END OF EJS Templates
indentation corrections...
Jean-Philippe Lang -
r198:99c560295fca
parent child
Show More
@@ -16,9 +16,9
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.
17
17
18 class IssueCategoriesController < ApplicationController
18 class IssueCategoriesController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :find_project, :authorize
20 before_filter :find_project, :authorize
21
21
22 def edit
22 def edit
23 if request.post? and @category.update_attributes(params[:category])
23 if request.post? and @category.update_attributes(params[:category])
24 flash[:notice] = l(:notice_successful_update)
24 flash[:notice] = l(:notice_successful_update)
@@ -16,9 +16,9
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.
17
17
18 class IssueStatusesController < ApplicationController
18 class IssueStatusesController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :require_admin
20 before_filter :require_admin
21
21
22 def index
22 def index
23 list
23 list
24 render :action => 'list' unless request.xhr?
24 render :action => 'list' unless request.xhr?
@@ -63,7 +63,5 class IssueStatusesController < ApplicationController
63 rescue
63 rescue
64 flash[:notice] = "Unable to delete issue status"
64 flash[:notice] = "Unable to delete issue status"
65 redirect_to :action => 'list'
65 redirect_to :action => 'list'
66 end
66 end
67
68
69 end
67 end
@@ -38,6 +38,5 private
38 @project = @member.project
38 @project = @member.project
39 rescue ActiveRecord::RecordNotFound
39 rescue ActiveRecord::RecordNotFound
40 render_404
40 render_404
41 end
41 end
42
43 end
42 end
@@ -16,8 +16,8
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.
17
17
18 class NewsController < ApplicationController
18 class NewsController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :find_project, :authorize
20 before_filter :find_project, :authorize
21
21
22 def show
22 def show
23 end
23 end
@@ -45,10 +45,10 class NewsController < ApplicationController
45 redirect_to :action => 'show', :id => @news
45 redirect_to :action => 'show', :id => @news
46 end
46 end
47
47
48 def destroy
48 def destroy
49 @news.destroy
49 @news.destroy
50 redirect_to :controller => 'projects', :action => 'list_news', :id => @project
50 redirect_to :controller => 'projects', :action => 'list_news', :id => @project
51 end
51 end
52
52
53 private
53 private
54 def find_project
54 def find_project
@@ -16,9 +16,9
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.
17
17
18 class ReportsController < ApplicationController
18 class ReportsController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :find_project, :authorize
20 before_filter :find_project, :authorize
21
21
22 def issue_report
22 def issue_report
23 @statuses = IssueStatus.find :all
23 @statuses = IssueStatus.find :all
24
24
@@ -104,8 +104,8 private
104 rescue ActiveRecord::RecordNotFound
104 rescue ActiveRecord::RecordNotFound
105 render_404
105 render_404
106 end
106 end
107
107
108 def issues_by_tracker
108 def issues_by_tracker
109 @issues_by_tracker ||=
109 @issues_by_tracker ||=
110 ActiveRecord::Base.connection.select_all("select s.id as status_id,
110 ActiveRecord::Base.connection.select_all("select s.id as status_id,
111 s.is_closed as closed,
111 s.is_closed as closed,
@@ -118,9 +118,9 private
118 and i.tracker_id=t.id
118 and i.tracker_id=t.id
119 and i.project_id=#{@project.id}
119 and i.project_id=#{@project.id}
120 group by s.id, s.is_closed, t.id")
120 group by s.id, s.is_closed, t.id")
121 end
121 end
122
122
123 def issues_by_priority
123 def issues_by_priority
124 @issues_by_priority ||=
124 @issues_by_priority ||=
125 ActiveRecord::Base.connection.select_all("select s.id as status_id,
125 ActiveRecord::Base.connection.select_all("select s.id as status_id,
126 s.is_closed as closed,
126 s.is_closed as closed,
@@ -133,9 +133,9 private
133 and i.priority_id=p.id
133 and i.priority_id=p.id
134 and i.project_id=#{@project.id}
134 and i.project_id=#{@project.id}
135 group by s.id, s.is_closed, p.id")
135 group by s.id, s.is_closed, p.id")
136 end
136 end
137
137
138 def issues_by_category
138 def issues_by_category
139 @issues_by_category ||=
139 @issues_by_category ||=
140 ActiveRecord::Base.connection.select_all("select s.id as status_id,
140 ActiveRecord::Base.connection.select_all("select s.id as status_id,
141 s.is_closed as closed,
141 s.is_closed as closed,
@@ -148,9 +148,9 private
148 and i.category_id=c.id
148 and i.category_id=c.id
149 and i.project_id=#{@project.id}
149 and i.project_id=#{@project.id}
150 group by s.id, s.is_closed, c.id")
150 group by s.id, s.is_closed, c.id")
151 end
151 end
152
152
153 def issues_by_author
153 def issues_by_author
154 @issues_by_author ||=
154 @issues_by_author ||=
155 ActiveRecord::Base.connection.select_all("select s.id as status_id,
155 ActiveRecord::Base.connection.select_all("select s.id as status_id,
156 s.is_closed as closed,
156 s.is_closed as closed,
@@ -163,5 +163,5 private
163 and i.author_id=a.id
163 and i.author_id=a.id
164 and i.project_id=#{@project.id}
164 and i.project_id=#{@project.id}
165 group by s.id, s.is_closed, a.id")
165 group by s.id, s.is_closed, a.id")
166 end
166 end
167 end
167 end
@@ -16,9 +16,9
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.
17
17
18 class RolesController < ApplicationController
18 class RolesController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :require_admin
20 before_filter :require_admin
21
21
22 def index
22 def index
23 list
23 list
24 render :action => 'list' unless request.xhr?
24 render :action => 'list' unless request.xhr?
@@ -56,6 +56,5 class TrackersController < ApplicationController
56 @tracker.destroy
56 @tracker.destroy
57 end
57 end
58 redirect_to :action => 'list'
58 redirect_to :action => 'list'
59 end
59 end
60
61 end
60 end
General Comments 0
You need to be logged in to leave comments. Login now