]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/changeset/list_bbox.rhtml
Use some rails magic to avoid having to duplicate all the changeset
[rails.git] / app / views / changeset / list_bbox.rhtml
index f1d8633f04e7316aeedbdb0d0e62aa3978991633..ef774e37819c223167d41f0d5d7f321be66b1a94 100644 (file)
@@ -1,38 +1,28 @@
-<h1>History</h1>
+<h1><%= t'changeset.list_bbox.history' %></h1>
 <%
 if @bbox!=nil
-       lon1 = @bbox[0] 
-       lat1 = @bbox[1] 
-       lon2 = @bbox[2]
-       lat2 = @bbox[3] 
+       minlon = @bbox[0] 
+       minlat = @bbox[1] 
+       maxlon = @bbox[2]
+       maxlat = @bbox[3] 
 
        %>
 <p>
-Changsets within the area: 
-(<a href='/?lat=<%= lat1 %>&lon=<%= lon1 %>&zoom=14'><%= format("%0.3f",lat1) -%>,<%= format("%0.3f",lon1) -%></a>) to 
-(<a href='/?lat=<%= lat2 %>&lon=<%= lon2 %>&zoom=14'><%= format("%0.3f",lat2) -%>,<%= format("%0.3f",lon2) -%></a>)   
+<%= t'changeset.list_bbox.changesets_within_the_area' %> 
+      (<a href='/?minlon=<%= minlon %>&minlat=<%= minlat %>&maxlon=<%= maxlon %>&maxlat=<%= maxlat %>&box=yes' title='<%= t'changeset.list_bbox.show_area_box' %>'><%= format("%0.3f",minlon) -%>,<%= format("%0.3f",minlat) -%>,<%= format("%0.3f",maxlon) -%>,<%= format("%0.3f",maxlat) -%></a>) 
+
 </p>
 
 <%     if @edits.nil? or @edits.empty? %>
-<p><b>No changesets</b></p>
+<p><b><%= t'changeset.list_bbox.no_changesets' %></b></p>
 <%     else %>
 
 <%= render :partial => 'changeset_paging_nav' %>
-
-<table id="keyvalue" cellpadding="3">
-  <tr>
-    <th>ID</th>
-    <th>Saved at</th>
-    <th>User</th>
-    <th>Comment</th>
-    <th>Area</th>
-    <th></th>
-  </tr>
-  <%= render :partial => 'changeset', :locals => {:showusername => true}, :collection => @edits unless @edits.nil? %>
-</table>
-
+<%= render :partial => 'changesets' %>
 <%= render :partial => 'changeset_paging_nav' %>
 
+<p><%= t'changeset.list_bbox.all_changes_everywhere' , :recent_changes_link => link_to(t('changeset.list_bbox.recent_changes'), :controller => "browse", :action => "changesets") %> </p>
+
 <%
        end
 
@@ -40,11 +30,22 @@ else
        #bbox is nil. happens if the user surfs to this page directly.
 %>
 
-<p>No area specified</p>
-<p>First use the <a href="/" title="view the map">view tab</a> to pan and zoom to an area of interest, then click the history tab</p>
+<p><%= t'changeset.list_bbox.no_area_specified' %></p>
+<p><%= t'changeset.list_bbox.first_use_view', :view_tab_link => '<a href="/" title="' + t('changeset.list_bbox.view_the_map') + '">' + t('changeset.list_bbox.view_tab') + '</a>' %></p>
+<p><%= t'changeset.list_bbox.alternatively_view', :recent_changes_link => link_to(t('changeset.list_bbox.recent_changes'), :controller => "browse", :action => "changesets") %></p>
 
 <%
 end
 %>
 <br>
-<br>
+
+<% if @bbox %>
+  <%= rss_link_to :action => 'list_bbox_rss', :bbox => @bbox.join(",") %>
+<% end %>
+
+
+<% if @bbox %>
+  <% content_for :head do %>
+    <%= auto_discovery_link_tag :atom, :controller => 'changeset', :action => 'list_bbox_rss', :bbox => @bbox.join(",") %>
+  <% end %>
+<% end %>