Skip to content

Commit

Permalink
Refactored to calculate name once, instead of twice with 2 different …
Browse files Browse the repository at this point in the history
…coding styles
  • Loading branch information
chessbyte committed Mar 9, 2015
1 parent fe6f496 commit 3995fdb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vmdb/app/views/layouts/quadicon/_single_quad.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
- unless typ == :listnav
- # Listnav, no clear image needed
.flobj
- name = item.kind_of?(MiqCimInstance) ? item.evm_display_name : item.name
- if !@embedded || @showlinks
- if item.class.base_class.to_s == "MiqCimInstance"
- name = item.evm_display_name
- else
- name = item.name
- if @explorer
= link_to(image_tag("/images/icons/#{size}/reflection.png", :width => size, :height => size, :title => h(name)),
{:action => 'x_show', :id => to_cid(item.id)},
Expand All @@ -29,7 +26,6 @@
%a{:href => url_for_record(item), :title => h(name)}
%img{:src => "/images/clearpix.gif", :width => size, :height => size}
- else
- name = item.class.base_class.to_s == "MiqCimInstance" ? item.evm_display_name : item.name
%a{:title => h(name)}
%img{:src => "/images/clearpix.gif", :width => size, :height => size}
- else
Expand Down

0 comments on commit 3995fdb

Please sign in to comment.