Sha256: 7644d7c0c30641834936c6abca65e9ad2b102d971185b951ed1f23831199c761

Contents?: true

Size: 613 Bytes

Versions: 30

Compression:

Stored size: 613 Bytes

Contents

require 'foreman_openscap/version'

module ForemanOpenscapHelper
  def scap_doc_link(section = '', text = _('documentation'))
    link_to(
      text,
      scap_doc_url(section),
      :rel => 'external noopener noreferrer', :target => '_blank'
    )
  end

  def scap_doc_url(section = '')
    return scap_root_url if section.empty?

    documentation_url(section, root_url: scap_root_url)
  end

  def scap_root_url
    @scap_root_url ||= begin
      version = ForemanOpenscap::VERSION.split('.')[0..-2].join('.')
      "https://theforeman.org/plugins/foreman_openscap/#{version}/index.html"
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
foreman_openscap-7.0.0 app/helpers/foreman_openscap_helper.rb
foreman_openscap-6.0.0 app/helpers/foreman_openscap_helper.rb
foreman_openscap-5.2.3 app/helpers/foreman_openscap_helper.rb
foreman_openscap-5.2.2 app/helpers/foreman_openscap_helper.rb
foreman_openscap-5.1.1 app/helpers/foreman_openscap_helper.rb
foreman_openscap-5.2.1 app/helpers/foreman_openscap_helper.rb
foreman_openscap-5.2.0 app/helpers/foreman_openscap_helper.rb
foreman_openscap-5.1.0 app/helpers/foreman_openscap_helper.rb
foreman_openscap-5.0.0 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.3.3 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.3.2 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.3.1 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.3.0 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.1.3 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.0.6 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.2.0 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.0.5 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.1.2 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.1.1 app/helpers/foreman_openscap_helper.rb
foreman_openscap-4.1.0 app/helpers/foreman_openscap_helper.rb