|
|
@ -200,6 +200,8 @@ class WorkPackagesController < ApplicationController |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def index |
|
|
|
def index |
|
|
|
|
|
|
|
load_work_packages unless request.format.html? |
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format| |
|
|
|
respond_to do |format| |
|
|
|
format.html do |
|
|
|
format.html do |
|
|
|
render :index, :locals => { :query => @query, |
|
|
|
render :index, :locals => { :query => @query, |
|
|
@ -207,7 +209,6 @@ class WorkPackagesController < ApplicationController |
|
|
|
:layout => !request.xhr? |
|
|
|
:layout => !request.xhr? |
|
|
|
end |
|
|
|
end |
|
|
|
format.csv do |
|
|
|
format.csv do |
|
|
|
load_work_packages |
|
|
|
|
|
|
|
serialized_work_packages = WorkPackage::Exporter.csv(@work_packages, @project) |
|
|
|
serialized_work_packages = WorkPackage::Exporter.csv(@work_packages, @project) |
|
|
|
charset = "charset=#{l(:general_csv_encoding).downcase}" |
|
|
|
charset = "charset=#{l(:general_csv_encoding).downcase}" |
|
|
|
|
|
|
|
|
|
|
@ -215,7 +216,6 @@ class WorkPackagesController < ApplicationController |
|
|
|
:filename => 'export.csv') |
|
|
|
:filename => 'export.csv') |
|
|
|
end |
|
|
|
end |
|
|
|
format.pdf do |
|
|
|
format.pdf do |
|
|
|
load_work_packages |
|
|
|
|
|
|
|
serialized_work_packages = WorkPackage::Exporter.pdf(@work_packages, |
|
|
|
serialized_work_packages = WorkPackage::Exporter.pdf(@work_packages, |
|
|
|
@project, |
|
|
|
@project, |
|
|
|
@query, |
|
|
|
@query, |
|
|
@ -227,7 +227,6 @@ class WorkPackagesController < ApplicationController |
|
|
|
:filename => 'export.pdf') |
|
|
|
:filename => 'export.pdf') |
|
|
|
end |
|
|
|
end |
|
|
|
format.atom do |
|
|
|
format.atom do |
|
|
|
load_work_packages |
|
|
|
|
|
|
|
render_feed(@work_packages, |
|
|
|
render_feed(@work_packages, |
|
|
|
:title => "#{@project || Setting.app_title}: #{l(:label_work_package_plural)}") |
|
|
|
:title => "#{@project || Setting.app_title}: #{l(:label_work_package_plural)}") |
|
|
|
end |
|
|
|
end |
|
|
|