From: Dan Karran Date: Tue, 20 Apr 2010 08:08:51 +0000 (+0100) Subject: Patch from bug #2787 to add icons to data browser pages X-Git-Tag: live~7152^2~4 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/10dca1b6dfa11f6b40a58facad74434fa4295fbd Patch from bug #2787 to add icons to data browser pages --- diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index ff702aed1..54c99f560 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -2,7 +2,7 @@ module BrowseHelper def link_to_page(page, page_param) return link_to(page, page_param => page) end - + def printable_name(object, version=false) name = t 'printable_name.with_id', :id => object.id.to_s if version @@ -16,6 +16,16 @@ module BrowseHelper return name end + def css_class(type, object) + css = type + " " + h(object.tags.find_all { |k,v| k == "aeroway" || k == "amenity" || k == "barrier" || k == "building" || k == "highway" || k == "landuse" || k == "leisure" || k == "man_made" || k == "natural" || k == "railway" || k == "shop" || k == "tourism" || k == "waterway" }.join(' ')) + return css + end + + def link_title(object) + title = h(object.tags.map { |k,v| k + '=' + v }.to_sentence) + return title + end + def format_key(key) if url = wiki_link("key", key) link_to h(key), url, :title => t('browse.tag_details.wiki_link.key', :key => key) diff --git a/app/views/browse/_changeset_details.html.erb b/app/views/browse/_changeset_details.html.erb index 24d5da08c..a121df713 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 %>
<%= link_to h(printable_name(node, true)), { :action => "node", :id => node.id.to_s }, :class => css_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 @@ -84,7 +84,7 @@ diff --git a/app/views/browse/_node_details.html.erb b/app/views/browse/_node_details.html.erb index 7982e6805..4d762330f 100644 --- a/app/views/browse/_node_details.html.erb +++ b/app/views/browse/_node_details.html.erb @@ -13,7 +13,7 @@ - + %> + diff --git a/app/views/browse/_way_details.html.erb b/app/views/browse/_way_details.html.erb index 917582f82..149153f60 100644 --- a/app/views/browse/_way_details.html.erb +++ b/app/views/browse/_way_details.html.erb @@ -8,10 +8,10 @@
<%= link_to h(printable_name(way, true)), :action => "way", :id => way.id.to_s %>
<%= link_to h(printable_name(way, true)), { :action => "way", :id => way.id.to_s }, :class => css_class('way', way), :title => link_title(way) %>
<% @relations.each do |relation| %> - + <% end %>
<%= link_to h(printable_name(relation, true)), :action => "relation", :id => relation.id.to_s %>
<%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.id.to_s }, :class => "relation " %>
<% 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 %>
<%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => css_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 cee2e0e75..e390eae78 100644 --- a/app/views/browse/_relation_member.html.erb +++ b/app/views/browse/_relation_member.html.erb @@ -1,12 +1,17 @@
<%= - linked_name = link_to h(printable_name(relation_member.member)), :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s - type_str = t'browse.relation_member.type.' + relation_member.member_type.downcase - + <% + linked_name = link_to h(printable_name(relation_member.member)), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, :title => link_title(relation_member.member) + type_str = t'browse.relation_member.type.' + relation_member.member_type.downcase + %> + + <%= if relation_member.member_role.blank? t'browse.relation_member.entry', :type => type_str, :name => linked_name else t'browse.relation_member.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role) end - %>
<% way_details.way_nodes.each do |wn| %> <% end %> diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index c17255709..d93522c73 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -7,6 +7,7 @@ <%= javascript_include_tag 'site' %> <%= stylesheet_link_tag 'common' %> + <%= stylesheet_link_tag 'browser-icons' %> <%= stylesheet_link_tag 'small', :media => "only screen and (max-width: 481px)" %> <%= stylesheet_link_tag 'large', :media => "screen and (min-width: 482px)" %> diff --git a/public/images/browser-icons/allotments.png b/public/images/browser-icons/allotments.png new file mode 100644 index 000000000..bc8d3fe96 Binary files /dev/null and b/public/images/browser-icons/allotments.png differ diff --git a/public/images/browser-icons/alpinehut.p.16.png b/public/images/browser-icons/alpinehut.p.16.png new file mode 100644 index 000000000..84b09771b Binary files /dev/null and b/public/images/browser-icons/alpinehut.p.16.png differ diff --git a/public/images/browser-icons/atm2.p.16.png b/public/images/browser-icons/atm2.p.16.png new file mode 100644 index 000000000..62caf207e Binary files /dev/null and b/public/images/browser-icons/atm2.p.16.png differ diff --git a/public/images/browser-icons/bank2.p.16.png b/public/images/browser-icons/bank2.p.16.png new file mode 100644 index 000000000..a7d30e86d Binary files /dev/null and b/public/images/browser-icons/bank2.p.16.png differ diff --git a/public/images/browser-icons/bar.p.16.png b/public/images/browser-icons/bar.p.16.png new file mode 100644 index 000000000..201d66a03 Binary files /dev/null and b/public/images/browser-icons/bar.p.16.png differ diff --git a/public/images/browser-icons/bridge.20.png b/public/images/browser-icons/bridge.20.png new file mode 100644 index 000000000..ed4808440 Binary files /dev/null and b/public/images/browser-icons/bridge.20.png differ diff --git a/public/images/browser-icons/bridleway.20.png b/public/images/browser-icons/bridleway.20.png new file mode 100644 index 000000000..bb46bcb8e Binary files /dev/null and b/public/images/browser-icons/bridleway.20.png differ diff --git a/public/images/browser-icons/brownfield.png b/public/images/browser-icons/brownfield.png new file mode 100644 index 000000000..76d94ccee Binary files /dev/null and b/public/images/browser-icons/brownfield.png differ diff --git a/public/images/browser-icons/building.png b/public/images/browser-icons/building.png new file mode 100644 index 000000000..189bbe928 Binary files /dev/null and b/public/images/browser-icons/building.png differ diff --git a/public/images/browser-icons/bus_station.n.16.png b/public/images/browser-icons/bus_station.n.16.png new file mode 100644 index 000000000..5224dd119 Binary files /dev/null and b/public/images/browser-icons/bus_station.n.16.png differ diff --git a/public/images/browser-icons/bus_stop.p.16.png b/public/images/browser-icons/bus_stop.p.16.png new file mode 100644 index 000000000..7d9d5e8b6 Binary files /dev/null and b/public/images/browser-icons/bus_stop.p.16.png differ diff --git a/public/images/browser-icons/byway.20.png b/public/images/browser-icons/byway.20.png new file mode 100644 index 000000000..fb98d24e9 Binary files /dev/null and b/public/images/browser-icons/byway.20.png differ diff --git a/public/images/browser-icons/cafe.p.16.png b/public/images/browser-icons/cafe.p.16.png new file mode 100644 index 000000000..836f8a540 Binary files /dev/null and b/public/images/browser-icons/cafe.p.16.png differ diff --git a/public/images/browser-icons/camping.n.16.png b/public/images/browser-icons/camping.n.16.png new file mode 100644 index 000000000..b76912566 Binary files /dev/null and b/public/images/browser-icons/camping.n.16.png differ diff --git a/public/images/browser-icons/car_share.p.16.png b/public/images/browser-icons/car_share.p.16.png new file mode 100644 index 000000000..1dcc537f6 Binary files /dev/null and b/public/images/browser-icons/car_share.p.16.png differ diff --git a/public/images/browser-icons/caravan_park.p.24.png b/public/images/browser-icons/caravan_park.p.24.png new file mode 100644 index 000000000..751f5204b Binary files /dev/null and b/public/images/browser-icons/caravan_park.p.24.png differ diff --git a/public/images/browser-icons/cemetery.png b/public/images/browser-icons/cemetery.png new file mode 100644 index 000000000..6d6d07222 Binary files /dev/null and b/public/images/browser-icons/cemetery.png differ diff --git a/public/images/browser-icons/centre.png b/public/images/browser-icons/centre.png new file mode 100644 index 000000000..10661ae4a Binary files /dev/null and b/public/images/browser-icons/centre.png differ diff --git a/public/images/browser-icons/cinema.p.16.png b/public/images/browser-icons/cinema.p.16.png new file mode 100644 index 000000000..21f7dcb65 Binary files /dev/null and b/public/images/browser-icons/cinema.p.16.png differ diff --git a/public/images/browser-icons/commercial.png b/public/images/browser-icons/commercial.png new file mode 100644 index 000000000..0d2d27c14 Binary files /dev/null and b/public/images/browser-icons/commercial.png differ diff --git a/public/images/browser-icons/common.png b/public/images/browser-icons/common.png new file mode 100644 index 000000000..b2c4de826 Binary files /dev/null and b/public/images/browser-icons/common.png differ diff --git a/public/images/browser-icons/cycleway.20.png b/public/images/browser-icons/cycleway.20.png new file mode 100644 index 000000000..a75255098 Binary files /dev/null and b/public/images/browser-icons/cycleway.20.png differ diff --git a/public/images/browser-icons/drinkingtap.p.16.png b/public/images/browser-icons/drinkingtap.p.16.png new file mode 100644 index 000000000..b9baef7b7 Binary files /dev/null and b/public/images/browser-icons/drinkingtap.p.16.png differ diff --git a/public/images/browser-icons/farm.png b/public/images/browser-icons/farm.png new file mode 100644 index 000000000..5b6f0bcfd Binary files /dev/null and b/public/images/browser-icons/farm.png differ diff --git a/public/images/browser-icons/fast_food.p.16.png b/public/images/browser-icons/fast_food.p.16.png new file mode 100644 index 000000000..28e78bfec Binary files /dev/null and b/public/images/browser-icons/fast_food.p.16.png differ diff --git a/public/images/browser-icons/firestation.p.16.png b/public/images/browser-icons/firestation.p.16.png new file mode 100644 index 000000000..cf2455922 Binary files /dev/null and b/public/images/browser-icons/firestation.p.16.png differ diff --git a/public/images/browser-icons/footway.20.png b/public/images/browser-icons/footway.20.png new file mode 100644 index 000000000..5f69d00f1 Binary files /dev/null and b/public/images/browser-icons/footway.20.png differ diff --git a/public/images/browser-icons/forest.png b/public/images/browser-icons/forest.png new file mode 100644 index 000000000..7e37c5df6 Binary files /dev/null and b/public/images/browser-icons/forest.png differ diff --git a/public/images/browser-icons/fuel.p.16.png b/public/images/browser-icons/fuel.p.16.png new file mode 100644 index 000000000..7bab32a4d Binary files /dev/null and b/public/images/browser-icons/fuel.p.16.png differ diff --git a/public/images/browser-icons/gate2.p.16.png b/public/images/browser-icons/gate2.p.16.png new file mode 100644 index 000000000..cee412c89 Binary files /dev/null and b/public/images/browser-icons/gate2.p.16.png differ diff --git a/public/images/browser-icons/golf.png b/public/images/browser-icons/golf.png new file mode 100644 index 000000000..f05ff255a Binary files /dev/null and b/public/images/browser-icons/golf.png differ diff --git a/public/images/browser-icons/halt.p.16.png b/public/images/browser-icons/halt.p.16.png new file mode 100644 index 000000000..fbea173c3 Binary files /dev/null and b/public/images/browser-icons/halt.p.16.png differ diff --git a/public/images/browser-icons/heathland.png b/public/images/browser-icons/heathland.png new file mode 100644 index 000000000..9342b56da Binary files /dev/null and b/public/images/browser-icons/heathland.png differ diff --git a/public/images/browser-icons/hospital.p.16.png b/public/images/browser-icons/hospital.p.16.png new file mode 100644 index 000000000..dd4febf2b Binary files /dev/null and b/public/images/browser-icons/hospital.p.16.png differ diff --git a/public/images/browser-icons/hostel.p.16.png b/public/images/browser-icons/hostel.p.16.png new file mode 100644 index 000000000..ddab301d1 Binary files /dev/null and b/public/images/browser-icons/hostel.p.16.png differ diff --git a/public/images/browser-icons/hotel.p.16.png b/public/images/browser-icons/hotel.p.16.png new file mode 100644 index 000000000..cd2ba1620 Binary files /dev/null and b/public/images/browser-icons/hotel.p.16.png differ diff --git a/public/images/browser-icons/industrial.png b/public/images/browser-icons/industrial.png new file mode 100644 index 000000000..e90e4633d Binary files /dev/null and b/public/images/browser-icons/industrial.png differ diff --git a/public/images/browser-icons/lake.png b/public/images/browser-icons/lake.png new file mode 100644 index 000000000..78cdd020c Binary files /dev/null and b/public/images/browser-icons/lake.png differ diff --git a/public/images/browser-icons/level_crossing.p.16.png b/public/images/browser-icons/level_crossing.p.16.png new file mode 100644 index 000000000..27448359f Binary files /dev/null and b/public/images/browser-icons/level_crossing.p.16.png differ diff --git a/public/images/browser-icons/library.p.16.png b/public/images/browser-icons/library.p.16.png new file mode 100644 index 000000000..4e42a73ce Binary files /dev/null and b/public/images/browser-icons/library.p.16.png differ diff --git a/public/images/browser-icons/light_rail.20.png b/public/images/browser-icons/light_rail.20.png new file mode 100644 index 000000000..7f65a6271 Binary files /dev/null and b/public/images/browser-icons/light_rail.20.png differ diff --git a/public/images/browser-icons/lighthouse.p.16.png b/public/images/browser-icons/lighthouse.p.16.png new file mode 100644 index 000000000..96ffd440c Binary files /dev/null and b/public/images/browser-icons/lighthouse.p.16.png differ diff --git a/public/images/browser-icons/military.png b/public/images/browser-icons/military.png new file mode 100644 index 000000000..54741f3d2 Binary files /dev/null and b/public/images/browser-icons/military.png differ diff --git a/public/images/browser-icons/mini_round.p.16.png b/public/images/browser-icons/mini_round.p.16.png new file mode 100644 index 000000000..1448b3ee2 Binary files /dev/null and b/public/images/browser-icons/mini_round.p.16.png differ diff --git a/public/images/browser-icons/motorway.20.png b/public/images/browser-icons/motorway.20.png new file mode 100644 index 000000000..c89fa12a8 Binary files /dev/null and b/public/images/browser-icons/motorway.20.png differ diff --git a/public/images/browser-icons/museum.p.16.png b/public/images/browser-icons/museum.p.16.png new file mode 100644 index 000000000..c58d30683 Binary files /dev/null and b/public/images/browser-icons/museum.p.16.png differ diff --git a/public/images/browser-icons/park.png b/public/images/browser-icons/park.png new file mode 100644 index 000000000..fac6f1fb9 Binary files /dev/null and b/public/images/browser-icons/park.png differ diff --git a/public/images/browser-icons/parking.p.16.png b/public/images/browser-icons/parking.p.16.png new file mode 100644 index 000000000..5860900cf Binary files /dev/null and b/public/images/browser-icons/parking.p.16.png differ diff --git a/public/images/browser-icons/pharmacy.p.16.png b/public/images/browser-icons/pharmacy.p.16.png new file mode 100644 index 000000000..fb1c56c86 Binary files /dev/null and b/public/images/browser-icons/pharmacy.p.16.png differ diff --git a/public/images/browser-icons/pitch.png b/public/images/browser-icons/pitch.png new file mode 100644 index 000000000..68333b7a4 Binary files /dev/null and b/public/images/browser-icons/pitch.png differ diff --git a/public/images/browser-icons/place_of_worship.png b/public/images/browser-icons/place_of_worship.png new file mode 100644 index 000000000..95494f59c Binary files /dev/null and b/public/images/browser-icons/place_of_worship.png differ diff --git a/public/images/browser-icons/police.p.16.png b/public/images/browser-icons/police.p.16.png new file mode 100644 index 000000000..2dd87aaf2 Binary files /dev/null and b/public/images/browser-icons/police.p.16.png differ diff --git a/public/images/browser-icons/post_box.p.16.png b/public/images/browser-icons/post_box.p.16.png new file mode 100644 index 000000000..3119cc135 Binary files /dev/null and b/public/images/browser-icons/post_box.p.16.png differ diff --git a/public/images/browser-icons/post_office.p.16.png b/public/images/browser-icons/post_office.p.16.png new file mode 100644 index 000000000..743255eb0 Binary files /dev/null and b/public/images/browser-icons/post_office.p.16.png differ diff --git a/public/images/browser-icons/primary.20.png b/public/images/browser-icons/primary.20.png new file mode 100644 index 000000000..668e25d71 Binary files /dev/null and b/public/images/browser-icons/primary.20.png differ diff --git a/public/images/browser-icons/prison.p.16.png b/public/images/browser-icons/prison.p.16.png new file mode 100644 index 000000000..4b2fc4015 Binary files /dev/null and b/public/images/browser-icons/prison.p.16.png differ diff --git a/public/images/browser-icons/pub.p.16.png b/public/images/browser-icons/pub.p.16.png new file mode 100644 index 000000000..b452a7ead Binary files /dev/null and b/public/images/browser-icons/pub.p.16.png differ diff --git a/public/images/browser-icons/rail.20.png b/public/images/browser-icons/rail.20.png new file mode 100644 index 000000000..f93a6ef8a Binary files /dev/null and b/public/images/browser-icons/rail.20.png differ diff --git a/public/images/browser-icons/recycling.p.16.png b/public/images/browser-icons/recycling.p.16.png new file mode 100644 index 000000000..59eb331aa Binary files /dev/null and b/public/images/browser-icons/recycling.p.16.png differ diff --git a/public/images/browser-icons/rental_bicycle.p.20.png b/public/images/browser-icons/rental_bicycle.p.20.png new file mode 100644 index 000000000..4bb10e00a Binary files /dev/null and b/public/images/browser-icons/rental_bicycle.p.20.png differ diff --git a/public/images/browser-icons/reserve.png b/public/images/browser-icons/reserve.png new file mode 100644 index 000000000..cf16376f6 Binary files /dev/null and b/public/images/browser-icons/reserve.png differ diff --git a/public/images/browser-icons/residential.png b/public/images/browser-icons/residential.png new file mode 100644 index 000000000..67c2e34e0 Binary files /dev/null and b/public/images/browser-icons/residential.png differ diff --git a/public/images/browser-icons/restaurant.p.16.png b/public/images/browser-icons/restaurant.p.16.png new file mode 100644 index 000000000..5c410087b Binary files /dev/null and b/public/images/browser-icons/restaurant.p.16.png differ diff --git a/public/images/browser-icons/retail.png b/public/images/browser-icons/retail.png new file mode 100644 index 000000000..cc9621111 Binary files /dev/null and b/public/images/browser-icons/retail.png differ diff --git a/public/images/browser-icons/runway.20.png b/public/images/browser-icons/runway.20.png new file mode 100644 index 000000000..dac187ff1 Binary files /dev/null and b/public/images/browser-icons/runway.20.png differ diff --git a/public/images/browser-icons/school.png b/public/images/browser-icons/school.png new file mode 100644 index 000000000..ea35d02aa Binary files /dev/null and b/public/images/browser-icons/school.png differ diff --git a/public/images/browser-icons/secondary.20.png b/public/images/browser-icons/secondary.20.png new file mode 100644 index 000000000..f6a758ed9 Binary files /dev/null and b/public/images/browser-icons/secondary.20.png differ diff --git a/public/images/browser-icons/shelter2.p.16.png b/public/images/browser-icons/shelter2.p.16.png new file mode 100644 index 000000000..09ea53054 Binary files /dev/null and b/public/images/browser-icons/shelter2.p.16.png differ diff --git a/public/images/browser-icons/shop_bakery.p.16.png b/public/images/browser-icons/shop_bakery.p.16.png new file mode 100644 index 000000000..89de12eb5 Binary files /dev/null and b/public/images/browser-icons/shop_bakery.p.16.png differ diff --git a/public/images/browser-icons/shop_clothes.p.16.png b/public/images/browser-icons/shop_clothes.p.16.png new file mode 100644 index 000000000..b028a1cde Binary files /dev/null and b/public/images/browser-icons/shop_clothes.p.16.png differ diff --git a/public/images/browser-icons/shop_convenience.p.16.png b/public/images/browser-icons/shop_convenience.p.16.png new file mode 100644 index 000000000..2fc7584d5 Binary files /dev/null and b/public/images/browser-icons/shop_convenience.p.16.png differ diff --git a/public/images/browser-icons/shop_diy.p.16.png b/public/images/browser-icons/shop_diy.p.16.png new file mode 100644 index 000000000..b1954ab91 Binary files /dev/null and b/public/images/browser-icons/shop_diy.p.16.png differ diff --git a/public/images/browser-icons/shop_hairdresser.p.16.png b/public/images/browser-icons/shop_hairdresser.p.16.png new file mode 100644 index 000000000..aa783f260 Binary files /dev/null and b/public/images/browser-icons/shop_hairdresser.p.16.png differ diff --git a/public/images/browser-icons/shop_supermarket.p.16.png b/public/images/browser-icons/shop_supermarket.p.16.png new file mode 100644 index 000000000..3b4338a96 Binary files /dev/null and b/public/images/browser-icons/shop_supermarket.p.16.png differ diff --git a/public/images/browser-icons/station.p.16.png b/public/images/browser-icons/station.p.16.png new file mode 100644 index 000000000..f10492d70 Binary files /dev/null and b/public/images/browser-icons/station.p.16.png differ diff --git a/public/images/browser-icons/subway.20.png b/public/images/browser-icons/subway.20.png new file mode 100644 index 000000000..56b89b03d Binary files /dev/null and b/public/images/browser-icons/subway.20.png differ diff --git a/public/images/browser-icons/taxiway.20.png b/public/images/browser-icons/taxiway.20.png new file mode 100644 index 000000000..3fb1dba7a Binary files /dev/null and b/public/images/browser-icons/taxiway.20.png differ diff --git a/public/images/browser-icons/telephone.p.16.png b/public/images/browser-icons/telephone.p.16.png new file mode 100644 index 000000000..29378e44b Binary files /dev/null and b/public/images/browser-icons/telephone.p.16.png differ diff --git a/public/images/browser-icons/theatre.p.16.png b/public/images/browser-icons/theatre.p.16.png new file mode 100644 index 000000000..6e0feab5c Binary files /dev/null and b/public/images/browser-icons/theatre.p.16.png differ diff --git a/public/images/browser-icons/toilets.p.16.png b/public/images/browser-icons/toilets.p.16.png new file mode 100644 index 000000000..353208cf7 Binary files /dev/null and b/public/images/browser-icons/toilets.p.16.png differ diff --git a/public/images/browser-icons/tourist.png b/public/images/browser-icons/tourist.png new file mode 100644 index 000000000..c70be84d7 Binary files /dev/null and b/public/images/browser-icons/tourist.png differ diff --git a/public/images/browser-icons/traffic_light.png b/public/images/browser-icons/traffic_light.png new file mode 100644 index 000000000..1c2b3ca7b Binary files /dev/null and b/public/images/browser-icons/traffic_light.png differ diff --git a/public/images/browser-icons/tram.20.png b/public/images/browser-icons/tram.20.png new file mode 100644 index 000000000..092ec65e5 Binary files /dev/null and b/public/images/browser-icons/tram.20.png differ diff --git a/public/images/browser-icons/tree.p.16.png b/public/images/browser-icons/tree.p.16.png new file mode 100644 index 000000000..c8c3067af Binary files /dev/null and b/public/images/browser-icons/tree.p.16.png differ diff --git a/public/images/browser-icons/trunk.20.png b/public/images/browser-icons/trunk.20.png new file mode 100644 index 000000000..25b374f36 Binary files /dev/null and b/public/images/browser-icons/trunk.20.png differ diff --git a/public/images/browser-icons/tunnel.20.png b/public/images/browser-icons/tunnel.20.png new file mode 100644 index 000000000..49cd98f19 Binary files /dev/null and b/public/images/browser-icons/tunnel.20.png differ diff --git a/public/images/browser-icons/turning_circle.p.16.png b/public/images/browser-icons/turning_circle.p.16.png new file mode 100644 index 000000000..d29def0ff Binary files /dev/null and b/public/images/browser-icons/turning_circle.p.16.png differ diff --git a/public/images/browser-icons/unclassified.20.png b/public/images/browser-icons/unclassified.20.png new file mode 100644 index 000000000..2f687c171 Binary files /dev/null and b/public/images/browser-icons/unclassified.20.png differ diff --git a/public/images/browser-icons/view_point.p.16.png b/public/images/browser-icons/view_point.p.16.png new file mode 100644 index 000000000..b18660c86 Binary files /dev/null and b/public/images/browser-icons/view_point.p.16.png differ diff --git a/public/images/browser-icons/wood.png b/public/images/browser-icons/wood.png new file mode 100644 index 000000000..1bebdfa47 Binary files /dev/null and b/public/images/browser-icons/wood.png differ diff --git a/public/stylesheets/browser-icons.css b/public/stylesheets/browser-icons.css new file mode 100644 index 000000000..ebfb3e0f3 --- /dev/null +++ b/public/stylesheets/browser-icons.css @@ -0,0 +1,107 @@ +.node { padding-left: 25px; } +.way { padding-left: 25px; } + +/* Nodes */ +.aeroway.aerodrome { background: url(/images/browser-icons/aerodrome.p.16.png) no-repeat center left; } + +.amenity.atm { background: url(/images/browser-icons/atm2.p.16.png) no-repeat center left; } +.amenity.bank { background: url(/images/browser-icons/bank2.p.16.png) no-repeat center left; } +.amenity.bar { background: url(/images/browser-icons/bar.p.16.png) no-repeat center left; } +.amenity.bicycle_rental { background: url(/images/browser-icons/rental_bicycle.p.20.png) no-repeat center left; } +.amenity.bus_station { background: url(/images/browser-icons/bus_station.n.16.png) no-repeat center left; } +.amenity.cafe { background: url(/images/browser-icons/cafe.p.16.png) no-repeat center left; } +.amenity.car_sharing { background: url(/images/browser-icons/car_share.p.16.png) no-repeat center left; } +.amenity.cinema { background: url(/images/browser-icons/cinema.p.16.png) no-repeat center left; } +.amenity.drinking_water { background: url(/images/browser-icons/drinkingtap.p.16.png) no-repeat center left; } +.amenity.fast_food { background: url(/images/browser-icons/fast_food.p.16.png) no-repeat center left; } +.amenity.fire_station { background: url(/images/browser-icons/firestation.p.16.png) no-repeat center left; } +.amenity.fuel { background: url(/images/browser-icons/fuel.p.16.png) no-repeat center left; } +.amenity.hospital { background: url(/images/browser-icons/hospital.p.16.png) no-repeat center left; } +.amenity.library { background: url(/images/browser-icons/library.p.16.png) no-repeat center left; } +.amenity.parking { background: url(/images/browser-icons/parking.p.16.png) no-repeat center left; } +.amenity.pharmacy { background: url(/images/browser-icons/pharmacy.p.16.png) no-repeat center left; } +.amenity.place_of_worship { background: url(/images/browser-icons/place_of_worship.png) no-repeat center left; } +.amenity.police { background: url(/images/browser-icons/police.p.16.png) no-repeat center left; } +.amenity.post_box { background: url(/images/browser-icons/post_box.p.16.png) no-repeat center left; } +.amenity.post_office { background: url(/images/browser-icons/post_office.p.16.png) no-repeat center left; } +.amenity.prison { background: url(/images/browser-icons/prison.p.16.png) no-repeat center left; } +.amenity.pub { background: url(/images/browser-icons/pub.p.16.png) no-repeat center left; } +.amenity.restaurant { background: url(/images/browser-icons/restaurant.p.16.png) no-repeat center left; } +.amenity.recycling { background: url(/images/browser-icons/recycling.p.16.png) no-repeat center left; } +.amenity.shelter { background: url(/images/browser-icons/shelter2.p.16.png) no-repeat center left; } +.amenity.telephone { background: url(/images/browser-icons/telephone.p.16.png) no-repeat center left; } +.amenity.theatre { background: url(/images/browser-icons/theatre.p.16.png) no-repeat center left; } +.amenity.toilets { background: url(/images/browser-icons/toilets.p.16.png) no-repeat center left; } + +.barrier.gate { background: url(/images/browser-icons/gate2.p.16.png) no-repeat center left; } + +.highway.bus_stop { background: url(/images/browser-icons/bus_stop.p.16.png) no-repeat center left; } +.highway.mini_roundabout { background: url(/images/browser-icons/mini_round.p.16.png) no-repeat center left; } +.highway.traffic_signals { background: url(/images/browser-icons/traffic_light.png) no-repeat center left; } +.highway.turning_circle { background: url(/images/browser-icons/turning_circle.p.16.png) no-repeat center left; } + +.man_made.lighthouse { background: url(/images/browser-icons/lighthouse.p.16.png) no-repeat center left; } + +.natural.tree { background: url(/images/browser-icons/tree.p.16.png) no-repeat center left; } + +.railway.halt { background: url(/images/browser-icons/halt.p.16.png) no-repeat center left; } +.railway.station { background: url(/images/browser-icons/station.p.16.png) no-repeat center left; } +.railway.level_crossing { background: url(/images/browser-icons/level_crossing.p.16.png) no-repeat center left; } + +.shop { background: url(/images/browser-icons/shop_convenience.p.16.png) no-repeat center left; } +.shop.bakery { background: url(/images/browser-icons/shop_bakery.p.16.png) no-repeat center left; } +.shop.clothes { background: url(/images/browser-icons/shop_clothes.p.16.png) no-repeat center left; } +.shop.convenience { background: url(/images/browser-icons/shop_convenience.p.16.png) no-repeat center left; } +.shop.diy { background: url(/images/browser-icons/shop_diy.p.16.png) no-repeat center left; } +.shop.hairdresser { background: url(/images/browser-icons/shop_hairdresser.p.16.png) no-repeat center left; } +.shop.supermarket { background: url(/images/browser-icons/shop_supermarket.p.16.png) no-repeat center left; } + +.tourism.alpine_hut { background: url(/images/browser-icons/alpinehut.p.16.png) no-repeat center left; } +.tourism.camp_site { background: url(/images/browser-icons/camping.n.16.png) no-repeat center left; } +.tourism.caravan_site { background: url(/images/browser-icons/caravan_park.n.16.png) no-repeat center left; } +.tourism.hostel { background: url(/images/browser-icons/hostel.p.16.png) no-repeat center left; } +.tourism.hotel { background: url(/images/browser-icons/hotel.p.16.png) no-repeat center left; } +.tourism.museum { background: url(/images/browser-icons/museum.p.16.png) no-repeat center left; } +.tourism.viewpoint { background: url(/images/browser-icons/view_point.p.16.png) no-repeat center left; } + +/* Ways */ +.aeroway.runway { background: url(/images/browser-icons/runway.20.png) no-repeat center left; } +.aeroway.taxiway { background: url(/images/browser-icons/taxiway.20.png) no-repeat center left; } + +.building { background: url(/images/browser-icons/building.png) no-repeat center left; } + +.highway.bridleway { background: url(/images/browser-icons/bridleway.20.png) no-repeat center left; } +.highway.byway { background: url(/images/browser-icons/byway.20.png) no-repeat center left; } +.highway.cycleway { background: url(/images/browser-icons/cycleway.20.png) no-repeat center left; } +.highway.footway { background: url(/images/browser-icons/footway.20.png) no-repeat center left; } +.highway.motorway { background: url(/images/browser-icons/motorway.20.png) no-repeat center left; } +.highway.primary { background: url(/images/browser-icons/primary.20.png) no-repeat center left; } +.highway.residential { background: url(/images/browser-icons/unclassified.20.png) no-repeat center left; } +.highway.secondary { background: url(/images/browser-icons/secondary.20.png) no-repeat center left; } +.highway.trunk { background: url(/images/browser-icons/trunk.20.png) no-repeat center left; } +.highway.unclassified { background: url(/images/browser-icons/unclassified.20.png) no-repeat center left; } + +.landuse.brownfield { background: url(/images/browser-icons/brownfield.png) no-repeat center left; } +.landuse.cemetery { background: url(/images/browser-icons/cemetery.png) no-repeat center left; } +.landuse.commercial { background: url(/images/browser-icons/commercial.png) no-repeat center left; } +.landuse.farm { background: url(/images/browser-icons/farm.png) no-repeat center left; } +.landuse.forest { background: url(/images/browser-icons/forest.png) no-repeat center left; } +.landuse.industrial { background: url(/images/browser-icons/industrial.png) no-repeat center left; } +.landuse.military { background: url(/images/browser-icons/military.png) no-repeat center left; } +.landuse.residential { background: url(/images/browser-icons/residential.png) no-repeat center left; } +.landuse.retail { background: url(/images/browser-icons/retail.png) no-repeat center left; } +.landuse.tourism { background: url(/images/browser-icons/tourism.png) no-repeat center left; } +.landuse.wood { background: url(/images/browser-icons/wood.png) no-repeat center left; } + +.leisure.golf_course { background: url(/images/browser-icons/golf.png) no-repeat center left; } +.leisure.park { background: url(/images/browser-icons/park.png) no-repeat center left; } +.leisure.pitch { background: url(/images/browser-icons/pitch.png) no-repeat center left; } +.leisure.nature_reserve { background: url(/images/browser-icons/reserve.png) no-repeat center left; } + +.natural.heath { background: url(/images/browser-icons/heathland.png) no-repeat center left; } +.natural.water { background: url(/images/browser-icons/lake.png) no-repeat center left; } + +.railway.light_rail { background: url(/images/browser-icons/light_rail.20.png) no-repeat center left; } +.railway.rail { background: url(/images/browser-icons/rail.20.png) no-repeat center left; } +.railway.subway { background: url(/images/browser-icons/subway.20.png) no-repeat center left; } +.railway.tram { background: url(/images/browser-icons/tram.20.png) no-repeat center left; }
- <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %> + <%= 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) %> <% 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) }.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 => css_class('way', w), :title => link_title(w) ) }.to_sentence %>) <% end %>