]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/trace/mine.rhtml
Use the rails paginator to paginate the trace list, and abstract some
[rails.git] / app / views / trace / mine.rhtml
index 997e2c297821670353650da22154bf2e41cd05d7..db5a8503a0d3542114968a2871c343c173a3461f 100644 (file)
@@ -1,9 +1,20 @@
 <h1>Your GPS Traces</h1>
 
-<%= link_to 'see all traces', {:controller => 'trace', :action => 'list'} %><br /><br />
+<% if @tag %>
+ Traces filtered by tag <b><%= @tag %></b>
+ <br/><br/>
+<% end %>
+<%= link_to 'See all traces', {:controller => 'trace', :action => 'list'} %>
+<% if @tag %>
+  | <%= link_to 'See all your traces', {:controller => 'trace', :action => 'mine'} %>
+<% end %>
+
+<br />
+<br />
 
 <% if @user %>
-<%= start_form_tag({:action => 'create'}, :multipart => true) %>
+
+<% form_tag({:action => 'create'}, :multipart => true) do %>
 <table>
 <table>
 <tr><td align="right">upload GPX file:</td><td><%= file_field('trace', 'gpx_file', {:size => 50, :maxlength => 255}) %></td></tr>
 <%= submit_tag 'Upload' %> | <a href="http://wiki.openstreetmap.org/index.php/Upload">help</a>
 </td></tr>
 </table>
-
-<br>
-
-<%= end_form_tag %> 
-
-<table id="keyvalue" cellpadding="3">
-  <tr>
-    <th></th>
-    <th></th>
-  </tr>
-  <%= render :partial => 'trace', :collection => @traces %>
-</table>
-
 <% end %>
 
+<%= render :partial => 'trace_list' %>
 
-
-
+<% end %>