Extracted the rendering from each case statement in issue_reports_details
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3401 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
57a4cefd97
commit
f50feca730
|
@ -49,47 +49,45 @@ class ReportsController < ApplicationController
|
||||||
@rows = @project.trackers
|
@rows = @project.trackers
|
||||||
@data = issues_by_tracker
|
@data = issues_by_tracker
|
||||||
@report_title = l(:field_tracker)
|
@report_title = l(:field_tracker)
|
||||||
render :template => "reports/issue_report_details"
|
|
||||||
when "version"
|
when "version"
|
||||||
@field = "fixed_version_id"
|
@field = "fixed_version_id"
|
||||||
@rows = @project.shared_versions.sort
|
@rows = @project.shared_versions.sort
|
||||||
@data = issues_by_version
|
@data = issues_by_version
|
||||||
@report_title = l(:field_version)
|
@report_title = l(:field_version)
|
||||||
render :template => "reports/issue_report_details"
|
|
||||||
when "priority"
|
when "priority"
|
||||||
@field = "priority_id"
|
@field = "priority_id"
|
||||||
@rows = IssuePriority.all
|
@rows = IssuePriority.all
|
||||||
@data = issues_by_priority
|
@data = issues_by_priority
|
||||||
@report_title = l(:field_priority)
|
@report_title = l(:field_priority)
|
||||||
render :template => "reports/issue_report_details"
|
|
||||||
when "category"
|
when "category"
|
||||||
@field = "category_id"
|
@field = "category_id"
|
||||||
@rows = @project.issue_categories
|
@rows = @project.issue_categories
|
||||||
@data = issues_by_category
|
@data = issues_by_category
|
||||||
@report_title = l(:field_category)
|
@report_title = l(:field_category)
|
||||||
render :template => "reports/issue_report_details"
|
|
||||||
when "assigned_to"
|
when "assigned_to"
|
||||||
@field = "assigned_to_id"
|
@field = "assigned_to_id"
|
||||||
@rows = @project.members.collect { |m| m.user }.sort
|
@rows = @project.members.collect { |m| m.user }.sort
|
||||||
@data = issues_by_assigned_to
|
@data = issues_by_assigned_to
|
||||||
@report_title = l(:field_assigned_to)
|
@report_title = l(:field_assigned_to)
|
||||||
render :template => "reports/issue_report_details"
|
|
||||||
when "author"
|
when "author"
|
||||||
@field = "author_id"
|
@field = "author_id"
|
||||||
@rows = @project.members.collect { |m| m.user }.sort
|
@rows = @project.members.collect { |m| m.user }.sort
|
||||||
@data = issues_by_author
|
@data = issues_by_author
|
||||||
@report_title = l(:field_author)
|
@report_title = l(:field_author)
|
||||||
render :template => "reports/issue_report_details"
|
|
||||||
when "subproject"
|
when "subproject"
|
||||||
@field = "project_id"
|
@field = "project_id"
|
||||||
@rows = @project.descendants.active
|
@rows = @project.descendants.active
|
||||||
@data = issues_by_subproject
|
@data = issues_by_subproject
|
||||||
@report_title = l(:field_subproject)
|
@report_title = l(:field_subproject)
|
||||||
render :template => "reports/issue_report_details"
|
|
||||||
else
|
|
||||||
redirect_to :action => 'issue_report', :id => @project
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
if @field
|
||||||
|
format.html {}
|
||||||
|
else
|
||||||
|
format.html { redirect_to :action => 'issue_report', :id => @project }
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
private
|
private
|
||||||
def issues_by_tracker
|
def issues_by_tracker
|
||||||
|
|
Loading…
Reference in New Issue