]> git.openstreetmap.org Git - rails.git/blob - app/views/changeset/list_bbox.rhtml
Eliminate duplication of tag printing logic.
[rails.git] / app / views / changeset / list_bbox.rhtml
1 <h1>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 Changesets within the area: 
12       (<a href='/?minlon=<%= minlon %>&minlat=<%= minlat %>&maxlon=<%= maxlon %>&maxlat=<%= maxlat %>&box=yes' title='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>No changesets</b></p>
18 <%      else %>
19
20 <%= render :partial => 'changeset_paging_nav' %>
21
22 <table id="keyvalue" cellpadding="3">
23   <tr>
24     <th>ID</th>
25     <th>Saved at</th>
26     <th>User</th>
27     <th>Comment</th>
28     <th>Area</th>
29     <th></th>
30   </tr>
31   <%= render :partial => 'changeset', :locals => {:showusername => true}, :collection => @edits unless @edits.nil? %>
32 </table>
33
34 <%= render :partial => 'changeset_paging_nav' %>
35
36 <p>For all changes everywhere see <%=  link_to("Recent Changes", :controller => "browse", :action => "changesets") %> </p>
37
38 <%
39         end
40
41 else 
42         #bbox is nil. happens if the user surfs to this page directly.
43 %>
44
45 <p>No area specified</p>
46 <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>
47 <p>Alternatively view all <%=  link_to("recent changes", :controller => "browse", :action => "changesets") %> </p>
48
49 <%
50 end
51 %>
52 <br>
53