started work on /diary
This commit is contained in:
parent
763848b3dc
commit
8758685a86
5 changed files with 11 additions and 0 deletions
|
@ -13,4 +13,8 @@ class DiaryEntryController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def list
|
||||
@entries=DiaryEntry.find(:all, :order => 'created_at DESC', :limit=>20)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<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 />
|
||||
|
|
3
app/views/diary_entry/list.rhtml
Normal file
3
app/views/diary_entry/list.rhtml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<h3>most recent posts:</h3>
|
||||
FIXME: geoRSS needed. Also proper user names and permalinks.<br><br>
|
||||
<%= render :partial => 'diary_entry/diary_entry', :collection => @entries %>
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
<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>
|
||||
|
|
|
@ -69,6 +69,7 @@ ActionController::Routing::Routes.draw do |map|
|
|||
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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue