diff options
-rw-r--r-- | app/controllers/issue_categories_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/issue_statuses_controller.rb | 10 | ||||
-rw-r--r-- | app/controllers/members_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/news_controller.rb | 12 | ||||
-rw-r--r-- | app/controllers/reports_controller.rb | 24 | ||||
-rw-r--r-- | app/controllers/roles_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/trackers_controller.rb | 3 |
7 files changed, 30 insertions, 34 deletions
diff --git a/app/controllers/issue_categories_controller.rb b/app/controllers/issue_categories_controller.rb index 1658e98c7..a718b2c16 100644 --- a/app/controllers/issue_categories_controller.rb +++ b/app/controllers/issue_categories_controller.rb @@ -16,9 +16,9 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssueCategoriesController < ApplicationController - layout 'base'
- before_filter :find_project, :authorize
-
+ layout 'base'
+ before_filter :find_project, :authorize
+
def edit if request.post? and @category.update_attributes(params[:category]) flash[:notice] = l(:notice_successful_update) diff --git a/app/controllers/issue_statuses_controller.rb b/app/controllers/issue_statuses_controller.rb index 18ca9c76d..5c74fbd02 100644 --- a/app/controllers/issue_statuses_controller.rb +++ b/app/controllers/issue_statuses_controller.rb @@ -16,9 +16,9 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssueStatusesController < ApplicationController
- layout 'base' - before_filter :require_admin
-
+ layout 'base' + before_filter :require_admin
+
def index list render :action => 'list' unless request.xhr? @@ -63,7 +63,5 @@ class IssueStatusesController < ApplicationController rescue
flash[:notice] = "Unable to delete issue status"
redirect_to :action => 'list' - end
-
- + end end diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index 089a18e6a..884454aca 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -38,6 +38,5 @@ private @project = @member.project
rescue ActiveRecord::RecordNotFound
render_404
- end - + end end diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 0f2ae85c6..2afd20506 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -16,8 +16,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class NewsController < ApplicationController
- layout 'base'
- before_filter :find_project, :authorize
+ layout 'base'
+ before_filter :find_project, :authorize
def show end @@ -45,10 +45,10 @@ class NewsController < ApplicationController redirect_to :action => 'show', :id => @news
end
- def destroy - @news.destroy - redirect_to :controller => 'projects', :action => 'list_news', :id => @project - end
+ def destroy + @news.destroy + redirect_to :controller => 'projects', :action => 'list_news', :id => @project + end
private
def find_project
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index b825a8ac6..b27eb19ac 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -16,9 +16,9 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class ReportsController < ApplicationController
- layout 'base'
- before_filter :find_project, :authorize
-
+ layout 'base'
+ before_filter :find_project, :authorize
+
def issue_report
@statuses = IssueStatus.find :all
@@ -104,8 +104,8 @@ private rescue ActiveRecord::RecordNotFound
render_404
end
-
- def issues_by_tracker
+
+ def issues_by_tracker
@issues_by_tracker ||=
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
@@ -118,9 +118,9 @@ private and i.tracker_id=t.id
and i.project_id=#{@project.id}
group by s.id, s.is_closed, t.id")
- end
+ end
- def issues_by_priority
+ def issues_by_priority
@issues_by_priority ||=
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
@@ -133,9 +133,9 @@ private and i.priority_id=p.id
and i.project_id=#{@project.id}
group by s.id, s.is_closed, p.id")
- end
+ end
- def issues_by_category
+ def issues_by_category
@issues_by_category ||=
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
@@ -148,9 +148,9 @@ private and i.category_id=c.id
and i.project_id=#{@project.id}
group by s.id, s.is_closed, c.id")
- end
+ end
- def issues_by_author
+ def issues_by_author
@issues_by_author ||=
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
@@ -163,5 +163,5 @@ private and i.author_id=a.id
and i.project_id=#{@project.id}
group by s.id, s.is_closed, a.id")
- end + end end diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index a4bee5dd1..ed7c6c200 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -16,9 +16,9 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class RolesController < ApplicationController
- layout 'base'
- before_filter :require_admin
- + layout 'base'
+ before_filter :require_admin
+ def index list render :action => 'list' unless request.xhr? diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb index bbfb4f48b..186f8b7ae 100644 --- a/app/controllers/trackers_controller.rb +++ b/app/controllers/trackers_controller.rb @@ -56,6 +56,5 @@ class TrackersController < ApplicationController @tracker.destroy
end redirect_to :action => 'list' - end
- + end end |