diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-08 17:53:58 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-08 17:53:58 +0000 |
commit | 597725d77ce07c1e297e83f2a3594bbe1902ab2e (patch) | |
tree | e04fc22500b752a4807eca8e8db9d5367e2fd43d /app/controllers/reports_controller.rb | |
parent | 23c46c68abfae18e9aca19eb95941ecd1e74bb59 (diff) | |
download | redmine-597725d77ce07c1e297e83f2a3594bbe1902ab2e.tar.gz redmine-597725d77ce07c1e297e83f2a3594bbe1902ab2e.zip |
Separated ReportsController#issue_report into two separate actions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3396 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/reports_controller.rb')
-rw-r--r-- | app/controllers/reports_controller.rb | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index e057c6c0a..ef2ffd339 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -22,6 +22,27 @@ class ReportsController < ApplicationController def issue_report @statuses = IssueStatus.find(:all, :order => 'position') + @trackers = @project.trackers + @versions = @project.shared_versions.sort + @priorities = IssuePriority.all + @categories = @project.issue_categories + @assignees = @project.members.collect { |m| m.user }.sort + @authors = @project.members.collect { |m| m.user }.sort + @subprojects = @project.descendants.active + issues_by_tracker + issues_by_version + issues_by_priority + issues_by_category + issues_by_assigned_to + issues_by_author + issues_by_subproject + + render :template => "reports/issue_report" + end + + def issue_report_details + @statuses = IssueStatus.find(:all, :order => 'position') + case params[:detail] when "tracker" @field = "tracker_id" @@ -66,25 +87,10 @@ class ReportsController < ApplicationController @report_title = l(:field_subproject) render :template => "reports/issue_report_details" else - @trackers = @project.trackers - @versions = @project.shared_versions.sort - @priorities = IssuePriority.all - @categories = @project.issue_categories - @assignees = @project.members.collect { |m| m.user }.sort - @authors = @project.members.collect { |m| m.user }.sort - @subprojects = @project.descendants.active - issues_by_tracker - issues_by_version - issues_by_priority - issues_by_category - issues_by_assigned_to - issues_by_author - issues_by_subproject - - render :template => "reports/issue_report" + redirect_to :action => 'issue_report', :id => @project end - end - + + end private def issues_by_tracker @issues_by_tracker ||= Issue.by_tracker(@project) |