Merge branch 'bugfix/excel_export' of https://dev.finn.de/git/reporting-engine into bugfix/excel_export

pull/6827/head
jwollert 14 years ago
commit 58b8a20c81
  1. 15
      lib/report.rb
  2. 6
      lib/widget/table/report_table.rb

@ -49,6 +49,21 @@ class Report < ActiveRecord::Base
end
end
# Convenience method to generate a params hash readable by Controller#determine_settings
def to_params
params = { :fields => [], :operators => {}, :values => {}, :groups => { :rows => [], :columns => [] } }
filters.each do |f|
filter_name = f.class.underscore_name
params[:fields] << filter_name
params[:operators].merge! filter_name => f.operator.to_s
params[:values].merge! filter_name => f.values
end
group_bys.each do |g|
params[:groups][g.row? ? :rows : :columns] << g.class.underscore_name
end
params
end
##
# Migrates this report to look like the given report.
# This may be used to alter report properties without

@ -138,12 +138,6 @@ class Widget::Table::ReportTable < Widget::Table
write "</tfoot>"
end
def render_xls_export
write (content_tag :div, :id => "result-formats", :style => "font-size: 14px; line-height: 2;" do
link_to l(:export_as_excel), :action => :index, :format => "xls"
end)
end
def debug_content
content_tag :pre do
debug_pre_content = "[ Query ]" +

Loading…
Cancel
Save