]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/trace/list.rhtml
Use the rails paginator to paginate the trace list, and abstract some
[rails.git] / app / views / trace / list.rhtml
index dc3861a5433d535250d310cd89ce972e000cc296..57e72fab4676bd48f9ecb0593eedfb10531282ca 100644 (file)
@@ -1,31 +1,16 @@
 <h1>Public GPS Traces</h1>
 
-<br /><br />
-
-<span class="rsssmall"><a href="<%= url_for :controller => 'trace', :action => 'georss' %>"><img src="http://www.openstreetmap.org/images/RSS.gif" border="0"></a></span> | 
-<% if @user %>
-  <%= link_to 'See just your traces', {:controller => 'trace', :action => 'mine'} %>
-<% else %>
-  <%= link_to 'login', {:controller => 'user', :action => 'login'} %> to see just your traces
+<% if @tag %>
+ Traces filtered by tag <b><%= @tag %></b>
+ <br/><br/>
 <% end %>
-
-
-<br /><br />
-Showing page 
-<% if @page > 0 %>
-  <%= link_to '<<<', {:controller => 'trace', :action => 'list', :page => @page-1}, {:title => 'previous page'} %>
+<span class="rsssmall"><a href="<%= url_for :controller => 'trace', :action => 'georss' %>"><img src="/images/RSS.gif" border="0" alt="RSS" /></a></span> | 
+<%= link_to 'See just your traces, or upload a trace', {:controller => 'trace', :action => 'mine'} %>
+<% if @tag %>
+ | <%= link_to 'See all traces', {:controller => 'trace', :action => 'list'} %>
 <% end %>
 
-<%= @page %> 
-
-<%= link_to '>>>', {:controller => 'trace', :action => 'list', :page => @page+1}, {:title => 'next page'} %>
-
-(<%= 1+(@page * 20)%>-<%= (1+@page) * 20 %>)
+<br />
+<br />
 
-<table id="keyvalue" cellpadding="3">
-  <tr>
-    <th></th>
-    <th></th>
-  </tr>
-  <%= render :partial => 'trace', :collection => @traces %>
-</table>
+<%= render :partial => 'trace_list' %>