end
@title = 'Relation | ' + (@name)
+ @next = Relation.find(:first, :order => "id ASC", :conditions => [ "visible = true AND id > :id", { :id => @relation.id }] )
+ @prev = Relation.find(:first, :order => "id DESC", :conditions => [ "visible = true AND id < :id", { :id => @relation.id }] )
rescue ActiveRecord::RecordNotFound
render :nothing => true, :status => :not_found
end
end
@title = 'Way | ' + (@name)
+ @next = Way.find(:first, :order => "id ASC", :conditions => [ "visible = true AND id > :id", { :id => @way.id }] )
+ @prev = Way.find(:first, :order => "id DESC", :conditions => [ "visible = true AND id < :id", { :id => @way.id }] )
rescue ActiveRecord::RecordNotFound
render :nothing => true, :status => :not_found
end
end
@title = 'Node | ' + (@name)
+ @next = Node.find(:first, :order => "id ASC", :conditions => [ "visible = true AND id > :id", { :id => @node.id }] )
+ @prev = Node.find(:first, :order => "id DESC", :conditions => [ "visible = true AND id < :id", { :id => @node.id }] )
rescue ActiveRecord::RecordNotFound
render :nothing => true, :status => :not_found
end
--- /dev/null
+<div style="float:right; text-align:center; width: 250px;">
+<% if @prev %>
+<
+<%= link_to @prev.id.to_s, :action => type, :id => @prev.id %>
+<% end %>
+<% if @prev and @next %>
+|
+<% end %>
+<% if @next %>
+<%= link_to @next.id.to_s, :action => type, :id => @next.id %>
+>
+<% end %>
+</div>
+<%= render :partial => 'navigation', :locals => { :type => "node" } %>
<h2>Node Browser: <%= h(@name) %></h2>
<%= render :partial => 'common', :locals => { :obj => @node, :type => "node" } %>
<%= render :partial => 'tag_table', :locals => { :tags => @node.tags_as_hash } %>
+<%= render :partial => 'navigation', :locals => { :type => "relation" } %>
<h2>Relation Browser: <%= h(@name) %></h2>
<%= render :partial => 'common', :locals => { :obj => @relation, :type => "relation" } %>
<%= render :partial => 'tag_table', :locals => { :tags => @relation.tags } %>
+<%= render :partial => 'navigation', :locals => { :type => "way" } %>
<h2>Way Browser: <%= h(@name) %></h2>
<%= render :partial => 'common', :locals => { :obj => @way, :type => "way" } %>
<%= render :partial => 'tag_table', :locals => { :tags => @way.tags } %>