Sha256: 9115174830652bc1095e28dea84f60947f50454071d286b25cf260ac8e387184

Contents?: true

Size: 735 Bytes

Versions: 8

Compression:

Stored size: 735 Bytes

Contents

module ForemanXen
  module HostHelperExtensions
    extend ActiveSupport::Concern

    included do
      alias_method_chain :host_title_actions, :xen_snap_button
    end

    def host_title_actions_with_xen_snap_button(*args)
      unless @host.compute_resource.nil?
        if @host.compute_resource.type == 'ForemanXen::Xenserver'
          title_actions(
            button_group(
              link_to(
                _('Xen Snapshots'),
                "../foreman_xen/snapshots/#{@host.id}/",
                :title => _('Manage machine snapshots'),
                :id => :xen_snap_button
              )
            )
          )
        end
      end
      host_title_actions_without_xen_snap_button(*args)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_xen-0.3.1 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.3.0 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.2.4 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.1.8 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.1.7 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.2.3 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.2.2 app/models/concerns/foreman_xen/host_helper_extensions.rb
foreman_xen-0.1.6 app/models/concerns/foreman_xen/host_helper_extensions.rb