]> git.openstreetmap.org Git - rails.git/blob - app/views/changeset/_changeset.rhtml
Add 'history' tab + Move 'recent changes' changeset list to re-use the same _changese...
[rails.git] / app / views / changeset / _changeset.rhtml
1 <tr>
2   <% cl = cycle('table0', 'table1') %>
3
4   <td class="<%= cl %>">
5     #<%= changeset.id %>
6
7   <td class="<%= cl %>">
8     <% if changeset.closed_at > DateTime.now %> (still editing)
9     <% else %><%= changeset.closed_at.strftime("%d %b %Y %H:%M") %><% end %>
10
11     
12   <%if showusername==true %>  
13           <td class="<%= cl %>">
14           <% if changeset.user.data_public? %>
15                 <%= link_to h(changeset.user.display_name), :controller => "user", :action => "view", :display_name => changeset.user.display_name %>
16           <% else %>
17                 <i>annon</i>
18           <% end %>
19   <% end %>
20     
21   <td class="<%= cl %>">
22     <% if changeset.tags['comment'] %>
23       <%= h(changeset.tags['comment']) %>
24     <% else %>
25       (none)
26     <% end %>
27
28   <td class="<%= cl %>">
29     <% if changeset.min_lat.nil? %>
30       (no edits)
31     <% else 
32       lat1 = changeset.min_lat/GeoRecord::SCALE.to_f
33       lat2 = changeset.max_lat/GeoRecord::SCALE.to_f
34       lon1 = changeset.min_lon/GeoRecord::SCALE.to_f
35       lon2 = changeset.max_lon/GeoRecord::SCALE.to_f
36     %>
37       (<a href='/?lat=<%= lat1 %>&lon=<%= lon1 %>&zoom=14'><%= format("%0.3f",lat1) -%>,<%= format("%0.3f",lon1) -%></a>) to 
38       (<a href='/?lat=<%= lat2 %>&lon=<%= lon2 %>&zoom=14'><%= format("%0.3f",lat2) -%>,<%= format("%0.3f",lon2) -%></a>) 
39   <% end %>
40
41   <td class="<%= cl %>">
42     <%= link_to 'more', {:controller => 'browse', :action => 'changeset', :id => changeset.id}, {:title => 'View changeset details'} %> 
43
44 </tr>