Module: ForemanOmaha::HostsHelperExtensions::Overrides

Defined in:
app/helpers/concerns/foreman_omaha/hosts_helper_extensions.rb

Instance Method Summary collapse

Instance Method Details

#show_appropriate_host_buttons(host) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/helpers/concerns/foreman_omaha/hosts_helper_extensions.rb', line 8

def show_appropriate_host_buttons(host)
  buttons = super
  if host.omaha_reports.any?
    buttons << link_to_if_authorized(
      _('Omaha'),
      hash_for_host_omaha_reports_path(:host_id => host),
      :title => _('Browse host omaha reports'),
      :class => 'btn btn-default'
    )
  end
  buttons.compact
end