]> git.openstreetmap.org Git - rails.git/commitdiff
Adding the ability to see the min/max lat/lon for a changeset in the data browser...
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 8 Dec 2008 15:30:19 +0000 (15:30 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 8 Dec 2008 15:30:19 +0000 (15:30 +0000)
app/views/browse/_changeset_details.rhtml
app/views/message/no_such_user.rhtml [new file with mode: 0644]

index 765fe4778d721d7b38a4e31f7e54d0ca0cf2abfc..2b711611bf0b676fafdf052dab73ca783e772a47 100644 (file)
     </tr>
   <% end %>
 
     </tr>
   <% end %>
 
+  <% if changeset_details.max_lat.nil? or changeset_details.min_lat.nil? or changeset_details.max_lon.nil? or changeset_details.min_lon.nil? %>
+    <tr>
+      <td>No bounding box has been stored for this changeset.</td>
+    </tr>
+  <% else %>
+    <table>
+      <tr>
+        <td colspan="2" style="text-align:center"><b>Max Latitude: </b><%= changeset_details.max_lat/GeoRecord::SCALE.to_f -%></td>
+      </tr>
+      <tr>
+        <td><b>Min Longitude: </b><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
+        <td><b>Max Longitude: </b><%= changeset_details.max_lon/GeoRecord::SCALE.to_f -%></td>
+      </tr>
+      <tr>
+        <td colspan="2" style="text-align:center"><b>Min Latitude: </b><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
+      </tr>
+    </table>
+  <% end %>
+
   <% unless @nodes.empty? %>
     <tr valign="top">
       <th>Has the following <%= @node_pages.item_count %> nodes:</th>
   <% unless @nodes.empty? %>
     <tr valign="top">
       <th>Has the following <%= @node_pages.item_count %> nodes:</th>
diff --git a/app/views/message/no_such_user.rhtml b/app/views/message/no_such_user.rhtml
new file mode 100644 (file)
index 0000000..c18733a
--- /dev/null
@@ -0,0 +1,2 @@
+<h1>No such user or message</h1>
+<p>Sorry there is no user or message with that name or id</p>