From 6e145a2f3803344f9d5412b7e75f5b093304225e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 16 May 2010 12:57:00 +0100 Subject: [PATCH] Rename css_class to link_class for consistency --- app/helpers/browse_helper.rb | 2 +- app/views/browse/_changeset_details.html.erb | 4 ++-- app/views/browse/_node_details.html.erb | 2 +- app/views/browse/_relation_member.html.erb | 2 +- app/views/browse/_way_details.html.erb | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index 28d1c4dc7..f121f2f0b 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -16,7 +16,7 @@ module BrowseHelper return name end - def css_class(type, object) + def link_class(type, object) return type + " " + h(icon_tags(object).join(' ')) end diff --git a/app/views/browse/_changeset_details.html.erb b/app/views/browse/_changeset_details.html.erb index a121df713..6e3cbdb2e 100644 --- a/app/views/browse/_changeset_details.html.erb +++ b/app/views/browse/_changeset_details.html.erb @@ -53,7 +53,7 @@ <% @nodes.each do |node| %> - + <% end %>
<%= link_to h(printable_name(node, true)), { :action => "node", :id => node.id.to_s }, :class => css_class('node', node), :title => link_title(node) %>
<%= link_to h(printable_name(node, true)), { :action => "node", :id => node.id.to_s }, :class => link_class('node', node), :title => link_title(node) %>
@@ -67,7 +67,7 @@ <% @ways.each do |way| %> - + <% end %> <%= #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members diff --git a/app/views/browse/_node_details.html.erb b/app/views/browse/_node_details.html.erb index 4d762330f..80df2cd85 100644 --- a/app/views/browse/_node_details.html.erb +++ b/app/views/browse/_node_details.html.erb @@ -13,7 +13,7 @@
<%= link_to h(printable_name(way, true)), { :action => "way", :id => way.id.to_s }, :class => css_class('way', way), :title => link_title(way) %>
<%= link_to h(printable_name(way, true)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
<% node_details.ways.each do |way| %> - + <% end %> <%= render :partial => "containing_relation", :collection => node_details.containing_relation_members %>
<%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => css_class('way', way), :title => link_title(way) %>
<%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
diff --git a/app/views/browse/_relation_member.html.erb b/app/views/browse/_relation_member.html.erb index e390eae78..951f9a1ce 100644 --- a/app/views/browse/_relation_member.html.erb +++ b/app/views/browse/_relation_member.html.erb @@ -4,7 +4,7 @@ type_str = t'browse.relation_member.type.' + relation_member.member_type.downcase %> <%= if relation_member.member_role.blank? diff --git a/app/views/browse/_way_details.html.erb b/app/views/browse/_way_details.html.erb index 149153f60..0344ebf64 100644 --- a/app/views/browse/_way_details.html.erb +++ b/app/views/browse/_way_details.html.erb @@ -8,10 +8,10 @@ <% way_details.way_nodes.each do |wn| %> <% end %> -- 2.39.5
- <%= link_to h(printable_name(wn.node)), { :action => "node", :id => wn.node_id.to_s }, :class => css_class('node', wn.node), :title => link_title(wn.node) %> + <%= link_to h(printable_name(wn.node)), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node) %> <% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %> <% if related_ways.size > 0 then %> - (<%= t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => css_class('way', w), :title => link_title(w) ) }.to_sentence %>) + (<%= t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>) <% end %>