class ApplicationHelper::Toolbar::SavedReportsCenter < ApplicationHelper::Toolbar::Basic
  button_group('saved_report_reloading', [
    button(
      :reload,
      'fa fa-refresh fa-lg',
      N_('Refresh selected Reports'),
      nil,
      :url   => "reload",
      :klass => ApplicationHelper::Button::Reload)
  ])
  button_group('saved_report_vmdb', [
    select(
      :saved_report_vmdb_choice,
      'fa fa-cog fa-lg',
      t = N_('Configuration'),
      t,
      :items => [
        button(
          :report_only,
          'fa fa-file-text-o fa-lg',
          t = N_('Show full screen Report'),
          t,
          :enabled => false,
          :onwhen  => "1",
          :url     => "/report_only",
          :popup   => true,
          :confirm => N_("This will show the entire report (all rows) in your browser.  Do you want to proceed?"),
          :klass   => ApplicationHelper::Button::ReportOnly),
        button(
          :saved_report_delete,
          'pficon pficon-delete fa-lg',
          t = N_('Delete selected Saved Reports'),
          t,
          :url_parms    => "main_div",
          :send_checked => true,
          :confirm      => N_("Warning: The selected Saved Reports will be permanently removed from the database!"),
          :enabled      => false,
          :onwhen       => "1+",
          :klass        => ApplicationHelper::Button::SavedReportDelete),
      ]
    ),
  ])
end

class ApplicationHelper::Toolbar::SavedReportsCenter < ApplicationHelper::Toolbar::Basic
  button_group('saved_report_reloading', [
    button(
      :reload,
      'fa fa-refresh fa-lg',
      N_('Refresh selected Reports'),
      nil,
      :url   => "reload",
      :klass => ApplicationHelper::Button::Reload)
  ])
  button_group('saved_report_vmdb', [
    select(
      :saved_report_vmdb_choice,
      'fa fa-cog fa-lg',
      t = N_('Configuration'),
      t,
      :items => [
        button(
          :report_only,
          'fa fa-file-text-o fa-lg',
          t = N_('Show full screen Report'),
          t,
          :enabled => false,
          :onwhen  => "1",
          :url     => "/report_only",
          :popup   => true,
          :confirm => N_("This will show the entire report (all rows) in your browser.  Do you want to proceed?")
        ),
        button(
          :saved_report_delete,
          'pficon pficon-delete fa-lg',
          t = N_('Delete selected Saved Reports'),
          t,
          :url_parms    => "main_div",
          :send_checked => true,
          :confirm      => N_("Warning: The selected Saved Reports will be permanently removed from the database!"),
          :enabled      => false,
          :onwhen       => "1+",
          :klass        => ApplicationHelper::Button::SavedReportDelete),
      ]
    ),
  ])
end

Remove a unneccessary class from 'Show full screen report' button
Remove a unneccessary class from 'Show full screen report' button

* This button should be visible only when only one of reports is selected
* No more condition is needed
* Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1632630
