Skip to content

Commit

Permalink
Merge pull request #6712 from h-kataria/foreman_explorer_right_cell_r…
Browse files Browse the repository at this point in the history
…eplace_fix

Render 'layouts/empty' partial correctly.

(cherry picked from commit 90ccf51)

https://bugzilla.redhat.com/show_bug.cgi?id=1741310
  • Loading branch information
mzazrivec authored and simaishi committed Jun 18, 2020
1 parent 99af0db commit fadc5cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/controllers/provider_foreman_controller.rb
Expand Up @@ -189,6 +189,7 @@ def validate_before_save?
def provider_active_tree?
x_active_tree == :configuration_manager_providers_tree
end
helper_method(:provider_active_tree?)

private

Expand Down Expand Up @@ -385,6 +386,10 @@ def update_partials(record_showing, presenter)
presenter.remove_sand
presenter.update(:main_div, r[:partial => "configuration_profile",
:locals => {:controller => controller_name}])
elsif ManageIQ::Providers::ConfigurationManager.none? && provider_active_tree?
presenter.update(:main_div, r[:partial => "layouts/empty",
:locals => {:add_message => _("Add a new Configuration Management Provider"),
:documentation => ::Settings.docs.configuration_provider}])
else
presenter.update(:main_div, r[:partial => 'layouts/x_gtl'])
end
Expand Down
7 changes: 4 additions & 3 deletions app/views/provider_foreman/explorer.html.haml
Expand Up @@ -22,10 +22,11 @@
= render(:partial => 'provider_foreman/configuration_script', :locals => {:controller => "provider_foreman"})
- else
#main_div
- if ManageIQ::Providers::ConfigurationManager.any?
= render(:partial => 'layouts/x_gtl')
- else
- if ManageIQ::Providers::ConfigurationManager.none? && provider_active_tree?
= render :partial => 'layouts/empty',
:locals => {:add_message => _("Add a new Configuration Management Provider"),
:documentation => ::Settings.docs.configuration_provider}
- else
= render(:partial => 'layouts/x_gtl')


0 comments on commit fadc5cd

Please sign in to comment.