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