]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/_changeset_details.rhtml
Adding the ability to see the min/max lat/lon for a changeset in the data browser...
[rails.git] / app / views / browse / _changeset_details.rhtml
1 <table>
2
3   <tr>
4     <th>Created at:</th>
5     <td><%= h(changeset_details.created_at) %></td>
6   </tr>
7   
8   <tr>
9     <th>Closed at:</th>
10     <td><%= h(changeset_details.closed_at) %></td>
11   </tr>
12   
13   <% if changeset_details.user.data_public? %>
14     <tr>
15       <th>Belongs to:</th>
16       <td><%= link_to h(changeset_details.user.display_name), :controller => "user", :action => "view", :display_name => changeset_details.user.display_name %></td>
17     </tr>
18   <% end %>
19   
20   <% unless changeset_details.tags_as_hash.empty? %>
21     <tr valign="top">
22       <th>Tags:</th>
23       <td>
24         <table padding="0">
25           <%= render :partial => "tag", :collection => changeset_details.tags_as_hash %>
26         </table>
27       </td>
28     </tr>
29   <% else %>
30     <tr>
31       <th>Tags</th>
32       <td>There are no tags for this changeset</td>
33     </tr>
34   <% end %>
35
36   <% if changeset_details.max_lat.nil? or changeset_details.min_lat.nil? or changeset_details.max_lon.nil? or changeset_details.min_lon.nil? %>
37     <tr>
38       <td>No bounding box has been stored for this changeset.</td>
39     </tr>
40   <% else %>
41     <table>
42       <tr>
43         <td colspan="2" style="text-align:center"><b>Max Latitude: </b><%= changeset_details.max_lat/GeoRecord::SCALE.to_f -%></td>
44       </tr>
45       <tr>
46         <td><b>Min Longitude: </b><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
47         <td><b>Max Longitude: </b><%= changeset_details.max_lon/GeoRecord::SCALE.to_f -%></td>
48       </tr>
49       <tr>
50         <td colspan="2" style="text-align:center"><b>Min Latitude: </b><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
51       </tr>
52     </table>
53   <% end %>
54
55   <% unless @nodes.empty? %>
56     <tr valign="top">
57       <th>Has the following <%= @node_pages.item_count %> nodes:</th>
58       <td>
59         <table padding="0">
60           <% @nodes.each do |node| %>
61             <tr><td><%= link_to "Node #{node.id.to_s}, version #{node.version.to_s}", :action => "node", :id => node.id.to_s %></td></tr>
62           <% end %>
63         </table>
64       </td>
65     </tr>
66     <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
67   <% end %>
68   
69   <% unless @ways.empty? %>
70     <tr valign="top">
71       <th>Has the following <%= @way_pages.item_count %> ways:</th>
72       <td>
73         <table padding="0">
74           <% @ways.each do |way| %>
75             <tr><td><%= link_to "Way #{way.id.to_s}, version #{way.version.to_s}", :action => "way", :id => way.id.to_s %></td></tr>
76           <% end %>
77           <%=
78           #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members 
79           %>
80         </table>
81       </td>
82     </tr>
83     <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
84   <% end %>
85   
86   <% unless @relations.empty? %>
87     <tr valign="top">
88       <th>Has the following <%= @relation_pages.item_count %> relations:</th>
89       <td>
90         <table padding="0">
91           <% @relations.each do |relation| %>
92             <tr><td><%= link_to "Relation #{relation.id.to_s}, version #{relation.version.to_s}", :action => "relation", :id => relation.id.to_s %></td></tr>
93           <% end %>
94         </table>
95       </td>
96     </tr>
97     <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
98   <% end %>
99
100 </table>