# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
\r
class IssueCategoriesController < ApplicationController
- layout 'base'\r
- before_filter :find_project, :authorize\r
- \r
+ layout 'base'\r
+ before_filter :find_project, :authorize\r
+\r
def edit
if request.post? and @category.update_attributes(params[:category])
flash[:notice] = l(:notice_successful_update)
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
\r
class IssueStatusesController < ApplicationController\r
- layout 'base'
- before_filter :require_admin\r
- \r
+ layout 'base'
+ before_filter :require_admin\r
+\r
def index
list
render :action => 'list' unless request.xhr?
rescue\r
flash[:notice] = "Unable to delete issue status"\r
redirect_to :action => 'list'
- end\r
- \r
-
+ end
end
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
\r
class NewsController < ApplicationController\r
- layout 'base'\r
- before_filter :find_project, :authorize\r
+ layout 'base'\r
+ before_filter :find_project, :authorize\r
def show
end
redirect_to :action => 'show', :id => @news\r
end\r
- def destroy
- @news.destroy
- redirect_to :controller => 'projects', :action => 'list_news', :id => @project
- end\r
+ def destroy
+ @news.destroy
+ redirect_to :controller => 'projects', :action => 'list_news', :id => @project
+ end\r
\r
private\r
def find_project\r
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
\r
class ReportsController < ApplicationController\r
- layout 'base'\r
- before_filter :find_project, :authorize\r
- \r
+ layout 'base'\r
+ before_filter :find_project, :authorize\r
+\r
def issue_report\r
@statuses = IssueStatus.find :all\r
\r
rescue ActiveRecord::RecordNotFound\r
render_404\r
end\r
- \r
- def issues_by_tracker\r
+\r
+ def issues_by_tracker\r
@issues_by_tracker ||= \r
ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
s.is_closed as closed, \r
and i.tracker_id=t.id\r
and i.project_id=#{@project.id}\r
group by s.id, s.is_closed, t.id") \r
- end\r
+ end\r
\r
- def issues_by_priority \r
+ def issues_by_priority \r
@issues_by_priority ||= \r
ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
s.is_closed as closed, \r
and i.priority_id=p.id\r
and i.project_id=#{@project.id}\r
group by s.id, s.is_closed, p.id") \r
- end\r
+ end\r
\r
- def issues_by_category \r
+ def issues_by_category \r
@issues_by_category ||= \r
ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
s.is_closed as closed, \r
and i.category_id=c.id\r
and i.project_id=#{@project.id}\r
group by s.id, s.is_closed, c.id") \r
- end\r
+ end\r
\r
- def issues_by_author\r
+ def issues_by_author\r
@issues_by_author ||= \r
ActiveRecord::Base.connection.select_all("select s.id as status_id, \r
s.is_closed as closed, \r
and i.author_id=a.id\r
and i.project_id=#{@project.id}\r
group by s.id, s.is_closed, a.id") \r
- end
+ end
end