end
end
end
+
+ def list
+ @entries=DiaryEntry.find(:all, :order => 'created_at DESC', :limit=>20)
+ end
end
<b><%= diary_entry.title %></b><br />
<%= simple_format(diary_entry.body) %>
+Posted by user <b><%= link_to diary_entry.user_id,"spong" %></b> at <%= diary_entry.created_at %><br />
<br />
+<hr />
--- /dev/null
+<h3>most recent posts:</h3>
+FIXME: geoRSS needed. Also proper user names and permalinks.<br><br>
+<%= render :partial => 'diary_entry/diary_entry', :collection => @entries %>
<div id="left_menu">
<a href="http://wiki.openstreetmap.org">Help & Wiki</a><br />
+ <%= link_to "Users' diaries", {:controller => 'diary_entry', :action => 'list'} %><br />
<a href="http://www.opengeodata.org/">News blog</a><br />
<a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
</div>
map.connect '/user/:display_name/edit', :controller => 'user', :action => 'edit'
map.connect '/user/:display_name/account', :controller => 'user', :action => 'account'
map.connect '/user/:display_name/set_home', :controller => 'user', :action => 'set_home'
+ map.connect '/diary', :controller => 'diary_entry', :action => 'list'
# test pages
map.connect '/test/populate/:table/:from/:count', :controller => 'test', :action => 'populate'