Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed method list_row_image to pass the item as opposed to item.name
The controller that overrides list_row_image will then retrieve the
appropriate attribute from item.

https://bugzilla.redhat.com/show_bug.cgi?id=1229431
  • Loading branch information
AparnaKarve committed Jun 8, 2015
1 parent a4af792 commit af7f013
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions vmdb/app/controllers/application_controller.rb
Expand Up @@ -1210,7 +1210,7 @@ def listicon_image(view)
"../../../pictures/#{item.picture.basename}"
end
end
list_row_image(pn, image, (@listicon || view.db).underscore, item.name)
list_row_image(pn, image, (@listicon || view.db).underscore, item)
end

def get_host_for_vm(vm)
Expand Down Expand Up @@ -2713,8 +2713,8 @@ def list_row_id(row)
to_cid(row['id'])
end

def list_row_image(image_path, image, model_image, _itemname)
image ? image : "#{image_path}#{model_image}.png"
def list_row_image(image_path, image, model_image, _item)
image || "#{image_path}#{model_image}.png"
end

def render_flash_not_applicable_to_model(type)
Expand Down
4 changes: 2 additions & 2 deletions vmdb/app/controllers/provider_foreman_controller.rb
Expand Up @@ -851,8 +851,8 @@ def list_row_id(row)
end
end

def list_row_image(image_path, image, model_image, itemname)
if itemname == _("Unassigned Profiles Group")
def list_row_image(image_path, image, model_image, item)
if item.name == _("Unassigned Profiles Group")
image_path ? "#{image_path}folder.png" : "folder"
else
super
Expand Down

0 comments on commit af7f013

Please sign in to comment.