make deactivation of progressbar available in controller through @no_progress

pull/6827/head
Tim Felgentreff 14 years ago
parent fb5406b385
commit 391a6b9583
  1. 9
      lib/report/controller.rb

@ -11,6 +11,7 @@ module Report::Controller
before_filter :prepare_query, :only => [:index, :create] before_filter :prepare_query, :only => [:index, :create]
before_filter :find_optional_report, :only => [:index, :show, :update, :delete, :rename] before_filter :find_optional_report, :only => [:index, :show, :update, :delete, :rename]
before_filter :possibly_only_narrow_values before_filter :possibly_only_narrow_values
before_filter { @no_progress = no_progress? }
end end
end end
@ -22,7 +23,7 @@ module Report::Controller
# Render the report. Renders either the complete index or the table only # Render the report. Renders either the complete index or the table only
def table def table
if set_filter? if set_filter?
if params[:immediately] if no_progress?
table_without_progress_info table_without_progress_info
else else
table_with_progress_info table_with_progress_info
@ -163,6 +164,12 @@ module Report::Controller
params[:set_filter].to_i == 1 params[:set_filter].to_i == 1
end end
##
# Determines if the requested table should be rendered with a progressbar
def no_progress?
!!params[:immediately]
end
## ##
# Return the active filters # Return the active filters
def filter_params def filter_params

Loading…
Cancel
Save