Skip to content

Commit

Permalink
Fixes #37342 - Update foreman docs and fix specify matcher documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
girijaasoni committed Apr 12, 2024
1 parent 00f9d79 commit ee341e9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions app/helpers/foreman_ansible/ansible_plugin_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ module ForemanAnsible
# General helper for foreman_ansible
module AnsiblePluginHelper
def ansible_doc_url
major_version = ::ForemanAnsible::VERSION.split('.')[0]
'https://theforeman.org/plugins/foreman_ansible/'\
"#{major_version}.x/index.html"
'https://docs.theforeman.org/nightly/Managing_Configurations_Ansible/index-foreman-el.html'
end
end
end
3 changes: 2 additions & 1 deletion app/views/ansible_roles/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<% title _("Ansible Roles") %>

<% title_actions ansible_proxy_import(hash_for_import_ansible_roles_path),
documentation_button('#4.1ImportingRoles', :root_url => ansible_doc_url) %>
documentation_button('#Importing_Ansible_Roles_and_Variables_ansible', :root_url => ansible_doc_url) %>


<table class="<%= table_css_classes 'table-fixed' %>">
<thead>
Expand Down
2 changes: 1 addition & 1 deletion app/views/ansible_roles/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p><%= _('No Ansible Roles were found in Foreman. If you want to assign roles to your hosts,
you have to import them first.').html_safe %>
</p>
<p><%= link_to(_('Learn more about this in the documentation.'), documentation_url('#4.1ImportingRoles', :root_url => ansible_doc_url), target: '_blank') %></p>
<p><%= link_to(_('Learn more about this in the documentation.'), documentation_url('#Importing_Ansible_Roles_and_Variables_ansible', :root_url => ansible_doc_url), target: '_blank') %></p>
<div class="blank-slate-pf-secondary-action">
<%= ansible_proxy_import(hash_for_import_ansible_roles_path) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/ansible_variables/_fields.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</fieldset>
</br>
<fieldset>
<h2><%= _("Specify Matchers") %> <%= documentation_button('4.2.6SmartMatchers') %></h2>
<h2><%= _("Specify Matchers") %> <%= documentation_button('#Overriding_Ansible_Variables_in_foreman_ansible', :root_url => ansible_doc_url) %></h2>
<div class="children_fields lookup_values">
<%= render 'lookup_keys/values', :f => f, :is_param => false %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/ansible_variables/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= stylesheet 'foreman_ansible/foreman-ansible' %>

<%= title_actions display_link_if_authorized(_('New Ansible Variable'), hash_for_new_ansible_variable_path, :class => "btn btn-default no-float"),
documentation_button('#4.3Variables', :root_url => ansible_doc_url)
documentation_button('#Importing_Ansible_Roles_and_Variables_ansible', :root_url => ansible_doc_url)
%>

<table class="<%= table_css_classes 'table-fixed' %>">
Expand Down

0 comments on commit ee341e9

Please sign in to comment.