Skip to content

Commit

Permalink
Remove unnecessary <b> tags around = and / symbols
Browse files Browse the repository at this point in the history
* not noticeable
* looks bad
* unnecessary gettext around it
* unnecessary html_safe
  • Loading branch information
skateman committed Jan 4, 2017
1 parent a32136d commit 0851bb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions app/presenters/tree_builder_automate_simulation_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ def choose_correct_attr(el, attrs)

def get_element_title(el)
titles = {
:MiqAeObject => "#{el.attributes["namespace"]} <b>/</b> "\
"#{el.attributes["class"]} <b>/</b> "\
"#{el.attributes["instance"]}",
:MiqAeObject => "#{el.attributes["namespace"]} / #{el.attributes["class"]} / #{el.attributes["instance"]}",
:MiqAeAttribute => el.attributes["name"],
:not_blank => el.text,
:other => el.name,
Expand All @@ -71,9 +69,9 @@ def get_element_icon(el)
def get_root_elements(el, idx)
title = get_element_title(el)
object = {:id => "e_#{idx}",
:text => _(title).html_safe,
:text => title,
:image => get_element_icon(el),
:tip => _(title).html_safe,
:tip => title,
:elements => el.each_element { |e| e },
:cfmeNoClick => true
}
Expand All @@ -89,7 +87,7 @@ def x_get_tree_hash_kids(parent, count_only)
:id => "a_#{idx}",
:image => "100/attribute.png",
:cfmeNoClick => true,
:text => "#{k.first} <b>=</b> #{k.last}".html_safe
:text => "#{k.first} = #{k.last}"
}
kids.push(object)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
it 'sets attribute nodes correctly' do
nodes = @ae_simulation_tree.send(:x_get_tree_roots, false)
tree_data = {:id => "e_1",
:text => "ManageIQ/SYSTEM <b>/</b> PROCESS <b>/</b> Automation",
:text => "ManageIQ/SYSTEM / PROCESS / Automation",
:image => "100/q.png",
:tip => "ManageIQ/SYSTEM <b>/</b> PROCESS <b>/</b> Automation",
:tip => "ManageIQ/SYSTEM / PROCESS / Automation",
:elements => [],
:cfmeNoClick => true
}
Expand Down

0 comments on commit 0851bb0

Please sign in to comment.