]> git.openstreetmap.org Git - rails.git/blob - app/views/changeset/_changeset.rhtml
Revert last commit - too many test failures
[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   <td class="<%= cl %>">
12     <% if changeset.tags['comment'] %>
13       <%= changeset.tags['comment'] %>
14     <% else %>
15       (none)
16     <% end %>
17
18   <td class="<%= cl %>">
19     <% if changeset.min_lat.nil? %>
20       (no edits)
21     <% else 
22       lat1 = changeset.min_lat/GeoRecord::SCALE.to_f
23       lat2 = changeset.max_lat/GeoRecord::SCALE.to_f
24       lon1 = changeset.min_lon/GeoRecord::SCALE.to_f
25       lon2 = changeset.min_lon/GeoRecord::SCALE.to_f
26     %>
27       (<a href='/?lat=<%= lat1 %>&lon=<%= lon1 %>&zoom=14'><%= format("%0.3f",lat1) -%>,<%= format("%0.3f",lon1) -%></a>) to 
28       (<a href='/?lat=<%= lat2 %>&lon=<%= lon2 %>&zoom=14'><%= format("%0.3f",lat2) -%>,<%= format("%0.3f",lon2) -%></a>) 
29   <% end %>
30
31   <td class="<%= cl %>">
32     <%= link_to 'more', {:controller => 'browse', :action => 'changeset', :id => changeset.id}, {:title => 'View changeset details'} %> 
33
34 </tr>