Skip to content

Commit

Permalink
Fix link in textual_region
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed Jul 19, 2018
1 parent b7d8024 commit 58718bb
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions app/helpers/textual_mixins/textual_region.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ def textual_region
h = {:label => _("Region")}
reg = @record.miq_region
url = reg.remote_ui_url
h[:value] = if url
# TODO: Why is this link different than the others?
link_to(reg.description, url_for_only_path(:host => url,
:action => 'show',
:id => @record),
:title => _("Connect to this VM in its Region"),
:onclick => "return miqClickAndPop(this);")
else
reg.description
end
h[:value] = reg.description
if url
# this must be url_for to make sure :host is used
h[:link] = url_for(:host => url,
:action => 'show',
:id => @record)
h[:title] = _("Connect to this VM in its Region")
h[:external] = true
end
h
end
end

0 comments on commit 58718bb

Please sign in to comment.