]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/_changeset_details.rhtml
07f076e21e13bdb15695d23392fc08e90ea5bf88
[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   <tr>
37     <th>Bounding box:</th>
38     <% if changeset_details.max_lat.nil? or changeset_details.min_lat.nil? or changeset_details.max_lon.nil? or changeset_details.min_lon.nil? %>
39       <td>No bounding box has been stored for this changeset.</td>
40     <%
41        else
42           minlon = changeset_details.min_lon/GeoRecord::SCALE.to_f
43           minlat = changeset_details.min_lat/GeoRecord::SCALE.to_f
44           maxlon = changeset_details.max_lon/GeoRecord::SCALE.to_f
45           maxlat = changeset_details.max_lat/GeoRecord::SCALE.to_f
46     %>
47       <td>
48         <table>
49           <tr>
50             <td colspan="3" style="text-align:center"><%=maxlat -%></td>
51           </tr>
52           <tr>
53             <td><%=minlon -%></td>
54             <td>(<a href='/?minlon=<%= minlon %>&minlat=<%= minlat %>&maxlon=<%= maxlon %>&maxlat=<%= maxlat %>&box=yes' title='show area box'>box</a>)</td>
55             <td><%=maxlon -%></td>
56           </tr>
57           <tr>
58             <td colspan="3" style="text-align:center"><%= minlon -%></td>
59           </tr>
60         </table>
61       </td>
62     <% end %>
63   </tr>
64
65   <% unless @nodes.empty? %>
66     <tr valign="top">
67       <th>Has the following <%= @node_pages.item_count %> nodes:</th>
68       <td>
69         <table padding="0">
70           <% @nodes.each do |node| %>
71             <tr><td><%= link_to "Node #{node.id.to_s}, version #{node.version.to_s}", :action => "node", :id => node.id.to_s %></td></tr>
72           <% end %>
73         </table>
74       </td>
75     </tr>
76     <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
77   <% end %>
78   
79   <% unless @ways.empty? %>
80     <tr valign="top">
81       <th>Has the following <%= @way_pages.item_count %> ways:</th>
82       <td>
83         <table padding="0">
84           <% @ways.each do |way| %>
85             <tr><td><%= link_to "Way #{way.id.to_s}, version #{way.version.to_s}", :action => "way", :id => way.id.to_s %></td></tr>
86           <% end %>
87           <%=
88           #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members 
89           %>
90         </table>
91       </td>
92     </tr>
93     <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
94   <% end %>
95   
96   <% unless @relations.empty? %>
97     <tr valign="top">
98       <th>Has the following <%= @relation_pages.item_count %> relations:</th>
99       <td>
100         <table padding="0">
101           <% @relations.each do |relation| %>
102             <tr><td><%= link_to "Relation #{relation.id.to_s}, version #{relation.version.to_s}", :action => "relation", :id => relation.id.to_s %></td></tr>
103           <% end %>
104         </table>
105       </td>
106     </tr>
107     <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
108   <% end %>
109
110 </table>