]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/_changeset_details.rhtml
5b724012abd4d5807c170ea528e5b4477e7e0d70
[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     <% else %>
41       <td>
42         <table>
43           <tr>
44             <td colspan="2" style="text-align:center"><%= changeset_details.max_lat/GeoRecord::SCALE.to_f -%></td>
45           </tr>
46           <tr>
47             <td><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
48             <td><%= changeset_details.max_lon/GeoRecord::SCALE.to_f -%></td>
49           </tr>
50           <tr>
51             <td colspan="2" style="text-align:center"><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
52           </tr>
53         </table>
54       </td>
55     <% end %>
56   </tr>
57
58   <% unless @nodes.empty? %>
59     <tr valign="top">
60       <th>Has the following <%= @node_pages.item_count %> nodes:</th>
61       <td>
62         <table padding="0">
63           <% @nodes.each do |node| %>
64             <tr><td><%= link_to "Node #{node.id.to_s}, version #{node.version.to_s}", :action => "node", :id => node.id.to_s %></td></tr>
65           <% end %>
66         </table>
67       </td>
68     </tr>
69     <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
70   <% end %>
71   
72   <% unless @ways.empty? %>
73     <tr valign="top">
74       <th>Has the following <%= @way_pages.item_count %> ways:</th>
75       <td>
76         <table padding="0">
77           <% @ways.each do |way| %>
78             <tr><td><%= link_to "Way #{way.id.to_s}, version #{way.version.to_s}", :action => "way", :id => way.id.to_s %></td></tr>
79           <% end %>
80           <%=
81           #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members 
82           %>
83         </table>
84       </td>
85     </tr>
86     <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
87   <% end %>
88   
89   <% unless @relations.empty? %>
90     <tr valign="top">
91       <th>Has the following <%= @relation_pages.item_count %> relations:</th>
92       <td>
93         <table padding="0">
94           <% @relations.each do |relation| %>
95             <tr><td><%= link_to "Relation #{relation.id.to_s}, version #{relation.version.to_s}", :action => "relation", :id => relation.id.to_s %></td></tr>
96           <% end %>
97         </table>
98       </td>
99     </tr>
100     <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
101   <% end %>
102
103 </table>