]> git.openstreetmap.org Git - rails.git/blob - 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
1 <h1><%= t'changeset.list_bbox.history' %></h1>
2 <%
3 if @bbox!=nil
4         minlon = @bbox[0] 
5         minlat = @bbox[1] 
6         maxlon = @bbox[2]
7         maxlat = @bbox[3] 
8
9         %>
10 <p>
11 <%= t'changeset.list_bbox.changesets_within_the_area' %> 
12       (<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>) 
13
14 </p>
15
16 <%      if @edits.nil? or @edits.empty? %>
17 <p><b><%= t'changeset.list_bbox.no_changesets' %></b></p>
18 <%      else %>
19
20 <%= render :partial => 'changeset_paging_nav' %>
21 <%= render :partial => 'changesets' %>
22 <%= render :partial => 'changeset_paging_nav' %>
23
24 <p><%= t'changeset.list_bbox.all_changes_everywhere' , :recent_changes_link => link_to(t('changeset.list_bbox.recent_changes'), :controller => "browse", :action => "changesets") %> </p>
25
26 <%
27         end
28
29 else 
30         #bbox is nil. happens if the user surfs to this page directly.
31 %>
32
33 <p><%= t'changeset.list_bbox.no_area_specified' %></p>
34 <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>
35 <p><%= t'changeset.list_bbox.alternatively_view', :recent_changes_link => link_to(t('changeset.list_bbox.recent_changes'), :controller => "browse", :action => "changesets") %></p>
36
37 <%
38 end
39 %>
40 <br>
41
42 <% if @bbox %>
43   <%= rss_link_to :action => 'list_bbox_rss', :bbox => @bbox.join(",") %>
44 <% end %>
45
46
47 <% if @bbox %>
48   <% content_for :head do %>
49     <%= auto_discovery_link_tag :atom, :controller => 'changeset', :action => 'list_bbox_rss', :bbox => @bbox.join(",") %>
50   <% end %>
51 <% end %>