From: Christopher Schmidt Date: Sun, 20 Apr 2008 20:26:20 +0000 (+0000) Subject: Link ways and nodes backwards and forwards. X-Git-Tag: live~8324^2~35 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/35c88713546d4c606e0aca9c4a4b3a63ae88759b?ds=sidebyside Link ways and nodes backwards and forwards. --- diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index a33fedd53..97daaa268 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -3,6 +3,7 @@ class BrowseController < ApplicationController layout 'site' def index + @nodes = Node.find(:all, :order => "timestamp DESC", :limit=> 20) end def relation diff --git a/app/views/browse/index.rhtml b/app/views/browse/index.rhtml index d4a7b19ef..2cd5cc9da 100644 --- a/app/views/browse/index.rhtml +++ b/app/views/browse/index.rhtml @@ -1 +1,12 @@ -Welcome to the browse subpages! +

<%= @nodes.length %> Recently Changed Nodes

+ diff --git a/app/views/browse/node.rhtml b/app/views/browse/node.rhtml index 2a8fd56d9..fcfd7cfd7 100644 --- a/app/views/browse/node.rhtml +++ b/app/views/browse/node.rhtml @@ -1,3 +1,14 @@

Node Browser: <%= h(@name) %>

<%= render :partial => 'common', :locals => { :obj => @node, :type => "node" } %> <%= render :partial => 'tag_table', :locals => { :tags => @node.tags_as_hash } %> +<% if @node.ways.length != 0 %> +
+
+

Part of:

+ +
+<% end %> diff --git a/app/views/browse/way.rhtml b/app/views/browse/way.rhtml index b1c26f478..c12a422cb 100644 --- a/app/views/browse/way.rhtml +++ b/app/views/browse/way.rhtml @@ -1,3 +1,15 @@

Way Browser: <%= h(@name) %>

<%= render :partial => 'common', :locals => { :obj => @way, :type => "way" } %> <%= render :partial => 'tag_table', :locals => { :tags => @way.tags } %> + +<% if @way.nodes.length != 0 %> +
+
+

Parts:

+ +
+<% end %>