the Widget::Table never wrote to the canvas. Have it write, to make sure we have one, in case we're not streaming or serving from cache

pull/6827/head
Tim Felgentreff 13 years ago
parent e6efd494cf
commit b08fe791e3
  1. 11
      lib/widget/table.rb

@ -97,13 +97,10 @@ class Widget::Table < Widget::Base
fancy_table Widget::Table::ReportTable
def render
content_tag :div, :id => "result-table" do
ret_val = render_widget(resolve_table, @subject, @options.reverse_merge(:to => @output))
if @subject.result.count <= 0
@output.write(content_tag(:p, l(:label_no_data), :class => "nodata"))
else
ret_val
end
write("<!-- table start -->")
ret_val = render_widget(resolve_table, @subject, @options.reverse_merge(:to => @output))
if @subject.result.count <= 0
write(content_tag(:p, l(:label_no_data), :class => "nodata"))
end
end
end

Loading…
Cancel
Save