Skip to content

Commit

Permalink
Fix export button in widget export screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Dec 4, 2017
1 parent f18a28f commit 7394b6d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/controllers/report_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,13 @@ def get_export_reports
def set_form_locals
locals = {}
if x_active_tree == :export_tree
locals[:no_reset] = locals[:no_cancel] = locals[:multi_record] = true
if x_node == "xx-exportwidgets"
action_url = nil
record_id = nil
locals[:export_button] = false
else
action_url = "download_report"
locals[:no_reset] = true
locals[:no_cancel] = true
locals[:multi_record] = true
locals[:export_button] = true
end
elsif x_active_tree == :schedules_tree || params[:pressed] == "miq_report_schedule_add"
Expand Down Expand Up @@ -857,7 +856,7 @@ def replace_right_cell(options = {}) # :replace_trees key can be an array of tr
presenter[:right_cell_text] = @right_cell_text

# Handle bottom cell
if ((@in_a_form || @pages) || (@sb[:pages] && @html)) && params[:id] != 'xx-exportwidgets'
if ((@in_a_form || @pages) || (@sb[:pages] && @html))
if @pages
presenter.hide(:form_buttons_div, :rpb_div_1).show(:pc_div_1)
elsif @in_a_form
Expand All @@ -871,7 +870,7 @@ def replace_right_cell(options = {}) # :replace_trees key can be an array of tr
else
presenter.hide(:paging_div)
end
if @sb[:active_tab] == 'report_info' && x_node.split('-').length == 5 && !@in_a_form
if (@sb[:active_tab] == 'report_info' && x_node.split('-').length == 5 && !@in_a_form) || (%w(xx-exportwidgets xx-exportcustomreports).include?(x_node))
presenter.hide(:paging_div)
end
presenter.set_visibility(!@in_a_form, :toolbar)
Expand Down

0 comments on commit 7394b6d

Please sign in to comment.