Make browse controller index show recently closed changesets, rather than recently changed nodes.

This commit is contained in:
Thomas Wood 2008-12-23 15:47:06 +00:00
parent 60834f33f9
commit 62b6d15967
3 changed files with 29 additions and 18 deletions

View file

@ -1,12 +1,16 @@
<h2><%= @nodes.length %> Recently Changed Nodes</h2>
<h2><%= @changesets.length %> Recently Closed Changesets</h2>
<ul id="recently_changed">
<% @nodes.each do |node|
name = node.tags_as_hash['name'].to_s
if name.length == 0:
name = "(No name)"
<% @changesets.each do |changeset|
if changeset.user.data_public?
user = changeset.user.display_name
else
user = "(anonymous)"
end
name = "#{name} - #{node.id} (#{node.version})"
cmt = changeset.tags_as_hash['comment'].to_s
cmt = "(no comment)" if cmt.length == 0
text = "#{changeset.id} by #{user} - #{cmt}"
%>
<li><%= link_to h(name), :action => "node", :id => node.id %></li>
<li><%= link_to h(text), :action => "changeset", :id => changeset.id %></li>
<% end %>
</ul>