Skip to content

Commit

Permalink
Merge pull request #971 from hayesr/fix_catalog_quad
Browse files Browse the repository at this point in the history
Fix quadicons under service catalogs
(cherry picked from commit af4ea85)

https://bugzilla.redhat.com/show_bug.cgi?id=1444171
  • Loading branch information
Dan Clarizio authored and simaishi committed Apr 20, 2017
1 parent 52e95b0 commit a64f1d5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions app/helpers/quadicon_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ def flobj_img_simple(image = nil, cls = '', size = 72)
image ||= "layout/base-single.png"

content_tag(:div, :class => "flobj #{cls}") do
tag(:img, :border => 0, :src => ActionController::Base.helpers.image_path(image),
:width => size, :height => size)
image_tag(image, :size => size)
end
end

Expand Down Expand Up @@ -561,11 +560,7 @@ def render_ems_cluster_quadicon(item, options)
def render_non_listicon_single_quadicon(item, options)
output = []

img_path = if item.decorate
item.decorate.try(:fileicon)
else
"100/#{item.class.base_class.to_s.underscore}.png"
end
img_path = item.try(:decorate).try(:fileicon) || "100/#{item.class.base_class.to_s.underscore}.png"

output << flobj_img_simple("layout/base-single.png")
output << flobj_img_simple(img_path, "e72")
Expand Down

0 comments on commit a64f1d5

Please sign in to comment.