Module: ForemanDatacenter::ApplicationHelper
- Defined in:
- app/helpers/foreman_datacenter/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#documentation_url(section = "", options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/helpers/foreman_datacenter/application_helper.rb', line 12 def documentation_url(section = "", = {}) if request.env['PATH_INFO'].include?("datacenter") root_url = [:root_url] || "https://github.com/theforeman/foreman_datacenter/wiki" if section.empty? "https://github.com/theforeman/foreman_datacenter/wiki" else root_url + section end else super end end |
#help_button ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/helpers/foreman_datacenter/application_helper.rb', line 4 def if request.env['PATH_INFO'].include?("datacenter") link_to(_("Help"), { :action => "welcome" }, { :class => 'btn btn-default' }) if File.exist?("#{ForemanDatacenter::Engine.root}/app/views/foreman_datacenter/#{controller_name}/welcome.html.erb") else super end end |