render :action => "not_found", :status => :not_found
end
end
+
+ def changeset
+ begin
+ @changeset = Changeset.find(params[:id])
+
+ @title = "Changeset | #{@changeset.id}"
+ rescue ActiveRecord::RecordNotFound
+ @type = "changeset"
+ render :action => "not_found", :status => :not_found
+ end
+ end
end
return cs
end
+ def tags_as_hash
+ return tags
+ end
+
def tags
unless @tags
@tags = {}
--- /dev/null
+<table>
+
+ <%= render :partial => "common_details", :object => changeset_details %>
+
+ <% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %>
+ <tr valign="top">
+ <th>Part of:</th>
+ <td>
+ <table padding="0">
+ <% node_details.ways.each do |way| %>
+ <tr><td><%= link_to "Way " + way.id.to_s, :action => "way", :id => way.id.to_s %></td></tr>
+ <% end %>
+ <%= render :partial => "containing_relation", :collection => node_details.containing_relation_members %>
+ </table>
+ </td>
+ </tr>
+ <% end %>
+
+</table>
--- /dev/null
+<table width="100%">
+ <tr>
+ <td>
+ <h2>Changeset: <%= h(@changeset.id) %></h2>
+ </td>
+ <td>
+ <%= render :partial => "navigation" %>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <tr>
+ <th>Created at:</th>
+ <td><%= h(@changeset.created_at) %></td>
+ </tr>
+
+ <% if @changeset.user.data_public? %>
+ <tr>
+ <th>Belongs to:</th>
+ <td><%= link_to h(@changeset.user.display_name), :controller => "user", :action => "view", :display_name => @changeset.user.display_name %></td>
+ </tr>
+ <% end %>
+ <% unless @changeset.tags_as_hash.empty? %>
+ <tr valign="top">
+ <th>Tags:</th>
+ <td>
+ <table padding="0">
+ <%= render :partial => "tag", :collection => @changeset.tags_as_hash %>
+ </table>
+ </td>
+ </tr>
+ <% end %>
+ <hr />
+ <%= link_to "Download XML", :controller => "changeset", :action => "read" %>
+ </td>
+ <% # render :partial => "map", :object => @node %>
+ </tr>
+</table>
map.connect '/browse/node/:id/history', :controller => 'browse', :action => 'node_history', :id => /\d+/
map.connect '/browse/relation/:id', :controller => 'browse', :action => 'relation', :id => /\d+/
map.connect '/browse/relation/:id/history', :controller => 'browse', :action => 'relation_history', :id => /\d+/
+ map.connect '/browse/changeset/:id', :controller => 'browse', :action => 'changeset', :id => /\d+/
# web site