]> git.openstreetmap.org Git - rails.git/commitdiff
more trace stuff
authorSteve Coast <steve@asklater.com>
Mon, 27 Nov 2006 21:43:42 +0000 (21:43 +0000)
committerSteve Coast <steve@asklater.com>
Mon, 27 Nov 2006 21:43:42 +0000 (21:43 +0000)
app/views/trace/_trace.rhtml
app/views/trace/list.rhtml
config/routes.rb

index 3149e4c0ad25188180c96cbeb473663529626587..73fb5080ccc1f9b803a7c03abad456a7282543a9 100644 (file)
@@ -1 +1,16 @@
-bleh
+<tr>
+  <% cl = cycle('table0', 'table1') %>
+  <td class="<%= cl %>">image here</td>
+  <td class="<%= cl %>"><%= link_to trace.name, {:controller => 'trace', :action => 'onetrace', :id => trace.id} %>
+    <span class="gpxsummary" title="<%= trace.timestamp %>"> ... 
+      <% if trace.inserted %> 
+      (<%= trace.size %> points)
+      <% end %> 
+      ... <%= time_ago_in_words( trace.timestamp ) %>  ago</span>
+    <a href="/traces/user/blars/12701" title="more detail..." >more</a> /
+    <a href="/edit.html?lat=34.1032333&lon=-118.2272333&zoom=14" title="create maps">map</a><br />
+      <%= trace.description %>
+    <br />
+    by <%= link_to trace.user.display_name, {:controller => 'trace', :action => 'list', :user => trace.user.display_name} %>
+  </td>
+</tr>
index ce2e76349570f4b7df3adc27b333c820410a31db..6ff6b34a632054e926f1faef7f17d74108563a81 100644 (file)
@@ -3,4 +3,10 @@
   <%= link_to 'See just your traces', {:controller => 'trace', :action => 'mine'} %>
 <% end %>
 
   <%= link_to 'See just your traces', {:controller => 'trace', :action => 'mine'} %>
 <% end %>
 
-<%= render :partial => 'trace', :collection => @traces %>
+<table id="keyvalue" cellpadding="3">
+  <tr>
+    <th></th>
+    <th></th>
+  </tr>
+  <%= render :partial => 'trace', :collection => @traces %>
+</table>
index 6205094736cce633b7e57f8073bd73d674257a82..d6ac734682bc61aaa4eb92165a9b60a38c9cef29 100644 (file)
@@ -28,7 +28,7 @@ ActionController::Routing::Routes.draw do |map|
   
   map.connect '/traces', :controller => 'trace', :action => 'list'
   map.connect '/traces/mine', :controller => 'trace', :action => 'users'
   
   map.connect '/traces', :controller => 'trace', :action => 'list'
   map.connect '/traces/mine', :controller => 'trace', :action => 'users'
-  map.connect '/traces/user/:user_login/:id', :controller => 'trace', :action => 'user'
+  map.connect '/traces/user/:user/:id', :controller => 'trace', :action => 'list', :id => nil
 
   map.connect ':controller/:action/:id'
 end
 
   map.connect ':controller/:action/:id'
 end